Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/11/10 14:45:25 (15 years ago)
Author:
swagner
Message:

Implemented reviewers' comments (#893)

  • enhanced optimizer settings to customize appearance
Location:
trunk/sources/HeuristicLab.Optimizer/3.3
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/OperatorsMenuItem.cs

    r3298 r3768  
    7373        operatorsSidebar.Dock = DockStyle.Left;
    7474        operatorsSidebar.Show();
     75        operatorsSidebar.Collapsed = Properties.Settings.Default.CollapseOperatorsSidebar;
    7576      } else if (view.IsShown) {
    7677        view.Hide();
  • trunk/sources/HeuristicLab.Optimizer/3.3/OptimizerMainForm.cs

    r3741 r3768  
    6969      ContentManager.Initialize(new PersistenceContentManager());
    7070
     71      WindowState = Properties.Settings.Default.ShowMaximized ? FormWindowState.Maximized : FormWindowState.Normal;
     72
    7173      clipboard = new Clipboard<IItem>();
    7274      clipboard.Dock = DockStyle.Left;
     75      clipboard.Collapsed = Properties.Settings.Default.CollapseClipboard;
    7376      if (Properties.Settings.Default.ShowClipboard) {
    7477        clipboard.Show();
     
    7881        operatorsSidebar.Dock = DockStyle.Left;
    7982        operatorsSidebar.Show();
     83        operatorsSidebar.Collapsed = Properties.Settings.Default.CollapseOperatorsSidebar;
    8084      }
    8185      if (Properties.Settings.Default.ShowStartPage) {
     
    9195          e.Cancel = true;
    9296      }
     97    }
     98    protected override void OnClosed(EventArgs e) {
     99      base.OnClosed(e);
     100      Properties.Settings.Default.ShowMaximized = WindowState == FormWindowState.Maximized;
     101      Properties.Settings.Default.CollapseClipboard = clipboard.Collapsed;
     102      OperatorsSidebar operatorsSidebar = MainFormManager.MainForm.Views.OfType<OperatorsSidebar>().FirstOrDefault();
     103      if (operatorsSidebar != null) Properties.Settings.Default.CollapseOperatorsSidebar = operatorsSidebar.Collapsed;
     104      Properties.Settings.Default.Save();
    93105    }
    94106
  • trunk/sources/HeuristicLab.Optimizer/3.3/Properties/Settings.Designer.cs

    r3292 r3768  
    22// <auto-generated>
    33//     This code was generated by a tool.
    4 //     Runtime Version:2.0.50727.4927
     4//     Runtime Version:2.0.50727.4200
    55//
    66//     Changes to this file may cause incorrect behavior and will be lost if
     
    5959            }
    6060        }
     61       
     62        [global::System.Configuration.UserScopedSettingAttribute()]
     63        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     64        [global::System.Configuration.DefaultSettingValueAttribute("True")]
     65        public bool ShowMaximized {
     66            get {
     67                return ((bool)(this["ShowMaximized"]));
     68            }
     69            set {
     70                this["ShowMaximized"] = value;
     71            }
     72        }
     73       
     74        [global::System.Configuration.UserScopedSettingAttribute()]
     75        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     76        [global::System.Configuration.DefaultSettingValueAttribute("True")]
     77        public bool CollapseClipboard {
     78            get {
     79                return ((bool)(this["CollapseClipboard"]));
     80            }
     81            set {
     82                this["CollapseClipboard"] = value;
     83            }
     84        }
     85       
     86        [global::System.Configuration.UserScopedSettingAttribute()]
     87        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     88        [global::System.Configuration.DefaultSettingValueAttribute("False")]
     89        public bool CollapseOperatorsSidebar {
     90            get {
     91                return ((bool)(this["CollapseOperatorsSidebar"]));
     92            }
     93            set {
     94                this["CollapseOperatorsSidebar"] = value;
     95            }
     96        }
    6197    }
    6298}
  • trunk/sources/HeuristicLab.Optimizer/3.3/Properties/Settings.settings

    r3292 r3768  
    1212      <Value Profile="(Default)">True</Value>
    1313    </Setting>
     14    <Setting Name="ShowMaximized" Type="System.Boolean" Scope="User">
     15      <Value Profile="(Default)">True</Value>
     16    </Setting>
     17    <Setting Name="CollapseClipboard" Type="System.Boolean" Scope="User">
     18      <Value Profile="(Default)">True</Value>
     19    </Setting>
     20    <Setting Name="CollapseOperatorsSidebar" Type="System.Boolean" Scope="User">
     21      <Value Profile="(Default)">False</Value>
     22    </Setting>
    1423  </Settings>
    1524</SettingsFile>
  • trunk/sources/HeuristicLab.Optimizer/3.3/app.config

    r3292 r3768  
    1717                <value>True</value>
    1818            </setting>
     19            <setting name="ShowMaximized" serializeAs="String">
     20                <value>True</value>
     21            </setting>
     22            <setting name="CollapseClipboard" serializeAs="String">
     23                <value>True</value>
     24            </setting>
     25            <setting name="CollapseOperatorsSidebar" serializeAs="String">
     26                <value>False</value>
     27            </setting>
    1928        </HeuristicLab.Optimizer.Properties.Settings>
    2029    </userSettings>
Note: See TracChangeset for help on using the changeset viewer.