|
-
Jan 31st, 2006, 10:59 AM
#1
Thread Starter
Hyperactive Member
Librarian-Type Project
I would like to create a application that would act like, or possibly replace, Windows Explorer where my clients could "check-out" the project folders.
Now I have a brief understanding of how to do this but I have no clue how to LOCK these folders so that they cannot update the file while someone has it checked out. My problem is that sometimes we lose data because someone "checked-out" a project to go to a client meeting, but while they were gone, someone else went into the data and changed/added/deleted as needed. When that person got bac and uploaded the folder back into the server, we lose any essential data that was made to it.
Hope I explained it enough. Any thoughts on locking the folder down with permissions ONLY to the program that acts liek a librarian?
Currently Using: VS 2005 Professional
-
Jan 31st, 2006, 11:06 AM
#2
Re: Librarian-Type Project
Have you looked into using a Windows Briefcase?
-
Jan 31st, 2006, 11:25 AM
#3
Thread Starter
Hyperactive Member
Re: Librarian-Type Project
Yes, but the thing is that it doesn't lock the files/folders from anyone else, it is just a special updating tool for files.
Currently Using: VS 2005 Professional
-
Jan 31st, 2006, 06:00 PM
#4
Frenzied Member
Re: Librarian-Type Project
What about changing the attribute of the folder to read only once the folder is check out, then change it back when they check it back in.
-
Feb 1st, 2006, 01:31 AM
#5
Hyperactive Member
Re: Librarian-Type Project
ok i made something like what you are trying to make
but what i did was i re-wrote or the files using a certain technique
i dont know if it is what you call encryption or decryption or whatever, but first i wrote an application into the start of each file which when executed will give you a message box saying the file is locked. as for the rest of the file i used a filestream and rewrote the files backwards....
i think you can use several techniques to lock files by just creating a sequence to re-write the data in the files
you can, for example, read each half file and re write the first half of the file and after it the last half of the file
ofcourse there is another technique you can use also involving bytes which would take less time...it is the injection technique as a friend of mine who used it called it
you can choose a series of bytes to inject at different instances in the file and that would basically stop the file from working...and of course it is undoable...
and then there is the most complex method if you want to re write a file
you can create your own code whereby you change all hex bytes to their reverse
e.g. if the byte in hex is 1B you change it to something else like 2D and so on....
but you must have for each byte a sort of index...
that is how i would lock a file...
-
Feb 1st, 2006, 10:12 AM
#6
Frenzied Member
Re: Librarian-Type Project
I would suggest doing something similar to source safe. Store the files on some server that no one has access to. Then create a program with a database that catalogs those files. When someone clicks on checkout it copies the most recent version to the users computer and locks it in the app so that no one else can check it out.
In this case why re-invent the wheel? Why not just use visual source safe?
-
Feb 1st, 2006, 10:19 AM
#7
Hyperactive Member
Re: Librarian-Type Project
coz other wheels look have better tires!
also they are cooler...
no seriously best locking technique is through re writing the file
someday i will post the source for the lock program i made...
-
Feb 1st, 2006, 10:20 AM
#8
Re: Librarian-Type Project
You could create your own class and serialize it into each folder. Something like "FolderName.meta" or something. Then that file will have information as to whether it's checked out or not. In your application, just change it and make them use the application.
The better solution would be something like VSS though
-
Feb 1st, 2006, 10:28 AM
#9
Frenzied Member
Re: Librarian-Type Project
But with doing it like VSS then you have the infrastructure for version control. And if you are going to do a checkin-checkout type of program you might as well do source control as well.
-
Feb 1st, 2006, 12:03 PM
#10
Thread Starter
Hyperactive Member
Re: Librarian-Type Project
 Originally Posted by kasracer
You could create your own class and serialize it into each folder. Something like "FolderName.meta" or something. Then that file will have information as to whether it's checked out or not. In your application, just change it and make them use the application.
The better solution would be something like VSS though
How do you serialize it and what would that do? Doesn't a class need a application to use it?
Currently Using: VS 2005 Professional
-
Feb 1st, 2006, 12:45 PM
#11
Re: Librarian-Type Project
 Originally Posted by tacoman667
How do you serialize it and what would that do? Doesn't a class need a application to use it?
You can serialize a class and structure and that basically takes the class or structure and translates it into a file. Then opening it is faily easy as well.
Check out this page: http://www.c-sharpcorner.com/Languag...bjectsinCS.asp
You would need an application to use it (which was my original suggestion)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|