Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2250 for trunk/sources


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

tried to add docking views - not working right now (ticket #716)

Location:
trunk/sources
Files:
6 added
9 edited
1 copied

Legend:

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

    r2249 r2250  
    1111    public void Execute(IMainForm mainform) {
    1212      mainform.StatusStripText = "New Editor action called";
     13      mainform.ShowView(new EditorView());
    1314    }
    1415
  • trunk/sources/HeuristicLab.MainForm.Test/3.2/Actions/NewFormAction.cs

    r2249 r2250  
    1010
    1111    public void Execute(IMainForm mainform) {
    12       mainform.StatusStripText = "New Form action called";
     12      mainform.ShowView(new FormView());
    1313    }
    1414
  • trunk/sources/HeuristicLab.MainForm.Test/3.2/HeuristicLab.MainForm.Test-3.2.csproj

    r2249 r2250  
    8787    <Compile Include="ButtonItems\SaveToolStripButtonItem.cs" />
    8888    <Compile Include="ButtonItems\OpenToolStripButtonItem.cs" />
     89    <Compile Include="EditorView.cs">
     90      <SubType>UserControl</SubType>
     91    </Compile>
     92    <Compile Include="EditorView.Designer.cs">
     93      <DependentUpon>EditorView.cs</DependentUpon>
     94    </Compile>
     95    <Compile Include="FormView.cs">
     96      <SubType>UserControl</SubType>
     97    </Compile>
     98    <Compile Include="FormView.Designer.cs">
     99      <DependentUpon>FormView.cs</DependentUpon>
     100    </Compile>
     101    <Compile Include="MenuItems\ExitToolStripMenuItem.cs" />
    89102    <Compile Include="MenuItems\NewFormToolStripMenuItem.cs" />
    90103    <Compile Include="MenuItems\NewEditorToolStripMenuItem.cs" />
     
    122135    <None Include="Properties\AssemblyInfo.frame" />
    123136  </ItemGroup>
     137  <ItemGroup>
     138    <EmbeddedResource Include="EditorView.resx">
     139      <DependentUpon>EditorView.cs</DependentUpon>
     140    </EmbeddedResource>
     141    <EmbeddedResource Include="FormView.resx">
     142      <DependentUpon>FormView.cs</DependentUpon>
     143    </EmbeddedResource>
     144  </ItemGroup>
    124145  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    125146  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  • trunk/sources/HeuristicLab.MainForm.Test/3.2/MenuItems/ExitToolStripMenuItem.cs

    r2249 r2250  
    99
    1010namespace HeuristicLab.MainForm.Test {
    11   public class SaveToolStripMenuItem : ToolStripMenuItemBase, ITestUserInterfaceItemProvider {
     11  public class CloseToolStripMenuItem : ToolStripMenuItemBase, ITestUserInterfaceItemProvider {
    1212    public override string Name {
    13       get { return "Save"; }
     13      get { return "Exit"; }
    1414    }
    1515
     
    1919
    2020    public override int Position {
    21       get { return 1300; }
    22     }
    23 
    24     public override Keys ShortCutKeys {
    25       get { return Keys.Control | Keys.S; }
    26     }
    27 
    28     public override System.Drawing.Image Image {
    29       get { return Resources.SaveIcon; }
     21      get { return 1400; }
    3022    }
    3123
    3224    public override void Execute(IMainForm mainform) {
    33       new SaveAction().Execute(mainform);
     25      mainform.Close();
    3426    }
    3527  }
  • trunk/sources/HeuristicLab.MainForm/3.2/DockForm.Designer.cs

    r2233 r2250  
    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.Document)));
     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)));
    7074      this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
    7175      this.Name = "ViewForm";
     
    7579      this.TabText = "View";
    7680      this.Text = "View";
    77       this.TextChanged += new System.EventHandler(this.ViewForm_TextChanged);
    7881      this.ResumeLayout(false);
    79 
    8082    }
    8183
  • trunk/sources/HeuristicLab.MainForm/3.2/DockForm.cs

    r2233 r2250  
    3636    public DockForm(IView view) {
    3737      InitializeComponent();
    38       this.view = view;
     38      this.view = view;     
    3939      if (View != null) {
    4040        Control control = (Control)View;
     
    6262        Invoke(new MethodInvoker(UpdateText));
    6363      else
    64         Text = View.Caption;
    65     }
    66 
    67     private void ViewForm_TextChanged(object sender, EventArgs e) {
    68       TabText = Text;
     64        TabText = View.Caption;
    6965    }
    7066
  • trunk/sources/HeuristicLab.MainForm/3.2/DockingMainForm.cs

    r2233 r2250  
    4848        DockContent content = new DockForm(view);
    4949        content.TabText = content.Text;
    50         content.Show(dockPanel);
    5150        content.Activated += new EventHandler(DockFormActivated);
    5251        content.FormClosing += new FormClosingEventHandler(DockFormClosing);
     52        content.Show(dockPanel, DockState.Document);
    5353      }
    5454    }
     
    9191      this.dockPanel.RightToLeftLayout = true;
    9292      this.dockPanel.Size = new Size(1016, 663);
     93      this.dockPanel.DocumentStyle = DocumentStyle.DockingWindow;
    9394      dockPanelGradient1.EndColor = SystemColors.ControlLight;
    9495      dockPanelGradient1.StartColor = SystemColors.ControlLight;
  • trunk/sources/HeuristicLab.MainForm/3.2/Interfaces/IMainForm.cs

    r2243 r2250  
    3737    Type UserInterfaceItemType { get; }
    3838    void ShowView(IView view);
     39
     40    void Close();
    3941  }
    4042}
  • trunk/sources/HeuristicLab.MainForm/3.2/MainFormBase.cs

    r2249 r2250  
    7272      openViews.Add(view);
    7373    }
     74
     75    public void Close() {
     76      ((Form)this).Close();
     77    }
    7478    #endregion
    7579
     
    9094      foreach (IToolStripButtonItem toolStripButtonItem in toolStripItems) {
    9195        AddToolStripButtonItem(toolStripButtonItem);
    92       }
     96      }     
    9397    }
    9498
  • trunk/sources/HeuristicLab.MainForm/3.2/ViewBase.cs

    r2233 r2250  
    3030
    3131namespace HeuristicLab.MainForm {
    32   public partial class ViewBase : UserControl {
     32  public partial class ViewBase : UserControl,IView {
    3333    public ViewBase() {
    3434      InitializeComponent();
Note: See TracChangeset for help on using the changeset viewer.