Fixed Issue 57.
authormoel.mich
Sat, 15 May 2010 10:48:28 +0000
changeset 11362a2848ec0a6
parent 112 69d29f1a2307
child 114 69dfa910e628
Fixed Issue 57.
GUI/MainForm.cs
     1.1 --- a/GUI/MainForm.cs	Sat May 15 10:38:47 2010 +0000
     1.2 +++ b/GUI/MainForm.cs	Sat May 15 10:48:28 2010 +0000
     1.3 @@ -96,7 +96,12 @@
     1.4  
     1.5        Width = Utilities.Config.Get("mainForm.Width", Width);
     1.6        Height = Utilities.Config.Get("mainForm.Height", Height);
     1.7 -         
     1.8 +
     1.9 +      foreach (TreeColumn column in treeView.Columns) 
    1.10 +        column.Width = Math.Max(20, Math.Min(400, 
    1.11 +          Config.Get("treeView.Columns." + column.Header + ".Width",
    1.12 +          column.Width)));
    1.13 +
    1.14        treeModel = new TreeModel();
    1.15        root = new Node(System.Environment.MachineName);
    1.16        root.Image = Utilities.EmbeddedResources.GetImage("computer.png");
    1.17 @@ -267,6 +272,10 @@
    1.18          Config.Set("mainForm.Height", Height);
    1.19        }
    1.20  
    1.21 +      foreach (TreeColumn column in treeView.Columns) 
    1.22 +        Config.Set("treeView.Columns." + column.Header + ".Width", 
    1.23 +          column.Width);
    1.24 +
    1.25        timer.Enabled = false;
    1.26  
    1.27        sensorSystemTray.Dispose();