Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2708


Ignore:
Timestamp:
01/28/10 21:28:07 (15 years ago)
Author:
swagner
Message:

Adapted HL 3.3 plugins according to changes in MainForm (#857)

Location:
trunk/sources
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs

    r2694 r2708  
    156156        T item = (T)itemsListView.SelectedItems[0].Tag;
    157157        IView view = MainFormManager.CreateDefaultView(item);
    158         if (view != null) MainFormManager.MainForm.ShowView(view);
     158        if (view != null) view.Show();
    159159      }
    160160    }
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs

    r2694 r2708  
    186186        T item = (T)itemsListView.SelectedItems[0].Tag;
    187187        IView view = MainFormManager.CreateDefaultView(item);
    188         if (view != null) MainFormManager.MainForm.ShowView(view);
     188        if (view != null) view.Show();
    189189      }
    190190    }
  • trunk/sources/HeuristicLab.Core.Views/3.3/ObjectView.cs

    r2676 r2708  
    3535  /// Base class for all visual representations.
    3636  /// </summary>
    37   public partial class ObjectView : ViewBase, IObjectView {
     37  public partial class ObjectView : HeuristicLab.MainForm.WindowsForms.View, IObjectView {
    3838    private object obj;
    3939    /// <summary>
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorTreeView.cs

    r2694 r2708  
    366366    private void viewToolStripMenuItem_Click(object sender, EventArgs e) {
    367367      IView view = ((ToolStripMenuItem)sender).Tag as IView;
    368       if (view != null) MainFormManager.MainForm.ShowView(view);
     368      if (view != null) view.Show();
    369369    }
    370370    private void breakpointToolStripMenuItem_Click(object sender, EventArgs e) {
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorsSidebar.cs

    r2676 r2708  
    3131using HeuristicLab.MainForm.WindowsForms;
    3232
    33 namespace HeuristicLab.Core.Views { 
    34   public partial class OperatorsSidebar : ViewBase {
     33namespace HeuristicLab.Core.Views {
     34  public partial class OperatorsSidebar : HeuristicLab.MainForm.WindowsForms.View {
    3535    public OperatorsSidebar() {
    3636      InitializeComponent();
     
    4141    }
    4242
    43     public override void OnClosing(object sender, CancelEventArgs e) {
    44       base.OnClosing(sender, e);
     43    protected override void OnClosing(FormClosingEventArgs e) {
     44      base.OnClosing(e);
    4545      e.Cancel = true;
    46       MainFormManager.MainForm.HideView(this);
     46      this.Hide();
    4747    }
    4848  }
  • trunk/sources/HeuristicLab.Core.Views/3.3/ViewHost.cs

    r2694 r2708  
    9898
    9999    private void viewsLabel_DoubleClick(object sender, EventArgs e) {
    100       MainFormManager.MainForm.ShowView(MainFormManager.CreateView(viewPanel.Tag.GetType(), Object));
     100      MainFormManager.CreateView(viewPanel.Tag.GetType(), Object).Show();
    101101    }
    102102    protected void contextMenuStrip_ItemClicked(object sender, ToolStripItemClickedEventArgs e) {
  • trunk/sources/HeuristicLab.Optimizer/3.3/FileManager.cs

    r2665 r2708  
    6060            newDocumentsCounter++;
    6161          }
    62           MainFormManager.MainForm.ShowView(view);
     62          view.Show();
    6363        }
    6464      }
     
    197197                  view.Caption = Path.GetFileName(filename);
    198198                  files.Add(view, new FileInfo(filename));
    199                   MainFormManager.MainForm.ShowView(view);
     199                  view.Show();
    200200                }
    201201              });
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CloseAllMenuItem.cs

    r2546 r2708  
    1010
    1111namespace HeuristicLab.Optimizer.MenuItems {
    12   internal class CloseAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
     12  internal class CloseAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider {
    1313    public override string Name {
    1414      get { return "Clos&e All"; }
     
    2020      get { return 1700; }
    2121    }
     22    public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle {
     23      get { return ToolStripItemDisplayStyle.Text; }
     24    }
    2225
    23     public override void MainFormInitialized(object sender, EventArgs e) {
     26    protected override void OnToolStripItemSet(EventArgs e) {
    2427      ToolStripItem.Enabled = false;
    2528    }
    26     public override void ActiveViewChanged(object sender, EventArgs e) {
     29    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    2730      ToolStripItem.Enabled = MainFormManager.MainForm.Views.FirstOrDefault() != null;
    2831    }
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CloseMenuItem.cs

    r2546 r2708  
    1010
    1111namespace HeuristicLab.Optimizer.MenuItems {
    12   internal class CloseMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
     12  internal class CloseMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider {
    1313    public override string Name {
    1414      get { return "&Close"; }
     
    2020      get { return 1600; }
    2121    }
     22    public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle {
     23      get { return ToolStripItemDisplayStyle.Text; }
     24    }
    2225
    23     public override void MainFormInitialized(object sender, EventArgs e) {
     26    protected override void OnToolStripItemSet(EventArgs e) {
    2427      ToolStripItem.Enabled = false;
    2528    }
    26     public override void ActiveViewChanged(object sender, EventArgs e) {
     29    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    2730      ToolStripItem.Enabled = MainFormManager.MainForm.Views.FirstOrDefault() != null;
    2831    }
    2932
    3033    public override void Execute() {
    31       MainFormManager.MainForm.CloseView(MainFormManager.MainForm.ActiveView);
     34      MainFormManager.MainForm.ActiveView.Close();
    3235    }
    3336  }
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/ExitMenuItem.cs

    r2546 r2708  
    1010
    1111namespace HeuristicLab.Optimizer.MenuItems {
    12   internal class ExitMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
     12  internal class ExitMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider {
    1313    public override IEnumerable<string> Structure {
    1414      get { return new string[] { "&File" }; }
     
    1919    public override int Position {
    2020      get { return 1999; }
     21    }
     22    public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle {
     23      get { return ToolStripItemDisplayStyle.Text; }
    2124    }
    2225    public override Keys ShortCutKeys {
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/NewMenuItem.cs

    r2546 r2708  
    99
    1010namespace HeuristicLab.Optimizer.MenuItems {
    11   internal class NewMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
     11  internal class NewMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider {
    1212    public override string Name {
    1313      get { return "&New..."; }
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/OpenMenuItem.cs

    r2546 r2708  
    99
    1010namespace HeuristicLab.Optimizer.MenuItems {
    11   internal class OpenMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
     11  internal class OpenMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider {
    1212    public override string Name {
    1313      get { return "&Open..."; }
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/OperatorsMenuItem.cs

    r2656 r2708  
    1212
    1313namespace HeuristicLab.Optimizer.MenuItems {
    14   internal class OperatorsMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
     14  internal class OperatorsMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider {
    1515    private OperatorsSidebar view;
    1616    private ToolStripMenuItem menuItem;
     
    2929    }
    3030
    31     public override void MainFormInitialized(object sender, EventArgs e) {
     31    protected override void OnToolStripItemSet(EventArgs e) {
    3232      view = new OperatorsSidebar();
    3333      view.Dock = DockStyle.Left;
     
    3939        menuItem.CheckOnClick = true;
    4040      }
    41       MainFormManager.MainForm.ShowView(view);
     41      view.Show();
    4242    }
    4343
     
    5050      if (menuItem != null) {
    5151        if (menuItem.Checked)
    52           MainFormManager.MainForm.ShowView(view);
     52          view.Show();
    5353        else
    54           MainFormManager.MainForm.HideView(view);
     54          view.Hide();
    5555      } else {
    56         MainFormManager.MainForm.ShowView(view);
     56        view.Show();
    5757      }
    5858    }
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAllMenuItem.cs

    r2656 r2708  
    1212
    1313namespace HeuristicLab.Optimizer.MenuItems {
    14   internal class SaveAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
     14  internal class SaveAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider {
    1515    public override string Name {
    1616      get { return "Save Al&l"; }
     
    2929    }
    3030
    31     public override void MainFormInitialized(object sender, EventArgs e) {
     31    protected override void OnToolStripItemSet(EventArgs e) {
    3232      ToolStripItem.Enabled = false;
    3333    }
    34     public override void ActiveViewChanged(object sender, EventArgs e) {
     34    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    3535      var views = from v in MainFormManager.MainForm.Views
    3636                  where v is IObjectView
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAsMenuItem.cs

    r2656 r2708  
    1212
    1313namespace HeuristicLab.Optimizer.MenuItems {
    14   internal class SaveAsMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
     14  internal class SaveAsMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider {
    1515    public override string Name {
    1616      get { return "Save &As..."; }
     
    2929    }
    3030
    31     public override void MainFormInitialized(object sender, EventArgs e) {
     31    protected override void OnToolStripItemSet(EventArgs e) {
    3232      ToolStripItem.Enabled = false;
    3333    }
    34     public override void ActiveViewChanged(object sender, EventArgs e) {
     34    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    3535      IObjectView activeView = MainFormManager.MainForm.ActiveView as IObjectView;
    3636      ToolStripItem.Enabled = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Object.GetType())));
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveMenuItem.cs

    r2656 r2708  
    1212
    1313namespace HeuristicLab.Optimizer.MenuItems {
    14   internal class SaveMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
     14  internal class SaveMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider {
    1515    public override string Name {
    1616      get { return "&Save"; }
     
    3232    }
    3333
    34     public override void MainFormInitialized(object sender, EventArgs e) {
     34    protected override void OnToolStripItemSet(EventArgs e) {
    3535      ToolStripItem.Enabled = false;
    3636    }
    37     public override void ActiveViewChanged(object sender, EventArgs e) {
     37    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    3838      IObjectView activeView = MainFormManager.MainForm.ActiveView as IObjectView;
    3939      ToolStripItem.Enabled = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Object.GetType())));
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/Separators.cs

    r2546 r2708  
    1010
    1111namespace HeuristicLab.Optimizer.MenuItems {
    12   internal class SeparatorMenuItem : MenuSeparatorItemBase, IOptimizerUserInterfaceItemProvider {
     12  internal class SeparatorMenuItem : MenuSeparatorItem, IOptimizerUserInterfaceItemProvider {
    1313    public override IEnumerable<string> Structure {
    1414      get { return new string[] { "&File" }; }
  • trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/NewToolBarItem.cs

    r2546 r2708  
    1010
    1111namespace HeuristicLab.Optimizer {
    12   internal class NewToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, IOptimizerUserInterfaceItemProvider {
     12  internal class NewToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem, IOptimizerUserInterfaceItemProvider {
    1313    public override string Name {
    1414      get { return "New..."; }
  • trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/OpenToolBarItem.cs

    r2546 r2708  
    1010
    1111namespace HeuristicLab.Optimizer {
    12   internal class OpenToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, IOptimizerUserInterfaceItemProvider {
     12  internal class OpenToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem, IOptimizerUserInterfaceItemProvider {
    1313    public override string Name {
    1414      get { return "Open..."; }
  • trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveAllToolBarItem.cs

    r2656 r2708  
    1212
    1313namespace HeuristicLab.Optimizer {
    14   internal class SaveAllToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, IOptimizerUserInterfaceItemProvider {
     14  internal class SaveAllToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem, IOptimizerUserInterfaceItemProvider {
    1515    public override string Name {
    1616      get { return "Save All"; }
     
    2626    }
    2727
    28     public override void MainFormInitialized(object sender, EventArgs e) {
     28    protected override void OnToolStripItemSet(EventArgs e) {
    2929      ToolStripItem.Enabled = false;
    3030    }
    31     public override void ActiveViewChanged(object sender, EventArgs e) {
     31    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    3232      var views = from v in MainFormManager.MainForm.Views
    3333                  where v is IObjectView
  • trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveToolBarItem.cs

    r2656 r2708  
    1212
    1313namespace HeuristicLab.Optimizer {
    14   internal class SaveToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, IOptimizerUserInterfaceItemProvider {
     14  internal class SaveToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem, IOptimizerUserInterfaceItemProvider {
    1515    public override string Name {
    1616      get { return "Save"; }
     
    2626    }
    2727
    28     public override void MainFormInitialized(object sender, EventArgs e) {
     28    protected override void OnToolStripItemSet(EventArgs e) {
    2929      ToolStripItem.Enabled = false;
    3030    }
    31     public override void ActiveViewChanged(object sender, EventArgs e) {
     31    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    3232      IObjectView activeView = MainFormManager.MainForm.ActiveView as IObjectView;
    3333      ToolStripItem.Enabled = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Object.GetType())));
Note: See TracChangeset for help on using the changeset viewer.