Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/30/09 17:17:53 (15 years ago)
Author:
mkommend
Message:

integrated branch MainForm refactoring into trunk (ticket #771)

Location:
trunk/sources/HeuristicLab.MainForm/3.2
Files:
27 deleted
4 edited
7 copied

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm/3.2/HeuristicLab.MainForm-3.2.csproj

    r2348 r2458  
    7171    </Reference>
    7272    <Reference Include="System.Drawing" />
    73     <Reference Include="System.Windows.Forms" />
    7473    <Reference Include="System.Xml.Linq">
    7574      <RequiredTargetFramework>3.5</RequiredTargetFramework>
     
    8281  </ItemGroup>
    8382  <ItemGroup>
    84     <Compile Include="SingleDocumentMainForm.cs">
    85       <SubType>Form</SubType>
    86     </Compile>
    87     <Compile Include="SingleDocumentMainForm.Designer.cs">
    88       <DependentUpon>SingleDocumentMainForm.cs</DependentUpon>
    89     </Compile>
     83    <Compile Include="Interfaces\IMenuItem.cs" />
     84    <Compile Include="Interfaces\IToolBarItem.cs" />
     85    <Compile Include="MainFormManager.cs" />
     86    <Compile Include="MenuItemBase.cs" />
     87    <Compile Include="ToolBarItemBase.cs" />
     88    <Compile Include="HeuristicLabMainFormPlugin.cs" />
     89    <Compile Include="Interfaces\IMainForm.cs" />
    9090    <Compile Include="Interfaces\IUserInterfaceItem.cs" />
    91     <Compile Include="MultipleDocumentMainForm.cs">
    92       <SubType>Form</SubType>
    93     </Compile>
    94     <Compile Include="MultipleDocumentMainForm.Designer.cs">
    95       <DependentUpon>MultipleDocumentMainForm.cs</DependentUpon>
    96     </Compile>
    97     <Compile Include="ToolStripMenuItemBase.cs" />
    98     <Compile Include="ToolStripButtonItemBase.cs" />
    99     <Compile Include="ToolStripItemBase.cs" />
    100     <Compile Include="DockingMainForm.cs">
    101       <SubType>Form</SubType>
    102     </Compile>
    103     <Compile Include="DockingMainForm.Designer.cs">
    104       <DependentUpon>DockingMainForm.cs</DependentUpon>
    105     </Compile>
    106     <Compile Include="MainFormBase.cs">
    107       <SubType>Form</SubType>
    108     </Compile>
    109     <Compile Include="MainFormBase.Designer.cs">
    110       <DependentUpon>MainFormBase.cs</DependentUpon>
    111     </Compile>
    112     <Compile Include="HeuristicLabMainFormPlugin.cs" />
    113     <Compile Include="Interfaces\IAction.cs" />
    114     <Compile Include="Interfaces\IMainForm.cs" />
    115     <Compile Include="Interfaces\IToolStripMenuItem.cs" />
    116     <Compile Include="Interfaces\IToolStripButtonItem.cs" />
    117     <Compile Include="Interfaces\IToolStripItem.cs" />
    11891    <Compile Include="Interfaces\IView.cs" />
    11992    <Compile Include="Properties\AssemblyInfo.cs" />
    12093    <Compile Include="UserInterfaceItemBase.cs" />
    121     <Compile Include="ViewBase.cs">
    122       <SubType>UserControl</SubType>
    123     </Compile>
    124     <Compile Include="ViewBase.Designer.cs">
    125       <DependentUpon>ViewBase.cs</DependentUpon>
    126     </Compile>
    127     <Compile Include="DockForm.cs">
    128       <SubType>Form</SubType>
    129     </Compile>
    130     <Compile Include="DockForm.Designer.cs">
    131       <DependentUpon>DockForm.cs</DependentUpon>
    132     </Compile>
    133     <Compile Include="DocumentForm.cs">
    134       <SubType>Form</SubType>
    135     </Compile>
    136     <Compile Include="DocumentForm.Designer.cs">
    137       <DependentUpon>DocumentForm.cs</DependentUpon>
    138     </Compile>
     94    <Compile Include="DefaultViewAttribute.cs" />
    13995  </ItemGroup>
    14096  <ItemGroup>
     
    14399      <Name>HeuristicLab.PluginInfrastructure</Name>
    144100    </ProjectReference>
    145     <ProjectReference Include="..\..\WinFormsUI\WinFormsUI.csproj">
    146       <Project>{C75532C4-765B-418E-B09B-46D36B2ABDB1}</Project>
    147       <Name>WinFormsUI</Name>
    148     </ProjectReference>
    149101  </ItemGroup>
    150102  <ItemGroup>
    151103    <None Include="HeuristicLab.snk" />
    152104    <None Include="Properties\AssemblyInfo.frame" />
    153   </ItemGroup>
    154   <ItemGroup>
    155     <EmbeddedResource Include="SingleDocumentMainForm.resx">
    156       <DependentUpon>SingleDocumentMainForm.cs</DependentUpon>
    157     </EmbeddedResource>
    158     <EmbeddedResource Include="DockingMainForm.resx">
    159       <DependentUpon>DockingMainForm.cs</DependentUpon>
    160     </EmbeddedResource>
    161     <EmbeddedResource Include="MainFormBase.resx">
    162       <DependentUpon>MainFormBase.cs</DependentUpon>
    163     </EmbeddedResource>
    164     <EmbeddedResource Include="DockForm.resx">
    165       <DependentUpon>DockForm.cs</DependentUpon>
    166       <SubType>Designer</SubType>
    167     </EmbeddedResource>
    168     <EmbeddedResource Include="MultipleDocumentMainForm.resx">
    169       <DependentUpon>MultipleDocumentMainForm.cs</DependentUpon>
    170     </EmbeddedResource>
    171     <EmbeddedResource Include="DocumentForm.resx">
    172       <DependentUpon>DocumentForm.cs</DependentUpon>
    173       <SubType>Designer</SubType>
    174     </EmbeddedResource>
    175105  </ItemGroup>
    176106  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • trunk/sources/HeuristicLab.MainForm/3.2/Interfaces/IMainForm.cs

    r2350 r2458  
    2525using System.Text;
    2626using System.Drawing;
    27 using System.Windows.Forms;
    2827
    2928namespace HeuristicLab.MainForm {
    3029  public interface IMainForm {
    3130    string Title { get; set; }
    32     string StatusStripText { get; set; }
    33     bool StatusStripProgressBarVisible { get; set; }
    34 
    35     Cursor Cursor { get; set; }
    3631
    3732    IView ActiveView { get; }
    3833    event EventHandler ActiveViewChanged;
    39     event EventHandler MainFormChanged;
     34    event EventHandler Changed;
    4035    IEnumerable<IView> Views { get; }
    4136
    4237    Type UserInterfaceItemType { get; }
    43     void ShowView(IView view);
     38    bool ShowView(IView view);  //return value indicates if a new form for the view is created
     39    void HideView(IView view);
    4440    void CloseView(IView view);
    4541    void CloseAllViews();
  • trunk/sources/HeuristicLab.MainForm/3.2/Interfaces/IView.cs

    r2266 r2458  
    2323using System.Collections.Generic;
    2424using System.Text;
    25 using System.Windows.Forms;
     25using System.ComponentModel;
    2626
    2727namespace HeuristicLab.MainForm {
     
    2929    string Caption { get; set; }
    3030    event EventHandler CaptionChanged;
    31     event EventHandler StateChanged;
    32     IMainForm MainForm { get; set; }
    33     void FormClosing(object sender, FormClosingEventArgs e);
     31    event EventHandler Changed;
     32    void OnClosing(object sender, CancelEventArgs e);
     33    void OnClosed(object sender, EventArgs e);
     34  }
     35
     36  public interface IView<T> : IView {
     37    void View(T item);
     38    T Item { get; }
    3439  }
    3540}
  • trunk/sources/HeuristicLab.MainForm/3.2/UserInterfaceItemBase.cs

    r2249 r2458  
    2727namespace HeuristicLab.MainForm {
    2828  public abstract class UserInterfaceItemBase : IUserInterfaceItem{
     29    protected UserInterfaceItemBase() {
     30    }
     31
    2932    public abstract string Name { get; }
     33    public abstract int Position { get; }
    3034
    31     #region IAction Members
    32     public abstract void Execute(IMainForm mainform);
    33     #endregion
     35    public virtual System.Drawing.Image Image {
     36      get { return null; }
     37    }
     38
     39    public virtual string ToolTipText {
     40      get { return string.Empty; }
     41    }
     42
     43    public abstract void Execute();
     44
     45    public virtual void ActiveViewChanged(object sender, EventArgs e) {
     46    }
     47
     48    public virtual void ViewChanged(object sender, EventArgs e) {
     49    }
     50
     51    public virtual void MainFormChanged(object sender, EventArgs e) {
     52    }
    3453  }
    3554}
Note: See TracChangeset for help on using the changeset viewer.