protected override void OnInitialized(EventArgs e) {
      base.OnInitialized(e);

      AssemblyFileVersionAttribute version = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyFileVersionAttribute), true).
                                         Cast<AssemblyFileVersionAttribute>().FirstOrDefault();
      title = "HeuristicLab Optimizer";
      if (version != null) title += " " + version.Version;
      Title = title;

      ContentManager.Initialize(new PersistenceContentManager());

      clipboard = new Clipboard<IItem>();
      clipboard.Dock = DockStyle.Left;
      clipboard.Collapsed = Properties.Settings.Default.CollapseClipboard;
      if (Properties.Settings.Default.ShowClipboard) {
        clipboard.Show();
      }
      if (Properties.Settings.Default.ShowOperatorsSidebar) {
        OperatorsSidebar operatorsSidebar = new OperatorsSidebar();
        operatorsSidebar.Dock = DockStyle.Left;
        operatorsSidebar.Show();
        operatorsSidebar.Collapsed = Properties.Settings.Default.CollapseOperatorsSidebar;
      }
      if (Properties.Settings.Default.ShowStartPage) {
        StartPage startPage = new StartPage();
        startPage.Show();
      }
    }
Exemplo n.º 2
0
 public override void Execute() {
   var view = MainFormManager.MainForm.Views.OfType<OperatorsSidebar>().FirstOrDefault();
   if (view == null) {
     OperatorsSidebar operatorsSidebar = new OperatorsSidebar();
     operatorsSidebar.Dock = DockStyle.Left;
     operatorsSidebar.Show();
     operatorsSidebar.Collapsed = Properties.Settings.Default.CollapseOperatorsSidebar;
   } else if (view.IsShown) {
     view.Hide();
   } else {
     view.Show();
   }
 }