Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2252 for trunk


Ignore:
Timestamp:
08/06/09 17:19:11 (15 years ago)
Author:
mkommend
Message:

fixed view docking (ticket #716)

Location:
trunk/sources
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm.Test/3.2/Actions/NewEditorAction.cs

    r2250 r2252  
    1111    public void Execute(IMainForm mainform) {
    1212      mainform.StatusStripText = "New Editor action called";
    13       mainform.ShowView(new EditorView());
     13      EditorView x = new EditorView();
     14      x.Caption = "Editor View";
     15      mainform.ShowView(x);
    1416    }
    1517
  • trunk/sources/HeuristicLab.MainForm.Test/3.2/Actions/NewFormAction.cs

    r2250 r2252  
    1010
    1111    public void Execute(IMainForm mainform) {
    12       mainform.ShowView(new FormView());
     12      mainform.StatusStripText = "New form called";
     13      FormView x = new FormView();
     14      x.Caption = "FormView";
     15      mainform.ShowView(x);
    1316    }
    1417
  • trunk/sources/HeuristicLab.MainForm.Test/3.2/FormView.cs

    r2250 r2252  
    1010namespace HeuristicLab.MainForm.Test {
    1111  public partial class FormView : ViewBase {
     12    private int[] array;
    1213    public FormView() {
    1314      InitializeComponent();
  • trunk/sources/HeuristicLab.MainForm/3.2/DockForm.Designer.cs

    r2250 r2252  
    6161      this.viewPanel.TabIndex = 0;
    6262      //
    63       // ViewForm
     63      // DockForm
    6464      //
    6565      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     
    6767      this.ClientSize = new System.Drawing.Size(632, 446);
    6868      this.Controls.Add(this.viewPanel);
    69       this.DockAreas = ((WeifenLuo.WinFormsUI.Docking.DockAreas)(((((WeifenLuo.WinFormsUI.Docking.DockAreas.Float | WeifenLuo.WinFormsUI.Docking.DockAreas.DockLeft)
    70             | WeifenLuo.WinFormsUI.Docking.DockAreas.DockRight)
    71             | WeifenLuo.WinFormsUI.Docking.DockAreas.DockTop)
    72             | WeifenLuo.WinFormsUI.Docking.DockAreas.DockBottom
    73             | WeifenLuo.WinFormsUI.Docking.DockAreas.Document)));
     69      this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
    7470      this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
    75       this.Name = "ViewForm";
     71      this.Name = "DockForm";
    7672      this.ShowIcon = false;
    7773      this.ShowInTaskbar = false;
    7874      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
    79       this.TabText = "View";
    80       this.Text = "View";
    8175      this.ResumeLayout(false);
    8276    }
  • trunk/sources/HeuristicLab.MainForm/3.2/DockingMainForm.cs

    r2250 r2252  
    3737      dockPanel = new DockPanel();
    3838      InitializeDockPanel();
     39      this.IsMdiContainer = true;
    3940      this.Controls.Add(dockPanel);
     41      this.Controls.SetChildIndex(dockPanel, 0);
    4042    }
    4143
     
    4345
    4446    public override void ShowView(IView view) {
    45       base.ShowView(view);
     47     
    4648      if (InvokeRequired) Invoke((Action<IView>)ShowView, view);
    4749      else {
     50        base.ShowView(view);
    4851        DockContent content = new DockForm(view);
    49         content.TabText = content.Text;
    5052        content.Activated += new EventHandler(DockFormActivated);
    5153        content.FormClosing += new FormClosingEventHandler(DockFormClosing);
    52         content.Show(dockPanel, DockState.Document);
     54        content.Show(dockPanel);
    5355      }
    5456    }
     
    5759      DockForm dockForm = (DockForm)sender;
    5860      openViews.Remove(dockForm.View);
     61      dockForm.Activated -= new EventHandler(DockFormActivated);
     62      dockForm.FormClosing -= new FormClosingEventHandler(DockFormClosing);
    5963    }
    6064
    6165    private void DockFormActivated(object sender, EventArgs e) {
    6266      base.activeView = ((DockForm)sender).View;
     67      base.StatusStripText = ((DockForm)sender).View.Caption;
    6368    }
    6469
     
    9095      this.dockPanel.Name = "dockPanel";
    9196      this.dockPanel.RightToLeftLayout = true;
    92       this.dockPanel.Size = new Size(1016, 663);
    93       this.dockPanel.DocumentStyle = DocumentStyle.DockingWindow;
    9497      dockPanelGradient1.EndColor = SystemColors.ControlLight;
    9598      dockPanelGradient1.StartColor = SystemColors.ControlLight;
Note: See TracChangeset for help on using the changeset viewer.