With only knowing a little bit about what you're trying to build, it looks
like that design is working for you.
If you'd like to take a look at how other people have solved similar
problems check out the .NET architecture section on MSDN.
http://msdn.microsoft.com/architecture/default.aspx
See the patterns and practices link for some best practice information that
might help you out.
The ASP.NET starter kits also have some good example architectures. Check
out
http://www.asp.net/starterkits for more information.
You may want to take a look at the Memento design pattern for storing undo
information (
http://pages.cpsc.ucalgary.ca/~kristen/index.shtml). If you're
worried about coupling between your data, presentation, and control logic,
you might want to look at building an application in the
Model-View-Controller design pattern or seperating the system into a
presentation layer, a business logic layer, and a data access layer.
If you think there might be a better function or class to help you out, make
sure to read the MSDN online documentation (tip: to search the documentation
it is sometimes better to go to google and use the site:msdn.microsoft.com
extension than to use the MSDN search). The Windows Class Viewer is also
very useful. To use it run wincv.exe from the Visual Studio Command Prompt.
good luck,
-keen
"Herve MAILLARD" <rv********@free.fr> wrote in message
news:3f**********************@news.free.fr...
Hi,
I have to write a software doing the following :
- Load a file (containing data)
Data will be display in a Treeview and are typed as following
Equipement
Bloc
Tag
It could have for each Equipement, many blocs and for each
bloc, many tags.
It could have also many Equipements.
- Data Importation from a Text file (needed to be compare with the
existing).
- Data modifying (Display in a DataGrid depending of the Treeview
selection
- Undo capability
- Save configuration file
I don't really know the best way to do this.
So far , I have coded 3 classes Equipement, Bloc and Tag.
The I use Class Array to store informations.
To save the configuration file, I use serialisation and write an Xml file.
I do the same to load the config file (using load Xml and Deserialise
method).
For the Datagrid, I use Dataset, filled by my Class Array...
To update the Array class (if the user made some changes in the Datagrid),
I use the GetChanges() method.
Is it the good way ?
Is it a better way ?
It's my first "big" software with .NET so it's a little bit difficult for
me...
Thanks,
H. MAILLARD