Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/09/10 02:04:57 (15 years ago)
Author:
swagner
Message:

Implemented reviewers' comments (#893).

Location:
trunk/sources/HeuristicLab.Optimizer/3.3
Files:
5 edited

Legend:

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

    r3163 r3290  
    4848      if (menuItem != null) {
    4949        menuItem.CheckOnClick = true;
    50         menuItem.Checked = true;
     50        menuItem.Checked = Properties.Settings.Default.ShowOperatorsSidebar;
    5151      }
    5252    }
    5353
    5454    private void MainForm_ViewShown(object sender, ViewShownEventArgs e) {
    55       if ((e.View is OperatorsSidebar) && (menuItem != null))
     55      if ((e.View is OperatorsSidebar) && (menuItem != null)) {
    5656        menuItem.Checked = true;
     57        Properties.Settings.Default.ShowOperatorsSidebar = true;
     58        Properties.Settings.Default.Save();
     59      }
    5760    }
    5861    private void MainForm_ViewHidden(object sender, ViewEventArgs e) {
    59       if ((e.View is OperatorsSidebar) && (menuItem != null))
     62      if ((e.View is OperatorsSidebar) && (menuItem != null)) {
    6063        menuItem.Checked = false;
     64        Properties.Settings.Default.ShowOperatorsSidebar = false;
     65        Properties.Settings.Default.Save();
     66      }
    6167    }
    6268
    6369    public override void Execute() {
    6470      var view = MainFormManager.MainForm.Views.OfType<OperatorsSidebar>().FirstOrDefault();
    65       if (view.IsShown)
     71      if (view == null) {
     72        OperatorsSidebar operatorsSidebar = new OperatorsSidebar();
     73        operatorsSidebar.Dock = DockStyle.Left;
     74        operatorsSidebar.Show();
     75      } else if (view.IsShown) {
    6676        view.Hide();
    67       else
     77      } else {
    6878        view.Show();
     79      }
    6980    }
    7081  }
  • trunk/sources/HeuristicLab.Optimizer/3.3/OptimizerMainForm.cs

    r3163 r3290  
    4747      if (version != null) Title += " " + version.Version;
    4848      ViewClosed += new EventHandler<ViewEventArgs>(FileManager.ViewClosed);
    49       OperatorsSidebar operatorsSidebar = new OperatorsSidebar();
    50       operatorsSidebar.Dock = DockStyle.Left;
    51       operatorsSidebar.Show();
     49      if (Properties.Settings.Default.ShowOperatorsSidebar) {
     50        OperatorsSidebar operatorsSidebar = new OperatorsSidebar();
     51        operatorsSidebar.Dock = DockStyle.Left;
     52        operatorsSidebar.Show();
     53      }
    5254      if (Properties.Settings.Default.ShowStartPage) {
    5355        StartPage startPage = new StartPage();
  • trunk/sources/HeuristicLab.Optimizer/3.3/Properties/Settings.Designer.cs

    r3163 r3290  
    3535            }
    3636        }
     37       
     38        [global::System.Configuration.UserScopedSettingAttribute()]
     39        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     40        [global::System.Configuration.DefaultSettingValueAttribute("False")]
     41        public bool ShowOperatorsSidebar {
     42            get {
     43                return ((bool)(this["ShowOperatorsSidebar"]));
     44            }
     45            set {
     46                this["ShowOperatorsSidebar"] = value;
     47            }
     48        }
    3749    }
    3850}
  • trunk/sources/HeuristicLab.Optimizer/3.3/Properties/Settings.settings

    r3163 r3290  
    66      <Value Profile="(Default)">True</Value>
    77    </Setting>
     8    <Setting Name="ShowOperatorsSidebar" Type="System.Boolean" Scope="User">
     9      <Value Profile="(Default)">False</Value>
     10    </Setting>
    811  </Settings>
    912</SettingsFile>
  • trunk/sources/HeuristicLab.Optimizer/3.3/app.config

    r3163 r3290  
    1111                <value>True</value>
    1212            </setting>
     13            <setting name="ShowOperatorsSidebar" serializeAs="String">
     14                <value>False</value>
     15            </setting>
    1316        </HeuristicLab.Optimizer.Properties.Settings>
    1417    </userSettings>
Note: See TracChangeset for help on using the changeset viewer.