Application settings

Topics: CAB & Smart Client Software Factory
Aug 26, 2007 at 12:44 PM
I've Smart Client MDI application. I need to set to every child window some application settings like location or size.

What's a good pattern?

Sep 7, 2007 at 7:51 PM
We are not aware of any special pattern for arranging MDI windows. However, as in any MDI .NET application, you can use the following methods to arrange the child Windows as you typically do in many Windows applications:

Please let me know if this helps!

Mariano Converti
Sep 9, 2007 at 9:03 AM
Mariano, thanks!!!
Sorry fo my bad english
I've such solve.
1) I've set to _LayoutView some application settings: location and size.
app.config file :

<setting name="TreeLocation" serializeAs="String">
<value>0, 0</value>
<setting name="TreeSize" serializeAs="String">
<value>500, 800</value>

2) on ParentForm_FormClosing method
Settings.Default.TreeLocation = workItem.ParentForm.Location;
Settings.Default.TreeSize = workItem.ParentForm.Size;

3) LayoutView realizes ISmartPartInfoProvider interface:
ISmartPartInfo ISmartPartInfoProvider.GetSmartPartInfo(Type smartPartInfoType)
_LayoutView.Location = this.Location;
_LayoutView.Height = this.Height;
_LayoutView.Width = this.Width;

Everything works fine. But, my project has a lot of business modules with views and there're need to do this work every time.
I think how to optimize it process now.