Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/10/09 12:06:45 (15 years ago)
Author:
mkommend
Message:

SingleDocumentMainForm shows open froms in taskbar
removed bool listen members from !IToolStripItem
(ticket #716)

Location:
trunk/sources/HeuristicLab.MainForm/3.2
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm/3.2/DockingMainForm.cs

    r2268 r2269  
    5050        dockForm.FormClosing += new FormClosingEventHandler(view.FormClosing);
    5151        dockForm.FormClosed += new FormClosedEventHandler(DockFormClosed);
    52         foreach (IToolStripItem item in ViewChangedToolStripItems)
     52        foreach (IToolStripItem item in ToolStripItems)
    5353          view.StateChanged += new EventHandler(item.ViewChanged);
    5454        dockForm.Show(dockPanel);
     
    6464      dockForm.FormClosing -= new FormClosingEventHandler(dockForm.View.FormClosing);
    6565      dockForm.FormClosed -= new FormClosedEventHandler(DockFormClosed);
    66       foreach (IToolStripItem item in ViewChangedToolStripItems)
     66      foreach (IToolStripItem item in ToolStripItems)
    6767        dockForm.View.StateChanged -= new EventHandler(item.ViewChanged);
    6868    }
  • trunk/sources/HeuristicLab.MainForm/3.2/Interfaces/IToolStripItem.cs

    r2256 r2269  
    3838    ToolStripItem ToolStripItem { get; set; }
    3939
    40     bool ListenActiveViewChanged { get; }
    41     bool ListenViewChanged { get; }
    4240    void ActiveViewChanged(object sender, EventArgs e);
    4341    void ViewChanged(object sender, EventArgs e);
  • trunk/sources/HeuristicLab.MainForm/3.2/MainFormBase.cs

    r2268 r2269  
    3737      InitializeComponent();
    3838      views = new List<IView>();
    39       viewChangeToolStripItems = new List<IToolStripItem>();
     39      toolStripItems = new List<IToolStripItem>();
    4040    }
    4141
     
    8787    }
    8888
    89     private List<IToolStripItem> viewChangeToolStripItems;
    90     protected IEnumerable<IToolStripItem> ViewChangedToolStripItems {
    91       get { return this.viewChangeToolStripItems; }
     89    private List<IToolStripItem> toolStripItems;
     90    protected IEnumerable<IToolStripItem> ToolStripItems {
     91      get { return this.toolStripItems; }
    9292    }
    9393
     
    156156    }
    157157
    158     private ToolStripDropDownItem FindParent(IToolStripItem item, ToolStripItemCollection parentItems) {     
     158    private ToolStripDropDownItem FindParent(IToolStripItem item, ToolStripItemCollection parentItems) {
    159159      if (String.IsNullOrEmpty(item.Structure))
    160160        return null;
     
    178178      toolStripItem.Image = iToolStripItem.Image;
    179179      toolStripItem.DisplayStyle = iToolStripItem.DisplayStyle;
    180       if (iToolStripItem.ListenActiveViewChanged)
    181         this.ActiveViewChanged += new EventHandler(iToolStripItem.ActiveViewChanged);
    182       if (iToolStripItem.ListenViewChanged)
    183         this.viewChangeToolStripItems.Add(iToolStripItem);
     180      this.ActiveViewChanged += new EventHandler(iToolStripItem.ActiveViewChanged);   
    184181      toolStripItem.Click += new EventHandler(ToolStripItemClicked);
     182      this.toolStripItems.Add(iToolStripItem);
    185183      iToolStripItem.ToolStripItem = toolStripItem;
    186184    }
  • trunk/sources/HeuristicLab.MainForm/3.2/MultipleDocumentMainForm.cs

    r2268 r2269  
    5757        form.FormClosed += new FormClosedEventHandler(MultipleDocumentFormClosed);
    5858        form.MdiParent = this;
    59         foreach (IToolStripItem item in ViewChangedToolStripItems)
     59        foreach (IToolStripItem item in ToolStripItems)
    6060          view.StateChanged += new EventHandler(item.ViewChanged);
    6161        form.Show();
     
    7676      form.FormClosing -= new FormClosingEventHandler(form.View.FormClosing);
    7777      form.FormClosed -= new FormClosedEventHandler(MultipleDocumentFormClosed);
    78       foreach (IToolStripItem item in ViewChangedToolStripItems)
     78      foreach (IToolStripItem item in ToolStripItems)
    7979        form.View.StateChanged -= new EventHandler(item.ViewChanged);
    8080    }
  • trunk/sources/HeuristicLab.MainForm/3.2/SingleDocumentMainForm.cs

    r2268 r2269  
    4747        base.ShowView(view);
    4848        DocumentForm form = new DocumentForm(view);
     49        form.ShowInTaskbar = true;
    4950        form.Activated += new EventHandler(DockFormActivated);
    5051        form.FormClosing += new FormClosingEventHandler(view.FormClosing);
    5152        form.FormClosed += new FormClosedEventHandler(DockFormClosed);
    52         foreach (IToolStripItem item in ViewChangedToolStripItems)
     53        foreach (IToolStripItem item in ToolStripItems)
    5354          view.StateChanged += new EventHandler(item.ViewChanged);
    5455        form.Show(this);
     
    6465      form.FormClosing -= new FormClosingEventHandler(form.View.FormClosing);
    6566      form.FormClosed -= new FormClosedEventHandler(DockFormClosed);
    66       foreach (IToolStripItem item in ViewChangedToolStripItems)
     67      foreach (IToolStripItem item in ToolStripItems)
    6768        form.View.StateChanged -= new EventHandler(item.ViewChanged);
    6869    }
  • trunk/sources/HeuristicLab.MainForm/3.2/ToolStripItemBase.cs

    r2256 r2269  
    5656    }
    5757
    58     public virtual bool ListenActiveViewChanged {
    59       get { return false; }
    60     }
    61     public virtual bool ListenViewChanged {
    62       get { return false; }
    63     }
    64 
    6558    public virtual void ActiveViewChanged(object sender, EventArgs e) {
    6659    }
Note: See TracChangeset for help on using the changeset viewer.