RobEmDee Posted December 13, 2004 Posted December 13, 2004 I am working on a standard Windows Forms application which each end-user will run from their local machine. Each 'project' created with my application will use several different types of files (xml, vss, txt, jpg). I would like to create a custom file format for my application in which I can store all of the related files for a single 'project' in one file. Hopefully, this will also disable the user from opening the individual project files in another application. Does anyone have any suggestions for accomplishing this requirement or something similar? Thanks! Quote
Administrators PlausiblyDamp Posted December 13, 2004 Administrators Posted December 13, 2004 Have you considered storing each of these items within a class (just as member variable or properties) and using .Net's serialisation routines to persist the class to disk? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
RobEmDee Posted December 14, 2004 Author Posted December 14, 2004 Thanks for the reply Plausibly. As I have researched this topic thoughout today, using .NET Serialization seems to be the easiset way to fulfill my requirement. A few of the files I would be storing as part of my application's project would be MS Office 2003 files (.xls, .vss). How could I include these files in my custom file type? Have you considered storing each of these items within a class (just as member variable or properties) and using .Net's serialisation routines to persist the class to disk? Quote
RobEmDee Posted December 14, 2004 Author Posted December 14, 2004 I figured it out. I created a byte[] to hold each one of the files in a project for my application inside of one class. I can then serialize and encrypt this one class encapsulating all of the project files for a single project. When I decrypt & deserialize the class, I am able to rewrite the byte[]'s back to their proprietary formats. Cool stuff! Thanks for your input Plausibly. Thanks for the reply Plausibly. As I have researched this topic thoughout today' date=' using .NET Serialization seems to be the easiset way to fulfill my requirement. A few of the files I would be storing as part of my application's project would be MS Office 2003 files (.xls, .vss). How could I include these files in my custom file type?[/quote'] Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.