Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
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!
Posted

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?
Posted

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']

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...