Changeset 2546
- Timestamp:
- 12/07/09 02:44:23 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 10 added
- 7 deleted
- 59 edited
- 19 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab 3.3.sln
r2524 r2546 38 38 {EE2034D9-6E27-48A1-B855-42D45F69A4FC} = {EE2034D9-6E27-48A1-B855-42D45F69A4FC} 39 39 {A9E282EA-180F-4233-B809-AEDF0787545C} = {A9E282EA-180F-4233-B809-AEDF0787545C} 40 {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609} = {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}41 40 {23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE} = {23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE} 42 41 {BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937} = {BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937} … … 59 58 EndProject 60 59 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Operators-3.3", "HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj", "{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}" 61 EndProject62 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.AdvancedOptimizationFrontend-3.3", "HeuristicLab.AdvancedOptimizationFrontend\3.3\HeuristicLab.AdvancedOptimizationFrontend-3.3.csproj", "{D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}"63 60 EndProject 64 61 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.SequentialEngine-3.3", "HeuristicLab.SequentialEngine\3.3\HeuristicLab.SequentialEngine-3.3.csproj", "{DC3D7072-7999-4719-B65D-3997744D5DC1}" … … 222 219 {23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}.Release|x86.ActiveCfg = Release|x86 223 220 {23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}.Release|x86.Build.0 = Release|x86 224 {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Debug|Any CPU.ActiveCfg = Debug|Any CPU225 {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Debug|Any CPU.Build.0 = Debug|Any CPU226 {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Debug|x64.ActiveCfg = Debug|x64227 {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Debug|x64.Build.0 = Debug|x64228 {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Debug|x86.ActiveCfg = Debug|x86229 {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Debug|x86.Build.0 = Debug|x86230 {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Release|Any CPU.ActiveCfg = Release|Any CPU231 {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Release|Any CPU.Build.0 = Release|Any CPU232 {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Release|x64.ActiveCfg = Release|x64233 {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Release|x64.Build.0 = Release|x64234 {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Release|x86.ActiveCfg = Release|x86235 {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Release|x86.Build.0 = Release|x86236 221 {DC3D7072-7999-4719-B65D-3997744D5DC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 237 222 {DC3D7072-7999-4719-B65D-3997744D5DC1}.Debug|Any CPU.Build.0 = Debug|Any CPU -
trunk/sources/HeuristicLab 3.3/CopyAssemblies.cmd
r2524 r2546 7 7 mkdir plugins\backup 8 8 9 copy "%SolutionDir%\HeuristicLab.AdvancedOptimizationFrontend\3.3\%Outdir%\HeuristicLab.AdvancedOptimizationFrontend-3.3.dll" .\plugins10 9 copy "%SolutionDir%\HeuristicLab.Charting\3.3\%Outdir%\HeuristicLab.Charting-3.3.dll" .\plugins 11 10 copy "%SolutionDir%\HeuristicLab.Charting.Data\3.3\%Outdir%\HeuristicLab.Charting.Data-3.3.dll" .\plugins -
trunk/sources/HeuristicLab.Common.Resources/3.2/HeuristicLab.Common.Resources-3.2.csproj
r2450 r2546 101 101 <ItemGroup> 102 102 <EmbeddedResource Include="Resources.resx"> 103 <Generator> ResXFileCodeGenerator</Generator>103 <Generator>PublicResXFileCodeGenerator</Generator> 104 104 <LastGenOutput>Resources.Designer.cs</LastGenOutput> 105 105 <SubType>Designer</SubType> … … 171 171 <ItemGroup> 172 172 <None Include="Resources\RefreshDocument.png" /> 173 </ItemGroup> 174 <ItemGroup> 175 <None Include="Resources\ShowDetails.png" /> 176 </ItemGroup> 177 <ItemGroup> 178 <None Include="Resources\ShowLargeIcons.png" /> 179 </ItemGroup> 180 <ItemGroup> 181 <None Include="Resources\ShowSmallIcons.png" /> 182 </ItemGroup> 183 <ItemGroup> 184 <None Include="Resources\HeuristicLab.png" /> 173 185 </ItemGroup> 174 186 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
trunk/sources/HeuristicLab.Common.Resources/3.2/Resources.Designer.cs
r2450 r2546 30 30 31 31 [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 publicResources() {32 internal Resources() { 33 33 } 34 34 … … 124 124 } 125 125 126 public static System.Drawing.Bitmap HeuristicLab { 127 get { 128 object obj = ResourceManager.GetObject("HeuristicLab", resourceCulture); 129 return ((System.Drawing.Bitmap)(obj)); 130 } 131 } 132 126 133 public static System.Drawing.Icon HeuristicLabIcon { 127 134 get { … … 201 208 } 202 209 210 public static System.Drawing.Bitmap ShowDetails { 211 get { 212 object obj = ResourceManager.GetObject("ShowDetails", resourceCulture); 213 return ((System.Drawing.Bitmap)(obj)); 214 } 215 } 216 217 public static System.Drawing.Bitmap ShowLargeIcons { 218 get { 219 object obj = ResourceManager.GetObject("ShowLargeIcons", resourceCulture); 220 return ((System.Drawing.Bitmap)(obj)); 221 } 222 } 223 224 public static System.Drawing.Bitmap ShowSmallIcons { 225 get { 226 object obj = ResourceManager.GetObject("ShowSmallIcons", resourceCulture); 227 return ((System.Drawing.Bitmap)(obj)); 228 } 229 } 230 203 231 public static System.Drawing.Bitmap UndoIcon { 204 232 get { -
trunk/sources/HeuristicLab.Common.Resources/3.2/Resources.resx
r2450 r2546 146 146 <value>Resources\FunctionIcon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 147 147 </data> 148 <data name="HeuristicLab" type="System.Resources.ResXFileRef, System.Windows.Forms"> 149 <value>Resources\HeuristicLab.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 150 </data> 148 151 <data name="HeuristicLabIcon" type="System.Resources.ResXFileRef, System.Windows.Forms"> 149 152 <value>Resources\HeuristicLab.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> … … 179 182 <value>Resources\SaveIcon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 180 183 </data> 184 <data name="ShowDetails" type="System.Resources.ResXFileRef, System.Windows.Forms"> 185 <value>Resources\ShowDetails.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 186 </data> 187 <data name="ShowLargeIcons" type="System.Resources.ResXFileRef, System.Windows.Forms"> 188 <value>Resources\ShowLargeIcons.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 189 </data> 190 <data name="ShowSmallIcons" type="System.Resources.ResXFileRef, System.Windows.Forms"> 191 <value>Resources\ShowSmallIcons.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 192 </data> 181 193 <data name="UndoIcon" type="System.Resources.ResXFileRef, System.Windows.Forms"> 182 194 <value>Resources\UndoIcon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> -
trunk/sources/HeuristicLab.Core.Views/3.3/EngineBaseView.Designer.cs
r2545 r2546 21 21 22 22 namespace HeuristicLab.Core.Views { 23 partial class EngineBase Editor{23 partial class EngineBaseView { 24 24 /// <summary> 25 25 /// Required designer variable. -
trunk/sources/HeuristicLab.Core.Views/3.3/EngineBaseView.cs
r2545 r2546 36 36 /// </summary> 37 37 [Content(typeof(EngineBase), true)] 38 public partial class EngineBase Editor : EditorBase {38 public partial class EngineBaseView : ItemViewBase { 39 39 private int executionTimeCounter; 40 40 … … 51 51 /// Initializes a new instance of <see cref="EngineBaseEditor"/>. 52 52 /// </summary> 53 public EngineBase Editor() {53 public EngineBaseView() { 54 54 InitializeComponent(); 55 55 } -
trunk/sources/HeuristicLab.Core.Views/3.3/HeuristicLab.Core.Views-3.3.csproj
r2524 r2546 70 70 <DependentUpon>ChooseTypeDialog.cs</DependentUpon> 71 71 </Compile> 72 <Compile Include="EditorBase.cs"> 73 <SubType>UserControl</SubType> 74 </Compile> 75 <Compile Include="EditorBase.Designer.cs"> 76 <DependentUpon>EditorBase.cs</DependentUpon> 77 </Compile> 78 <Compile Include="EngineBaseEditor.cs"> 79 <SubType>UserControl</SubType> 80 </Compile> 81 <Compile Include="EngineBaseEditor.Designer.cs"> 82 <DependentUpon>EngineBaseEditor.cs</DependentUpon> 72 <Compile Include="EngineBaseView.cs"> 73 <SubType>UserControl</SubType> 74 </Compile> 75 <Compile Include="EngineBaseView.Designer.cs"> 76 <DependentUpon>EngineBaseView.cs</DependentUpon> 83 77 </Compile> 84 78 <Compile Include="HeuristicLabCoreViewsPlugin.cs" /> 85 <Compile Include="I Editor.cs" />79 <Compile Include="IItemView.cs" /> 86 80 <Compile Include="ItemBaseView.cs"> 87 81 <SubType>UserControl</SubType> … … 90 84 <DependentUpon>ItemBaseView.cs</DependentUpon> 91 85 </Compile> 92 <Compile Include="IView.cs" /> 86 <Compile Include="ItemViewBase.cs"> 87 <SubType>UserControl</SubType> 88 </Compile> 89 <Compile Include="ItemViewBase.Designer.cs"> 90 <DependentUpon>ItemViewBase.cs</DependentUpon> 91 </Compile> 93 92 <Compile Include="OperatorBaseDescriptionView.cs"> 94 93 <SubType>UserControl</SubType> … … 121 120 <DependentUpon>OperatorGraphView.cs</DependentUpon> 122 121 </Compile> 123 <Compile Include="OperatorLibrary Editor.cs">124 <SubType>UserControl</SubType> 125 </Compile> 126 <Compile Include="OperatorLibrary Editor.Designer.cs">127 <DependentUpon>OperatorLibrary Editor.cs</DependentUpon>122 <Compile Include="OperatorLibraryView.cs"> 123 <SubType>UserControl</SubType> 124 </Compile> 125 <Compile Include="OperatorLibraryView.Designer.cs"> 126 <DependentUpon>OperatorLibraryView.cs</DependentUpon> 128 127 </Compile> 129 128 <Compile Include="Properties\AssemblyInfo.cs" /> … … 151 150 <Compile Include="VariableView.Designer.cs"> 152 151 <DependentUpon>VariableView.cs</DependentUpon> 153 </Compile>154 <Compile Include="ViewBase.cs">155 <SubType>UserControl</SubType>156 </Compile>157 <Compile Include="ViewBase.Designer.cs">158 <DependentUpon>ViewBase.cs</DependentUpon>159 152 </Compile> 160 153 </ItemGroup> … … 205 198 <DependentUpon>ChooseTypeDialog.cs</DependentUpon> 206 199 </EmbeddedResource> 207 <EmbeddedResource Include="EditorBase.resx"> 208 <DependentUpon>EditorBase.cs</DependentUpon> 209 </EmbeddedResource> 210 <EmbeddedResource Include="EngineBaseEditor.resx"> 211 <DependentUpon>EngineBaseEditor.cs</DependentUpon> 200 <EmbeddedResource Include="EngineBaseView.resx"> 201 <DependentUpon>EngineBaseView.cs</DependentUpon> 212 202 </EmbeddedResource> 213 203 <EmbeddedResource Include="ItemBaseView.resx"> … … 229 219 <DependentUpon>OperatorGraphView.cs</DependentUpon> 230 220 </EmbeddedResource> 231 <EmbeddedResource Include="OperatorLibrary Editor.resx">232 <DependentUpon>OperatorLibrary Editor.cs</DependentUpon>221 <EmbeddedResource Include="OperatorLibraryView.resx"> 222 <DependentUpon>OperatorLibraryView.cs</DependentUpon> 233 223 </EmbeddedResource> 234 224 <EmbeddedResource Include="ScopeView.resx"> -
trunk/sources/HeuristicLab.Core.Views/3.3/IItemView.cs
r2537 r2546 24 24 using System.Text; 25 25 using HeuristicLab.PluginInfrastructure; 26 using HeuristicLab.MainForm; 26 27 27 28 namespace HeuristicLab.Core.Views { … … 29 30 /// An interface for all kinds visual representations of items (objects, operators...). 30 31 /// </summary> 31 public interface I View : IControl, HeuristicLab.MainForm.IView{32 public interface IItemView : IView { 32 33 /// <summary> 33 34 /// Gets the current item instance. -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemBaseView.cs
r2520 r2546 34 34 /// </summary> 35 35 [Content(typeof(ItemBase), true)] 36 public partial class ItemBaseView : ViewBase {36 public partial class ItemBaseView : ItemViewBase { 37 37 /// <summary> 38 38 /// Initializes a new instance of <see cref="ItemBaseView"/>. -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemViewBase.Designer.cs
r2537 r2546 23 23 24 24 namespace HeuristicLab.Core.Views { 25 partial class ViewBase {25 partial class ItemViewBase { 26 26 /// <summary> 27 27 /// Required designer variable. -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemViewBase.cs
r2537 r2546 28 28 using System.Xml; 29 29 using System.Windows.Forms; 30 using HeuristicLab.MainForm.WindowsForms; 30 31 31 32 namespace HeuristicLab.Core.Views { … … 33 34 /// Base class for all visual representations. 34 35 /// </summary> 35 public partial class ViewBase : HeuristicLab.MainForm.WindowsForms.ViewBase, IView {36 public partial class ItemViewBase : ViewBase, IItemView { 36 37 private IItem myItem; 37 38 /// <summary> … … 73 74 /// Initializes a new instance of <see cref="ViewBase"/> with the caption "View". 74 75 /// </summary> 75 public ViewBase() {76 public ItemViewBase() { 76 77 InitializeComponent(); 77 78 Caption = "View"; -
trunk/sources/HeuristicLab.Core.Views/3.3/OperatorBaseDescriptionView.cs
r2520 r2546 32 32 /// The visual representation of the description of operators. 33 33 /// </summary> 34 public partial class OperatorBaseDescriptionView : ViewBase {34 public partial class OperatorBaseDescriptionView : ItemViewBase { 35 35 /// <summary> 36 36 /// Gets or sets the operator whose description should be displayed. -
trunk/sources/HeuristicLab.Core.Views/3.3/OperatorBaseVariableInfosView.cs
r2520 r2546 34 34 /// The visual representation of the information of the variables of an operator. 35 35 /// </summary> 36 public partial class OperatorBaseVariableInfosView : ViewBase {36 public partial class OperatorBaseVariableInfosView : ItemViewBase { 37 37 /// <summary> 38 38 /// Gets or sets the operator whose variable infos should be represented visually. -
trunk/sources/HeuristicLab.Core.Views/3.3/OperatorBaseVariablesView.cs
r2520 r2546 34 34 /// The visual representation of the variables of an operator. 35 35 /// </summary> 36 public partial class OperatorBaseVariablesView : ViewBase {36 public partial class OperatorBaseVariablesView : ItemViewBase { 37 37 private ChooseItemDialog chooseItemDialog; 38 38 -
trunk/sources/HeuristicLab.Core.Views/3.3/OperatorBaseView.cs
r2524 r2546 35 35 /// </summary> 36 36 [Content(typeof(OperatorBase), true)] 37 public partial class OperatorBaseView : ViewBase {37 public partial class OperatorBaseView : ItemViewBase { 38 38 /// <summary> 39 39 /// Gets or sets the operator to represent visually. -
trunk/sources/HeuristicLab.Core.Views/3.3/OperatorGraphView.cs
r2526 r2546 36 36 /// </summary> 37 37 [Content(typeof(OperatorGraph), true)] 38 public partial class OperatorGraphView : ViewBase {38 public partial class OperatorGraphView : ItemViewBase { 39 39 private ChooseOperatorDialog chooseOperatorDialog; 40 40 private Dictionary<IOperator, IList<TreeNode>> operatorNodeTable; … … 184 184 if (operatorsListView.SelectedItems.Count == 1) { 185 185 IOperator op = (IOperator)operatorsListView.SelectedItems[0].Tag; 186 IView view = (IView)MainFormManager.CreateDefaultView(op); 187 if (view != null) 188 PluginManager.ControlManager.ShowControl(view); 186 IView view = MainFormManager.CreateDefaultView(op); 187 if (view != null) MainFormManager.MainForm.ShowView(view); 189 188 } 190 189 } … … 376 375 if (operatorsListView.SelectedItems.Count == 1) { 377 376 IOperator op = (IOperator)operatorsListView.SelectedItems[0].Tag; 378 IView view = (IView)MainFormManager.CreateDefaultView(op);377 IView view = MainFormManager.CreateDefaultView(op); 379 378 if (view != null) { 380 379 viewToolStripMenuItem.Enabled = true; … … 388 387 } 389 388 private void viewToolStripMenuItem_Click(object sender, EventArgs e) { 390 IView view = ( IView)((ToolStripMenuItem)sender).Tag;391 PluginManager.ControlManager.ShowControl(view);389 IView view = ((ToolStripMenuItem)sender).Tag as IView; 390 if (view != null) MainFormManager.MainForm.ShowView(view); 392 391 } 393 392 private void initialOperatorToolStripMenuItem_Click(object sender, EventArgs e) { … … 408 407 if (graphTreeView.SelectedNode != null) { 409 408 IOperator op = (IOperator)graphTreeView.SelectedNode.Tag; 410 IView view = (IView)MainFormManager.CreateDefaultView(op);409 IView view = MainFormManager.CreateDefaultView(op); 411 410 if (view != null) { 412 411 viewToolStripMenuItem1.Enabled = true; -
trunk/sources/HeuristicLab.Core.Views/3.3/OperatorLibraryView.Designer.cs
r2545 r2546 21 21 22 22 namespace HeuristicLab.Core.Views { 23 partial class OperatorLibrary Editor{23 partial class OperatorLibraryView { 24 24 /// <summary> 25 25 /// Required designer variable. -
trunk/sources/HeuristicLab.Core.Views/3.3/OperatorLibraryView.cs
r2545 r2546 36 36 /// </summary> 37 37 [Content(typeof(OperatorLibrary), true)] 38 public partial class OperatorLibrary Editor : EditorBase {38 public partial class OperatorLibraryView : ItemViewBase { 39 39 private ChooseOperatorDialog chooseOperatorDialog; 40 40 … … 52 52 /// <c>Operator Library</c>. 53 53 /// </summary> 54 public OperatorLibrary Editor() {54 public OperatorLibraryView() { 55 55 InitializeComponent(); 56 56 operatorsTreeView.TreeViewNodeSorter = new NodeSorter(); … … 62 62 /// </summary> 63 63 /// <param name="operatorLibrary">The operator library to display.</param> 64 public OperatorLibrary Editor(IOperatorLibrary operatorLibrary)64 public OperatorLibraryView(IOperatorLibrary operatorLibrary) 65 65 : this() { 66 66 OperatorLibrary = operatorLibrary; … … 204 204 IOperator op = operatorsTreeView.SelectedNode.Tag as IOperator; 205 205 if (op != null) { 206 IView view = (IView)MainFormManager.CreateDefaultView(op); 207 if (view != null) 208 PluginManager.ControlManager.ShowControl(view); 206 IView view = MainFormManager.CreateDefaultView(op); 207 if (view != null) MainFormManager.MainForm.ShowView(view); 209 208 } 210 209 } … … 279 278 IOperator op = operatorsTreeView.SelectedNode.Tag as IOperator; 280 279 if (op != null) { 281 I View view = (IView)MainFormManager.CreateDefaultView(op);280 IItemView view = (IItemView)MainFormManager.CreateDefaultView(op); 282 281 if (view != null) { 283 282 viewToolStripMenuItem.Enabled = true; … … 288 287 } 289 288 private void viewToolStripMenuItem_Click(object sender, EventArgs e) { 290 IView view = (IView)viewToolStripMenuItem.Tag;291 PluginManager.ControlManager.ShowControl(view);289 IView view = viewToolStripMenuItem.Tag as IView; 290 if (view != null) MainFormManager.MainForm.ShowView(view); 292 291 } 293 292 #endregion -
trunk/sources/HeuristicLab.Core.Views/3.3/ScopeView.cs
r2520 r2546 36 36 /// </summary> 37 37 [Content(typeof(Scope), true)] 38 public partial class ScopeView : ViewBase {38 public partial class ScopeView : ItemViewBase { 39 39 private Dictionary<IScope, TreeNode> scopeNodeTable; 40 40 private Dictionary<IScope, bool> scopeExpandedTable; … … 133 133 if(scopesTreeView.SelectedNode != null && scopesTreeView.SelectedNode.Tag != null) { 134 134 IScope scope = (IScope)scopesTreeView.SelectedNode.Tag; 135 PluginManager.ControlManager.ShowControl(new VariablesScopeView(scope));135 MainFormManager.MainForm.ShowView(new VariablesScopeView(scope)); 136 136 } 137 137 } … … 201 201 private void variablesToolStripMenuItem_Click(object sender, EventArgs e) { 202 202 IScope scope = (IScope)scopesTreeView.SelectedNode.Tag; 203 PluginManager.ControlManager.ShowControl(new VariablesScopeView(scope));203 MainFormManager.MainForm.ShowView(new VariablesScopeView(scope)); 204 204 } 205 205 private void showViewToolStripMenuItem_Click(object sender, EventArgs e) { 206 206 IItem item = (IItem)((ToolStripMenuItem)sender).Tag; 207 PluginManager.ControlManager.ShowControl((IControl)MainFormManager.CreateDefaultView(item)); 207 IView view = MainFormManager.CreateDefaultView(item); 208 if (view != null) MainFormManager.MainForm.ShowView(view); 208 209 } 209 210 #endregion -
trunk/sources/HeuristicLab.Core.Views/3.3/VariableInfoView.cs
r2520 r2546 34 34 /// </summary> 35 35 [Content(typeof(VariableInfo), true)] 36 public partial class VariableInfoView : ViewBase {36 public partial class VariableInfoView : ItemViewBase { 37 37 /// <summary> 38 38 /// Gets or sets the variable information to represent visually. -
trunk/sources/HeuristicLab.Core.Views/3.3/VariableView.cs
r2520 r2546 34 34 /// </summary> 35 35 [Content(typeof(Variable), true)] 36 public partial class VariableView : ViewBase {36 public partial class VariableView : ItemViewBase { 37 37 private ChooseItemDialog chooseItemDialog; 38 38 -
trunk/sources/HeuristicLab.Core.Views/3.3/VariablesScopeView.cs
r2520 r2546 35 35 /// </summary> 36 36 [Content(typeof(Scope))] 37 public partial class VariablesScopeView : ViewBase {37 public partial class VariablesScopeView : ItemViewBase { 38 38 private ChooseItemDialog chooseItemDialog; 39 39 -
trunk/sources/HeuristicLab.Core/3.3/HeuristicLab.Core-3.3.csproj
r2526 r2546 95 95 </Reference> 96 96 <Reference Include="System.Data" /> 97 <Reference Include="System.Drawing" /> 97 98 <Reference Include="System.Xml" /> 98 99 </ItemGroup> 99 100 <ItemGroup> 100 101 <Compile Include="AtomicOperation.cs" /> 102 <Compile Include="Attributes\ItemAttribute.cs" /> 101 103 <Compile Include="CompositeOperation.cs" /> 102 104 <Compile Include="Cloner.cs" /> 105 <Compile Include="Attributes\CreatableAttribute.cs" /> 103 106 <Compile Include="Interfaces\ICloner.cs" /> 104 <Compile Include="Interfaces\IEditable.cs" />105 107 <Compile Include="Interfaces\IOperation.cs" /> 106 108 <Compile Include="Interfaces\IOperatorLibrary.cs" /> … … 136 138 </ItemGroup> 137 139 <ItemGroup> 140 <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.2\HeuristicLab.Common.Resources-3.2.csproj"> 141 <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project> 142 <Name>HeuristicLab.Common.Resources-3.2</Name> 143 </ProjectReference> 138 144 <ProjectReference Include="..\..\HeuristicLab.Common\3.2\HeuristicLab.Common-3.2.csproj"> 139 145 <Project>{1FC004FC-59AF-4249-B1B6-FF25873A20E4}</Project> -
trunk/sources/HeuristicLab.Core/3.3/HeuristicLabCorePlugin.cs
r2520 r2546 32 32 [PluginFile(Filename = "HeuristicLab.Core-3.3.dll", Filetype = PluginFileType.Assembly)] 33 33 [Dependency(Dependency = "HeuristicLab.Common-3.2")] 34 [Dependency(Dependency = "HeuristicLab.Common.Resources-3.2")] 34 35 [Dependency(Dependency = "HeuristicLab.Persistence-3.3")] 35 36 public class HeuristicLabCorePlugin : PluginBase { -
trunk/sources/HeuristicLab.Core/3.3/Interfaces/IItem.cs
r2526 r2546 23 23 using System.Collections.Generic; 24 24 using System.Text; 25 using System.Drawing; 25 26 26 27 namespace HeuristicLab.Core { … … 29 30 /// </summary> 30 31 public interface IItem : ICloneable { 32 string Name { get; } 33 string Description { get; } 34 Image Image { get; } 35 31 36 /// <summary> 32 37 /// Creates a deep clone of this item. -
trunk/sources/HeuristicLab.Core/3.3/ItemBase.cs
r2526 r2546 24 24 using System.Text; 25 25 using System.Xml; 26 using System.Drawing; 27 using System.Resources; 26 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.Common.Resources; 27 30 28 31 namespace HeuristicLab.Core { … … 30 33 /// Represents the base class for all basic item types. 31 34 /// </summary> 35 [Item("ItemBase", "Base class for all HeuristicLab items.")] 32 36 [EmptyStorableClass] 33 37 public abstract class ItemBase : IItem { 38 public virtual string Name { 39 get { 40 if (ItemAttribute.GetName(this.GetType()) != null) 41 return ItemAttribute.GetName(this.GetType()); 42 else 43 return this.GetType().Name; 44 } 45 } 46 public virtual string Description { 47 get { 48 if (ItemAttribute.GetDescription(this.GetType()) != null) 49 return ItemAttribute.GetDescription(this.GetType()); 50 else 51 return "No description available."; 52 } 53 } 54 public virtual Image Image { 55 get { return Resources.HeuristicLab; } 56 } 57 34 58 /// <summary> 35 59 /// Creates a deep clone of this instance. -
trunk/sources/HeuristicLab.Core/3.3/OperatorLibrary.cs
r2526 r2546 30 30 /// Represents a library of operators consisting of one <see cref="IOperatorGroup"/>. 31 31 /// </summary> 32 [Creatable("Libraries")] 33 [Item("Operator Library", "A library that contains multiple operators.")] 32 34 public class OperatorLibrary : ItemBase, IOperatorLibrary { 33 35 -
trunk/sources/HeuristicLab.Core/3.3/PersistenceManager.cs
r2526 r2546 36 36 public static class PersistenceManager { 37 37 /// <summary> 38 /// Saves the specified <paramref name="instance"/> in th especified file through creating an38 /// Saves the specified <paramref name="instance"/> in th specified file through creating an 39 39 /// <see cref="XmlDocument"/>. 40 40 /// </summary> … … 78 78 return (IItem)XmlParser.Deserialize(stream); 79 79 } 80 81 /// <summary>82 /// Builds a meaningful string for the given <paramref name="type"/> with the namespace information,83 /// all its arguments, the assembly name...84 /// </summary>85 /// <param name="type">The type for which a string should be created.</param>86 /// <returns>A string value of this type containing different additional information.</returns>87 public static string BuildTypeString(Type type) {88 string assembly = type.Assembly.FullName;89 assembly = assembly.Substring(0, assembly.IndexOf(", "));90 91 StringBuilder builder = new StringBuilder();92 builder.Append(type.Namespace);93 builder.Append(".");94 builder.Append(type.Name);95 Type[] args = type.GetGenericArguments();96 if (args.Length > 0) {97 builder.Append("[[");98 builder.Append(BuildTypeString(args[0]));99 builder.Append("]");100 for (int i = 1; i < args.Length; i++) {101 builder.Append(",[");102 builder.Append(BuildTypeString(args[i]));103 builder.Append("]");104 }105 builder.Append("]");106 }107 builder.Append(", ");108 builder.Append(assembly);109 return builder.ToString();110 }111 80 } 112 81 } -
trunk/sources/HeuristicLab.Data/3.3/ArrayDataBaseView.cs
r2520 r2546 34 34 /// The visual representation of the class <see cref="ArrayDataBase"/>. 35 35 /// </summary> 36 public partial class ArrayDataBaseView : ViewBase {36 public partial class ArrayDataBaseView : ItemViewBase { 37 37 /// <summary> 38 38 /// Gets or sets the instance of the array to represent. -
trunk/sources/HeuristicLab.Data/3.3/BoolDataView.cs
r2520 r2546 36 36 /// </summary> 37 37 [Content(typeof(BoolData), true)] 38 public partial class BoolDataView : ViewBase {38 public partial class BoolDataView : ItemViewBase { 39 39 /// <summary> 40 40 /// Gets or sets the boolean value to represent visually. -
trunk/sources/HeuristicLab.Data/3.3/DoubleDataView.cs
r2520 r2546 36 36 /// </summary> 37 37 [Content(typeof(DoubleData), true)] 38 public partial class DoubleDataView : ViewBase {38 public partial class DoubleDataView : ItemViewBase { 39 39 /// <summary> 40 40 /// Gets or sets the double value to represent visually. -
trunk/sources/HeuristicLab.Data/3.3/IntDataView.cs
r2520 r2546 36 36 /// </summary> 37 37 [Content(typeof(IntData), true)] 38 public partial class IntDataView : ViewBase {38 public partial class IntDataView : ItemViewBase { 39 39 /// <summary> 40 40 /// Gets or set the int value to represent visually. -
trunk/sources/HeuristicLab.Data/3.3/ItemDictionaryView_T.cs
r2520 r2546 18 18 /// <typeparam name="V">The type of the values of the dictionary.</typeparam> 19 19 [Content(typeof(ItemDictionary<IItem, IItem>), true)] 20 public partial class ItemDictionaryView<K, V> : ViewBase20 public partial class ItemDictionaryView<K, V> : ItemViewBase 21 21 where K : IItem 22 22 where V : IItem { -
trunk/sources/HeuristicLab.Data/3.3/ItemListView_T.cs
r2520 r2546 37 37 /// </summary> 38 38 /// <typeparam name="T">The type of the items in the list.</typeparam> 39 public partial class ItemListView<T> : ViewBase where T : IItem {39 public partial class ItemListView<T> : ItemViewBase where T : IItem { 40 40 private ChooseItemDialog chooseItemDialog; 41 41 -
trunk/sources/HeuristicLab.Data/3.3/MatrixDataBaseView.cs
r2520 r2546 34 34 /// The basic visual representation of a two-dimensional matrix. 35 35 /// </summary> 36 public partial class MatrixDataBaseView : ViewBase {36 public partial class MatrixDataBaseView : ItemViewBase { 37 37 38 38 /// <summary> -
trunk/sources/HeuristicLab.Data/3.3/StringDataView.cs
r2520 r2546 36 36 /// </summary> 37 37 [Content(typeof(StringData), true)] 38 public partial class StringDataView : ViewBase {38 public partial class StringDataView : ItemViewBase { 39 39 /// <summary> 40 40 /// Gets or sets the string value to represent visually. -
trunk/sources/HeuristicLab.Logging/3.3/LinechartView.cs
r2520 r2546 40 40 /// </summary> 41 41 [Content(typeof(Linechart), true)] 42 public partial class LinechartView : ViewBase {42 public partial class LinechartView : ItemViewBase { 43 43 private double maxY = double.MinValue, minY = double.MaxValue; 44 44 private static int[] colors = new int[] { -
trunk/sources/HeuristicLab.Logging/3.3/LogView.cs
r2520 r2546 38 38 /// </summary> 39 39 [Content(typeof(Log), true)] 40 public partial class LogView : ViewBase {40 public partial class LogView : ItemViewBase { 41 41 /// <summary> 42 42 /// Gets or sets the Log item to represent visually. -
trunk/sources/HeuristicLab.Logging/3.3/PointXYChartView.cs
r2520 r2546 40 40 /// </summary> 41 41 [Content(typeof(PointXYChart), true)] 42 public partial class PointXYChartView : ViewBase {42 public partial class PointXYChartView : ItemViewBase { 43 43 private static int[] colors = new int[] { 44 44 182,182,255, -
trunk/sources/HeuristicLab.Operators.Programmable/3.3/ProgrammableOperatorView.cs
r2524 r2546 34 34 namespace HeuristicLab.Operators.Programmable { 35 35 [Content(typeof(ProgrammableOperator), true)] 36 public partial class ProgrammableOperatorView : ViewBase {36 public partial class ProgrammableOperatorView : ItemViewBase { 37 37 public ProgrammableOperator ProgrammableOperator { 38 38 get { return (ProgrammableOperator)Item; } -
trunk/sources/HeuristicLab.Operators/3.3/CombinedOperatorView.cs
r2524 r2546 36 36 /// </summary> 37 37 [Content(typeof(CombinedOperator), true)] 38 public partial class CombinedOperatorView : ViewBase {38 public partial class CombinedOperatorView : ItemViewBase { 39 39 /// <summary> 40 40 /// Gets or sets the combined operator to display. -
trunk/sources/HeuristicLab.Optimizer/3.3/HeuristicLab.Optimizer-3.3.csproj
r2520 r2546 51 51 </ItemGroup> 52 52 <ItemGroup> 53 <Compile Include="Actions\SaveAsAction.cs" /> 54 <Compile Include="Actions\SaveAllAction.cs" /> 55 <Compile Include="Actions\SaveAction.cs" /> 56 <Compile Include="Actions\OpenAction.cs" /> 57 <Compile Include="Actions\NewAction.cs" /> 53 <Compile Include="FileManager.cs" /> 58 54 <Compile Include="MenuItems\CloseMenuItem.cs" /> 59 55 <Compile Include="MenuItems\CloseAllMenuItem.cs" /> … … 68 64 <Compile Include="MenuItems\NewMenuItem.cs" /> 69 65 <Compile Include="MenuItems\Separators.cs" /> 70 <Compile Include="New Dialog.cs">66 <Compile Include="NewItemDialog.cs"> 71 67 <SubType>Form</SubType> 72 68 </Compile> 73 <Compile Include="New Dialog.Designer.cs">74 <DependentUpon>New Dialog.cs</DependentUpon>69 <Compile Include="NewItemDialog.Designer.cs"> 70 <DependentUpon>NewItemDialog.cs</DependentUpon> 75 71 </Compile> 76 72 <Compile Include="Properties\AssemblyInfo.cs" /> 73 <Compile Include="Properties\Resources.Designer.cs"> 74 <AutoGen>True</AutoGen> 75 <DesignTime>True</DesignTime> 76 <DependentUpon>Resources.resx</DependentUpon> 77 </Compile> 77 78 <Compile Include="ToolBarItems\SaveAllToolBarItem.cs" /> 78 79 <Compile Include="ToolBarItems\SaveToolBarItem.cs" /> … … 89 90 <Name>HeuristicLab.Common.Resources-3.2</Name> 90 91 </ProjectReference> 92 <ProjectReference Include="..\..\HeuristicLab.Core.Views\3.3\HeuristicLab.Core.Views-3.3.csproj"> 93 <Project>{E226881D-315F-423D-B419-A766FE0D8685}</Project> 94 <Name>HeuristicLab.Core.Views-3.3</Name> 95 </ProjectReference> 96 <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj"> 97 <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project> 98 <Name>HeuristicLab.Core-3.3</Name> 99 </ProjectReference> 91 100 <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.2\HeuristicLab.MainForm.WindowsForms-3.2.csproj"> 92 101 <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project> … … 97 106 <Name>HeuristicLab.MainForm-3.2</Name> 98 107 </ProjectReference> 108 <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj"> 109 <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project> 110 <Name>HeuristicLab.Persistence-3.3</Name> 111 </ProjectReference> 99 112 <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj"> 100 113 <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project> … … 103 116 </ItemGroup> 104 117 <ItemGroup> 105 <EmbeddedResource Include="NewDialog.resx"> 106 <DependentUpon>NewDialog.cs</DependentUpon> 118 <EmbeddedResource Include="NewItemDialog.resx"> 119 <DependentUpon>NewItemDialog.cs</DependentUpon> 120 </EmbeddedResource> 121 <EmbeddedResource Include="Properties\Resources.resx"> 122 <Generator>ResXFileCodeGenerator</Generator> 123 <LastGenOutput>Resources.Designer.cs</LastGenOutput> 107 124 </EmbeddedResource> 108 125 </ItemGroup> -
trunk/sources/HeuristicLab.Optimizer/3.3/HeuristicLabOptimizerApplication.cs
r2520 r2546 31 31 namespace HeuristicLab.Optimizer { 32 32 [ClassInfo(Name = "Optimizer 3.3", Description="Next generation heuristic optimization environment.")] 33 class HeuristicLabOptimizerApplication : ApplicationBase {33 internal class HeuristicLabOptimizerApplication : ApplicationBase { 34 34 public override void Run() { 35 35 DockingMainForm mainForm = new DockingMainForm(typeof(IOptimizerUserInterfaceItemProvider)); -
trunk/sources/HeuristicLab.Optimizer/3.3/HeuristicLabOptimizerPlugin.cs
r2501 r2546 28 28 [ClassInfo(Name = "HeuristicLab.Optimizer-3.3")] 29 29 [PluginFile(Filename = "HeuristicLab.Optimizer-3.3.dll", Filetype = PluginFileType.Assembly)] 30 [Dependency(Dependency = "HeuristicLab.Persistence-3.3")] 30 31 [Dependency(Dependency = "HeuristicLab.Common.Resources-3.2")] 32 [Dependency(Dependency = "HeuristicLab.Core-3.3")] 33 [Dependency(Dependency = "HeuristicLab.Core.Views-3.3")] 31 34 [Dependency(Dependency = "HeuristicLab.MainForm-3.2")] 32 35 [Dependency(Dependency = "HeuristicLab.MainForm.WindowsForms-3.2")] -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CloseAllMenuItem.cs
r2520 r2546 10 10 11 11 namespace HeuristicLab.Optimizer.MenuItems { 12 publicclass CloseAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {12 internal class CloseAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider { 13 13 public override string Name { 14 14 get { return "Clos&e All"; } 15 15 } 16 17 16 public override IEnumerable<string> Structure { 18 17 get { return new string[] { "&File" }; } 19 18 } 20 21 19 public override int Position { 22 20 get { return 1700; } 21 } 22 23 public override void MainFormInitialized(object sender, EventArgs e) { 24 ToolStripItem.Enabled = false; 25 } 26 public override void ActiveViewChanged(object sender, EventArgs e) { 27 ToolStripItem.Enabled = MainFormManager.MainForm.Views.FirstOrDefault() != null; 23 28 } 24 29 -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CloseMenuItem.cs
r2520 r2546 10 10 11 11 namespace HeuristicLab.Optimizer.MenuItems { 12 publicclass CloseMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {12 internal class CloseMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider { 13 13 public override string Name { 14 14 get { return "&Close"; } 15 15 } 16 17 16 public override IEnumerable<string> Structure { 18 17 get { return new string[] { "&File" }; } 19 18 } 20 21 19 public override int Position { 22 20 get { return 1600; } 21 } 22 23 public override void MainFormInitialized(object sender, EventArgs e) { 24 ToolStripItem.Enabled = false; 25 } 26 public override void ActiveViewChanged(object sender, EventArgs e) { 27 ToolStripItem.Enabled = MainFormManager.MainForm.Views.FirstOrDefault() != null; 23 28 } 24 29 -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/ExitMenuItem.cs
r2520 r2546 10 10 11 11 namespace HeuristicLab.Optimizer.MenuItems { 12 publicclass ExitMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {12 internal class ExitMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider { 13 13 public override IEnumerable<string> Structure { 14 14 get { return new string[] { "&File" }; } 15 15 } 16 17 16 public override string Name { 18 17 get { return "E&xit"; } 19 18 } 20 21 19 public override int Position { 22 20 get { return 1999; } 23 21 } 24 25 22 public override Keys ShortCutKeys { 26 23 get { return Keys.Control | Keys.X; } -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/NewMenuItem.cs
r2520 r2546 9 9 10 10 namespace HeuristicLab.Optimizer.MenuItems { 11 publicclass NewMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {11 internal class NewMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider { 12 12 public override string Name { 13 13 get { return "&New..."; } 14 14 } 15 16 15 public override IEnumerable<string> Structure { 17 16 get { return new string[] { "&File" }; } 18 17 } 19 20 18 public override int Position { 21 19 get { return 1100; } 22 20 } 23 24 21 public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle { 25 22 get { return ToolStripItemDisplayStyle.ImageAndText; } 26 23 } 27 28 24 public override Image Image { 29 25 get { return Resources.NewIcon; } 30 26 } 31 32 27 public override Keys ShortCutKeys { 33 28 get { return Keys.Control | Keys.N; } … … 35 30 36 31 public override void Execute() { 37 Actions.NewAction.Execute();32 FileManager.New(); 38 33 } 39 34 } -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/OpenMenuItem.cs
r2520 r2546 9 9 10 10 namespace HeuristicLab.Optimizer.MenuItems { 11 publicclass OpenMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {11 internal class OpenMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider { 12 12 public override string Name { 13 13 get { return "&Open..."; } 14 14 } 15 16 15 public override IEnumerable<string> Structure { 17 16 get { return new string[] { "&File" }; } 18 17 } 19 20 18 public override int Position { 21 19 get { return 1200; } 22 20 } 23 24 21 public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle { 25 22 get { return ToolStripItemDisplayStyle.ImageAndText; } 26 23 } 27 28 24 public override Image Image { 29 25 get { return Resources.OpenIcon; } 30 26 } 31 32 27 public override Keys ShortCutKeys { 33 28 get { return Keys.Control | Keys.O; } … … 35 30 36 31 public override void Execute() { 37 Actions.OpenAction.Execute();32 FileManager.Open(); 38 33 } 39 34 } -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAllMenuItem.cs
r2520 r2546 5 5 using System.Windows.Forms; 6 6 using System.Drawing; 7 using HeuristicLab.MainForm; 7 8 using HeuristicLab.MainForm.WindowsForms; 8 9 using HeuristicLab.Common.Resources; 9 10 10 11 namespace HeuristicLab.Optimizer.MenuItems { 11 publicclass SaveAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {12 internal class SaveAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider { 12 13 public override string Name { 13 14 get { return "Save Al&l"; } 14 15 } 15 16 16 public override IEnumerable<string> Structure { 17 17 get { return new string[] { "&File" }; } 18 18 } 19 20 19 public override int Position { 21 20 get { return 1500; } 22 21 } 23 24 22 public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle { 25 23 get { return ToolStripItemDisplayStyle.ImageAndText; } 26 24 } 27 28 25 public override Image Image { 29 26 get { return Resources.SaveAllIcon; } 30 27 } 31 28 29 public override void MainFormInitialized(object sender, EventArgs e) { 30 ToolStripItem.Enabled = false; 31 } 32 public override void ActiveViewChanged(object sender, EventArgs e) { 33 ToolStripItem.Enabled = MainFormManager.MainForm.Views.FirstOrDefault() != null; 34 } 35 32 36 public override void Execute() { 33 Actions.SaveAllAction.Execute();37 FileManager.SaveAll(); 34 38 } 35 39 } -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAsMenuItem.cs
r2520 r2546 5 5 using System.Windows.Forms; 6 6 using System.Drawing; 7 using HeuristicLab.MainForm; 7 8 using HeuristicLab.MainForm.WindowsForms; 8 9 using HeuristicLab.Common.Resources; 10 using HeuristicLab.Core; 11 using HeuristicLab.Core.Views; 9 12 10 13 namespace HeuristicLab.Optimizer.MenuItems { 11 publicclass SaveAsMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {14 internal class SaveAsMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider { 12 15 public override string Name { 13 16 get { return "Save &As..."; } 14 17 } 15 16 18 public override IEnumerable<string> Structure { 17 19 get { return new string[] { "&File" }; } 18 20 } 19 20 21 public override int Position { 21 22 get { return 1400; } 22 23 } 23 24 24 public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle { 25 25 get { return ToolStripItemDisplayStyle.ImageAndText; } 26 26 } 27 28 27 public override Keys ShortCutKeys { 29 28 get { return Keys.Control | Keys.Shift | Keys.S; } 30 29 } 31 30 31 public override void MainFormInitialized(object sender, EventArgs e) { 32 ToolStripItem.Enabled = false; 33 } 34 public override void ActiveViewChanged(object sender, EventArgs e) { 35 IItemView activeView = MainFormManager.MainForm.ActiveView as IItemView; 36 ToolStripItem.Enabled = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Item.GetType()))); 37 } 38 32 39 public override void Execute() { 33 Actions.SaveAsAction.Execute();40 FileManager.SaveAs(); 34 41 } 35 42 } -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveMenuItem.cs
r2520 r2546 5 5 using System.Windows.Forms; 6 6 using System.Drawing; 7 using HeuristicLab.MainForm; 7 8 using HeuristicLab.MainForm.WindowsForms; 8 9 using HeuristicLab.Common.Resources; 10 using HeuristicLab.Core; 11 using HeuristicLab.Core.Views; 9 12 10 13 namespace HeuristicLab.Optimizer.MenuItems { 11 publicclass SaveMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {14 internal class SaveMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider { 12 15 public override string Name { 13 16 get { return "&Save"; } 14 17 } 15 16 18 public override IEnumerable<string> Structure { 17 19 get { return new string[] { "&File" }; } 18 20 } 19 20 21 public override int Position { 21 22 get { return 1300; } 22 23 } 23 24 24 public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle { 25 25 get { return ToolStripItemDisplayStyle.ImageAndText; } 26 26 } 27 28 27 public override Image Image { 29 28 get { return Resources.SaveIcon; } 30 29 } 31 32 30 public override Keys ShortCutKeys { 33 31 get { return Keys.Control | Keys.S; } 34 32 } 35 33 34 public override void MainFormInitialized(object sender, EventArgs e) { 35 ToolStripItem.Enabled = false; 36 } 37 public override void ActiveViewChanged(object sender, EventArgs e) { 38 IItemView activeView = MainFormManager.MainForm.ActiveView as IItemView; 39 ToolStripItem.Enabled = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Item.GetType()))); 40 } 41 36 42 public override void Execute() { 37 Actions.SaveAction.Execute();43 FileManager.Save(); 38 44 } 39 45 } -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/Separators.cs
r2520 r2546 10 10 11 11 namespace HeuristicLab.Optimizer.MenuItems { 12 publicclass SeparatorMenuItem : MenuSeparatorItemBase, IOptimizerUserInterfaceItemProvider {12 internal class SeparatorMenuItem : MenuSeparatorItemBase, IOptimizerUserInterfaceItemProvider { 13 13 public override IEnumerable<string> Structure { 14 14 get { return new string[] { "&File" }; } -
trunk/sources/HeuristicLab.Optimizer/3.3/NewItemDialog.Designer.cs
r2537 r2546 1 1 namespace HeuristicLab.Optimizer { 2 partial class New Dialog {2 partial class NewItemDialog { 3 3 /// <summary> 4 4 /// Required designer variable. … … 24 24 /// </summary> 25 25 private void InitializeComponent() { 26 this.components = new System.ComponentModel.Container(); 27 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NewItemDialog)); 26 28 this.okButton = new System.Windows.Forms.Button(); 27 29 this.cancelButton = new System.Windows.Forms.Button(); 30 this.itemsListView = new System.Windows.Forms.ListView(); 31 this.nameColumnHeader = new System.Windows.Forms.ColumnHeader(); 32 this.descriptioncolumnHeader = new System.Windows.Forms.ColumnHeader(); 33 this.itemsLabel = new System.Windows.Forms.Label(); 34 this.showIconsCheckBox = new System.Windows.Forms.CheckBox(); 35 this.showDetailsCheckBox = new System.Windows.Forms.CheckBox(); 36 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 28 37 this.SuspendLayout(); 29 38 // … … 33 42 this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; 34 43 this.okButton.Enabled = false; 35 this.okButton.Location = new System.Drawing.Point( 380, 315);44 this.okButton.Location = new System.Drawing.Point(456, 409); 36 45 this.okButton.Name = "okButton"; 37 46 this.okButton.Size = new System.Drawing.Size(75, 23); 38 this.okButton.TabIndex = 0;47 this.okButton.TabIndex = 2; 39 48 this.okButton.Text = "&OK"; 40 49 this.okButton.UseVisualStyleBackColor = true; 50 this.okButton.Click += new System.EventHandler(this.okButton_Click); 41 51 // 42 52 // cancelButton … … 44 54 this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 45 55 this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; 46 this.cancelButton.Location = new System.Drawing.Point( 461, 315);56 this.cancelButton.Location = new System.Drawing.Point(537, 409); 47 57 this.cancelButton.Name = "cancelButton"; 48 58 this.cancelButton.Size = new System.Drawing.Size(75, 23); 49 this.cancelButton.TabIndex = 0;59 this.cancelButton.TabIndex = 3; 50 60 this.cancelButton.Text = "&Cancel"; 51 61 this.cancelButton.UseVisualStyleBackColor = true; 52 62 // 53 // NewDialog 63 // itemsListView 64 // 65 this.itemsListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 66 | System.Windows.Forms.AnchorStyles.Left) 67 | System.Windows.Forms.AnchorStyles.Right))); 68 this.itemsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { 69 this.nameColumnHeader, 70 this.descriptioncolumnHeader}); 71 this.itemsListView.HideSelection = false; 72 this.itemsListView.Location = new System.Drawing.Point(12, 33); 73 this.itemsListView.MultiSelect = false; 74 this.itemsListView.Name = "itemsListView"; 75 this.itemsListView.Size = new System.Drawing.Size(600, 370); 76 this.itemsListView.TabIndex = 1; 77 this.itemsListView.UseCompatibleStateImageBehavior = false; 78 this.itemsListView.View = System.Windows.Forms.View.SmallIcon; 79 this.itemsListView.SelectedIndexChanged += new System.EventHandler(this.itemTypesListView_SelectedIndexChanged); 80 this.itemsListView.DoubleClick += new System.EventHandler(this.itemTypesListView_DoubleClick); 81 // 82 // nameColumnHeader 83 // 84 this.nameColumnHeader.Text = "Name"; 85 // 86 // descriptioncolumnHeader 87 // 88 this.descriptioncolumnHeader.Text = "Description"; 89 // 90 // itemsLabel 91 // 92 this.itemsLabel.AutoSize = true; 93 this.itemsLabel.Location = new System.Drawing.Point(12, 9); 94 this.itemsLabel.Name = "itemsLabel"; 95 this.itemsLabel.Size = new System.Drawing.Size(35, 13); 96 this.itemsLabel.TabIndex = 0; 97 this.itemsLabel.Text = "&Items:"; 98 // 99 // showIconsCheckBox 100 // 101 this.showIconsCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 102 this.showIconsCheckBox.Appearance = System.Windows.Forms.Appearance.Button; 103 this.showIconsCheckBox.Checked = true; 104 this.showIconsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; 105 this.showIconsCheckBox.Image = ((System.Drawing.Image)(resources.GetObject("showIconsCheckBox.Image"))); 106 this.showIconsCheckBox.Location = new System.Drawing.Point(558, 3); 107 this.showIconsCheckBox.Name = "showIconsCheckBox"; 108 this.showIconsCheckBox.Size = new System.Drawing.Size(24, 24); 109 this.showIconsCheckBox.TabIndex = 4; 110 this.toolTip.SetToolTip(this.showIconsCheckBox, "Show Icons"); 111 this.showIconsCheckBox.UseVisualStyleBackColor = true; 112 this.showIconsCheckBox.Click += new System.EventHandler(this.showIconsCheckBox_Click); 113 // 114 // showDetailsCheckBox 115 // 116 this.showDetailsCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 117 this.showDetailsCheckBox.Appearance = System.Windows.Forms.Appearance.Button; 118 this.showDetailsCheckBox.Image = ((System.Drawing.Image)(resources.GetObject("showDetailsCheckBox.Image"))); 119 this.showDetailsCheckBox.Location = new System.Drawing.Point(588, 3); 120 this.showDetailsCheckBox.Name = "showDetailsCheckBox"; 121 this.showDetailsCheckBox.Size = new System.Drawing.Size(24, 24); 122 this.showDetailsCheckBox.TabIndex = 5; 123 this.toolTip.SetToolTip(this.showDetailsCheckBox, "Show Details"); 124 this.showDetailsCheckBox.UseVisualStyleBackColor = true; 125 this.showDetailsCheckBox.Click += new System.EventHandler(this.showDetailsCheckBox_Click); 126 // 127 // NewItemDialog 54 128 // 55 129 this.AcceptButton = this.okButton; … … 57 131 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 58 132 this.CancelButton = this.cancelButton; 59 this.ClientSize = new System.Drawing.Size(548, 350); 133 this.ClientSize = new System.Drawing.Size(624, 444); 134 this.Controls.Add(this.showDetailsCheckBox); 135 this.Controls.Add(this.showIconsCheckBox); 136 this.Controls.Add(this.itemsLabel); 137 this.Controls.Add(this.itemsListView); 60 138 this.Controls.Add(this.cancelButton); 61 139 this.Controls.Add(this.okButton); 62 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;63 140 this.MaximizeBox = false; 64 141 this.MinimizeBox = false; 65 this.Name = "NewDialog"; 142 this.Name = "NewItemDialog"; 143 this.ShowIcon = false; 66 144 this.ShowInTaskbar = false; 67 145 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 68 146 this.Text = "New Item"; 69 147 this.TopMost = true; 148 this.Load += new System.EventHandler(this.NewItemDialog_Load); 149 this.Shown += new System.EventHandler(this.NewItemDialog_Shown); 70 150 this.ResumeLayout(false); 151 this.PerformLayout(); 71 152 72 153 } … … 76 157 private System.Windows.Forms.Button okButton; 77 158 private System.Windows.Forms.Button cancelButton; 159 private System.Windows.Forms.ListView itemsListView; 160 private System.Windows.Forms.Label itemsLabel; 161 private System.Windows.Forms.CheckBox showIconsCheckBox; 162 private System.Windows.Forms.CheckBox showDetailsCheckBox; 163 private System.Windows.Forms.ToolTip toolTip; 164 private System.Windows.Forms.ColumnHeader nameColumnHeader; 165 private System.Windows.Forms.ColumnHeader descriptioncolumnHeader; 78 166 } 79 167 } -
trunk/sources/HeuristicLab.Optimizer/3.3/NewItemDialog.cs
r2537 r2546 7 7 using System.Text; 8 8 using System.Windows.Forms; 9 using HeuristicLab.PluginInfrastructure; 10 using HeuristicLab.Common.Resources; 11 using HeuristicLab.Core; 9 12 10 13 namespace HeuristicLab.Optimizer { 11 public partial class NewDialog : Form { 12 private Type newItemType; 13 public Type NewItemType { 14 get { return newItemType; } 14 internal partial class NewItemDialog : Form { 15 private bool initialized; 16 private List<IItem> items; 17 18 private IItem item; 19 public IItem Item { 20 get { return item; } 15 21 } 16 22 17 public NewDialog() { 23 public NewItemDialog() { 24 initialized = false; 25 items = new List<IItem>(); 26 item = null; 18 27 InitializeComponent(); 19 newItemType = null; 28 } 29 30 private void NewItemDialog_Load(object sender, EventArgs e) { 31 if (!initialized) { 32 SetListViewDisplayStyleCheckBoxes(); 33 34 DiscoveryService ds = new DiscoveryService(); 35 var categories = from t in ds.GetTypes(typeof(IItem)) 36 where CreatableAttribute.IsCreatable(t) 37 orderby CreatableAttribute.GetCategory(t), ItemAttribute.GetName(t) ascending 38 group t by CreatableAttribute.GetCategory(t) into c 39 select c; 40 41 itemsListView.SmallImageList = new ImageList(); 42 foreach (var category in categories) { 43 ListViewGroup group = new ListViewGroup(category.Key); 44 itemsListView.Groups.Add(group); 45 foreach (var creatable in category) { 46 IItem i = (IItem)Activator.CreateInstance(creatable); 47 items.Add(i); 48 ListViewItem item = new ListViewItem(new string[] { i.Name, i.Description}, group); 49 itemsListView.SmallImageList.Images.Add(i.Image); 50 item.ImageIndex = itemsListView.SmallImageList.Images.Count - 1; 51 item.Tag = i; 52 itemsListView.Items.Add(item); 53 } 54 } 55 initialized = true; 56 } 57 } 58 59 private void NewItemDialog_Shown(object sender, EventArgs e) { 60 item = null; 61 } 62 63 private void itemTypesListView_SelectedIndexChanged(object sender, EventArgs e) { 64 okButton.Enabled = itemsListView.SelectedItems.Count == 1; 65 } 66 67 private void okButton_Click(object sender, EventArgs e) { 68 if (itemsListView.SelectedItems.Count == 1) { 69 item = (IItem)((IItem)itemsListView.SelectedItems[0].Tag).Clone(); 70 DialogResult = DialogResult.OK; 71 Close(); 72 } 73 } 74 private void itemTypesListView_DoubleClick(object sender, EventArgs e) { 75 if (itemsListView.SelectedItems.Count == 1) { 76 item = (IItem)((IItem)itemsListView.SelectedItems[0].Tag).Clone(); 77 DialogResult = DialogResult.OK; 78 Close(); 79 } 80 } 81 82 private void showIconsCheckBox_Click(object sender, EventArgs e) { 83 itemsListView.View = View.SmallIcon; 84 SetListViewDisplayStyleCheckBoxes(); 85 } 86 private void showDetailsCheckBox_Click(object sender, EventArgs e) { 87 itemsListView.View = View.Details; 88 SetListViewDisplayStyleCheckBoxes(); 89 for (int i = 0; i < itemsListView.Columns.Count; i++) 90 itemsListView.Columns[i].AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent); 91 } 92 private void SetListViewDisplayStyleCheckBoxes() { 93 showIconsCheckBox.Checked = itemsListView.View == View.SmallIcon; 94 showDetailsCheckBox.Checked = itemsListView.View == View.Details; 20 95 } 21 96 } -
trunk/sources/HeuristicLab.Optimizer/3.3/NewItemDialog.resx
r2537 r2546 118 118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 119 119 </resheader> 120 <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 121 <data name="showIconsCheckBox.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> 122 <value> 123 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 124 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAHdJREFUOE9j/P// 125 PwOlAGQCJZjhP5dKFlkYajFFtoP9DwwG8gDcBTDtDAwNQBMhmBiA1QCQRmINwWkAzBBCLsPrBWRvwNjo 126 LsMwAJe/sRkGcSU4BhGxgJ6gsHkB1TA0A4gJeWQ1JHgBNbEhXEYtF1CUmUCBSQkGALV/aRnqsiFZAAAA 127 AElFTkSuQmCC 128 </value> 129 </data> 130 <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 131 <value>17, 17</value> 132 </metadata> 133 <data name="showDetailsCheckBox.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> 134 <value> 135 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 136 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAF5JREFUOE9j/P// 137 PwOlAGQCJZjhP5dKFlkYajFFtoP9DwwG8gDcBdi0I4cLSB6djyRGRRcwMDQAbSKMYS7G6wViQgXDAJDt 138 aKaD/U7fMBhYFxATcMhqqJOUQYmMEgwAizNpEwxYZgUAAAAASUVORK5CYII= 139 </value> 140 </data> 120 141 </root> -
trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/NewToolBarItem.cs
r2520 r2546 10 10 11 11 namespace HeuristicLab.Optimizer { 12 publicclass NewToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, IOptimizerUserInterfaceItemProvider {12 internal class NewToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, IOptimizerUserInterfaceItemProvider { 13 13 public override string Name { 14 14 get { return "New..."; } 15 15 } 16 17 16 public override string ToolTipText { 18 17 get { return "New Item (Ctrl + N)"; } 19 18 } 20 21 19 public override int Position { 22 20 get { return 10; } 23 21 } 24 25 22 public override Image Image { 26 23 get { return Resources.NewIcon; } … … 28 25 29 26 public override void Execute() { 30 Actions.NewAction.Execute();27 FileManager.New(); 31 28 } 32 29 } -
trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/OpenToolBarItem.cs
r2520 r2546 10 10 11 11 namespace HeuristicLab.Optimizer { 12 publicclass OpenToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, IOptimizerUserInterfaceItemProvider {12 internal class OpenToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, IOptimizerUserInterfaceItemProvider { 13 13 public override string Name { 14 14 get { return "Open..."; } 15 15 } 16 17 16 public override string ToolTipText { 18 17 get { return "Open File (Ctrl + O)"; } 19 18 } 20 21 19 public override int Position { 22 20 get { return 20; } 23 21 } 24 25 22 public override Image Image { 26 23 get { return Resources.OpenIcon; } … … 28 25 29 26 public override void Execute() { 30 Actions.OpenAction.Execute();27 FileManager.Open(); 31 28 } 32 29 } -
trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveAllToolBarItem.cs
r2520 r2546 10 10 11 11 namespace HeuristicLab.Optimizer { 12 publicclass SaveAllToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, IOptimizerUserInterfaceItemProvider {12 internal class SaveAllToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, IOptimizerUserInterfaceItemProvider { 13 13 public override string Name { 14 14 get { return "Save All"; } 15 15 } 16 17 16 public override string ToolTipText { 18 17 get { return "Save All Files"; } 19 18 } 20 21 19 public override int Position { 22 20 get { return 40; } 23 21 } 24 25 22 public override Image Image { 26 23 get { return Resources.SaveAllIcon; } 27 24 } 28 25 26 public override void MainFormInitialized(object sender, EventArgs e) { 27 ToolStripItem.Enabled = false; 28 } 29 public override void ActiveViewChanged(object sender, EventArgs e) { 30 ToolStripItem.Enabled = MainFormManager.MainForm.Views.FirstOrDefault() != null; 31 } 32 29 33 public override void Execute() { 30 Actions.SaveAllAction.Execute();34 FileManager.SaveAll(); 31 35 } 32 36 } -
trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveToolBarItem.cs
r2520 r2546 8 8 using HeuristicLab.MainForm.WindowsForms; 9 9 using HeuristicLab.Common.Resources; 10 using HeuristicLab.Core; 11 using HeuristicLab.Core.Views; 10 12 11 13 namespace HeuristicLab.Optimizer { 12 publicclass SaveToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, IOptimizerUserInterfaceItemProvider {14 internal class SaveToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, IOptimizerUserInterfaceItemProvider { 13 15 public override string Name { 14 16 get { return "Save"; } 15 17 } 16 17 18 public override string ToolTipText { 18 19 get { return "Save File (Ctrl + S)"; } 19 20 } 20 21 21 public override int Position { 22 22 get { return 30; } 23 23 } 24 25 24 public override Image Image { 26 25 get { return Resources.SaveIcon; } 27 26 } 28 27 28 public override void MainFormInitialized(object sender, EventArgs e) { 29 ToolStripItem.Enabled = false; 30 } 31 public override void ActiveViewChanged(object sender, EventArgs e) { 32 IItemView activeView = MainFormManager.MainForm.ActiveView as IItemView; 33 ToolStripItem.Enabled = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Item.GetType()))); 34 } 35 29 36 public override void Execute() { 30 Actions.SaveAction.Execute();37 FileManager.Save(); 31 38 } 32 39 } -
trunk/sources/HeuristicLab.Routing.TSP/3.3/TSPInjectorView.cs
r2520 r2546 38 38 /// </summary> 39 39 [Content(typeof(TSPInjector), true)] 40 public partial class TSPInjectorView : ViewBase {40 public partial class TSPInjectorView : ItemViewBase { 41 41 /// <summary> 42 42 /// Gets or set the <see cref="TSPInjector"/> to represent visually. -
trunk/sources/HeuristicLab.Routing.TSP/3.3/TSPTourView.cs
r2520 r2546 39 39 /// </summary> 40 40 [Content(typeof(TSPTour), true)] 41 public partial class TSPTourView : ViewBase {41 public partial class TSPTourView : ItemViewBase { 42 42 /// <summary> 43 43 /// Gets or sets the <see cref="TSPTour"/> to represent visually. -
trunk/sources/HeuristicLab.SGA/3.3/HeuristicLab.SGA-3.3.csproj
r2524 r2546 87 87 <Compile Include="Properties\AssemblyInfo.cs" /> 88 88 <Compile Include="SGA.cs" /> 89 <Compile Include="SGA Editor.cs">89 <Compile Include="SGAView.cs"> 90 90 <SubType>UserControl</SubType> 91 91 </Compile> 92 <Compile Include="SGA Editor.Designer.cs">93 <DependentUpon>SGA Editor.cs</DependentUpon>92 <Compile Include="SGAView.Designer.cs"> 93 <DependentUpon>SGAView.cs</DependentUpon> 94 94 </Compile> 95 95 </ItemGroup> … … 157 157 </ItemGroup> 158 158 <ItemGroup> 159 <EmbeddedResource Include="SGAEditor.resx"> 160 <SubType>Designer</SubType> 161 <DependentUpon>SGAEditor.cs</DependentUpon> 159 <EmbeddedResource Include="SGAView.resx"> 160 <DependentUpon>SGAView.cs</DependentUpon> 162 161 </EmbeddedResource> 163 162 </ItemGroup> -
trunk/sources/HeuristicLab.SGA/3.3/SGAView.Designer.cs
r2545 r2546 21 21 22 22 namespace HeuristicLab.SGA { 23 partial class SGA Editor{23 partial class SGAView { 24 24 /// <summary> 25 25 /// Required designer variable. -
trunk/sources/HeuristicLab.SGA/3.3/SGAView.cs
r2545 r2546 38 38 /// </summary> 39 39 [Content(typeof(SGA), true)] 40 public partial class SGA Editor : EditorBase {40 public partial class SGAView : ItemViewBase { 41 41 private ChooseOperatorDialog chooseOperatorDialog; 42 42 … … 54 54 /// Initializes a new instance of <see cref="SGAEditor"/>. 55 55 /// </summary> 56 public SGA Editor() {56 public SGAView() { 57 57 InitializeComponent(); 58 58 } … … 61 61 /// </summary> 62 62 /// <param name="sga">The simple genetic algorithm to represent visually.</param> 63 public SGA Editor(SGA sga)63 public SGAView(SGA sga) 64 64 : this() { 65 65 SGA = sga; … … 118 118 #region Button Events 119 119 private void viewProblemInitializationButton_Click(object sender, EventArgs e) { 120 HeuristicLab.Core.Views.IView view = (HeuristicLab.Core.Views.IView)MainFormManager.CreateDefaultView(SGA.ProblemInjector); 121 if (view != null) 122 PluginManager.ControlManager.ShowControl(view); 120 IView view = MainFormManager.CreateDefaultView(SGA.ProblemInjector); 121 if (view != null) MainFormManager.MainForm.ShowView(view); 123 122 } 124 123 private void viewSolutionGenerationButton_Click(object sender, EventArgs e) { 125 HeuristicLab.Core.Views.IView view = (HeuristicLab.Core.Views.IView)MainFormManager.CreateDefaultView(SGA.SolutionGenerator); 126 if (view != null) 127 PluginManager.ControlManager.ShowControl(view); 124 IView view = MainFormManager.CreateDefaultView(SGA.SolutionGenerator); 125 if (view != null) MainFormManager.MainForm.ShowView(view); 128 126 } 129 127 private void viewSelectionButton_Click(object sender, EventArgs e) { 130 HeuristicLab.Core.Views.IView view = (HeuristicLab.Core.Views.IView)MainFormManager.CreateDefaultView(SGA.Selector); 131 if (view != null) 132 PluginManager.ControlManager.ShowControl(view); 128 IView view = MainFormManager.CreateDefaultView(SGA.Selector); 129 if (view != null) MainFormManager.MainForm.ShowView(view); 133 130 } 134 131 private void viewCrossoverButton_Click(object sender, EventArgs e) { 135 HeuristicLab.Core.Views.IView view = (HeuristicLab.Core.Views.IView)MainFormManager.CreateDefaultView(SGA.Crossover); 136 if (view != null) 137 PluginManager.ControlManager.ShowControl(view); 132 IView view = MainFormManager.CreateDefaultView(SGA.Crossover); 133 if (view != null) MainFormManager.MainForm.ShowView(view); 138 134 } 139 135 private void viewMutationButton_Click(object sender, EventArgs e) { 140 HeuristicLab.Core.Views.IView view = (HeuristicLab.Core.Views.IView)MainFormManager.CreateDefaultView(SGA.Mutator); 141 if (view != null) 142 PluginManager.ControlManager.ShowControl(view); 136 IView view = MainFormManager.CreateDefaultView(SGA.Mutator); 137 if (view != null) MainFormManager.MainForm.ShowView(view); 143 138 } 144 139 private void viewEvaluationButton_Click(object sender, EventArgs e) { 145 HeuristicLab.Core.Views.IView view = (HeuristicLab.Core.Views.IView)MainFormManager.CreateDefaultView(SGA.Evaluator); 146 if (view != null) 147 PluginManager.ControlManager.ShowControl(view); 140 IView view = MainFormManager.CreateDefaultView(SGA.Evaluator); 141 if (view != null) MainFormManager.MainForm.ShowView(view); 148 142 } 149 143 private void setProblemInitializationButton_Click(object sender, EventArgs e) { … … 202 196 private void cloneEngineButton_Click(object sender, EventArgs e) { 203 197 IEngine clone = (IEngine)SGA.Engine.Clone(); 204 I Editor editor = (IEditor)MainFormManager.CreateDefaultView(clone);205 PluginManager.ControlManager.ShowControl(editor);198 IView view = MainFormManager.CreateDefaultView(clone); 199 if (view != null) MainFormManager.MainForm.ShowView(view); 206 200 } 207 201 #endregion -
trunk/sources/HeuristicLab.SequentialEngine/3.3/HeuristicLab.SequentialEngine-3.3.csproj
r2520 r2546 86 86 <Compile Include="Properties\AssemblyInfo.cs" /> 87 87 <Compile Include="SequentialEngine.cs" /> 88 <Compile Include="SequentialEngine Editor.cs">88 <Compile Include="SequentialEngineView.cs"> 89 89 <SubType>UserControl</SubType> 90 90 </Compile> 91 <Compile Include="SequentialEngine Editor.Designer.cs">92 <DependentUpon>SequentialEngine Editor.cs</DependentUpon>91 <Compile Include="SequentialEngineView.Designer.cs"> 92 <DependentUpon>SequentialEngineView.cs</DependentUpon> 93 93 </Compile> 94 94 </ItemGroup> -
trunk/sources/HeuristicLab.SequentialEngine/3.3/SequentialEngine.cs
r2520 r2546 33 33 /// </summary> 34 34 [EmptyStorableClass] 35 public class SequentialEngine : EngineBase, IEditable { 35 [Creatable("Engines")] 36 [Item("Sequential Engine", "Engine for sequential execution of algorithms.")] 37 public class SequentialEngine : EngineBase { 36 38 private IOperator currentOperator; 37 39 -
trunk/sources/HeuristicLab.SequentialEngine/3.3/SequentialEngineView.Designer.cs
r2545 r2546 21 21 22 22 namespace HeuristicLab.SequentialEngine { 23 partial class SequentialEngine Editor{23 partial class SequentialEngineView { 24 24 /// <summary> 25 25 /// Required designer variable. -
trunk/sources/HeuristicLab.SequentialEngine/3.3/SequentialEngineView.cs
r2545 r2546 36 36 /// </summary> 37 37 [Content(typeof(SequentialEngine), true)] 38 public partial class SequentialEngine Editor : EngineBaseEditor{38 public partial class SequentialEngineView : EngineBaseView { 39 39 /// <summary> 40 40 /// Gets or set the engine to represent visually. … … 50 50 /// Initializes a new instance of <see cref="SequentialEngineEditor"/>. 51 51 /// </summary> 52 public SequentialEngine Editor() {52 public SequentialEngineView() { 53 53 InitializeComponent(); 54 54 } … … 58 58 /// </summary> 59 59 /// <param name="sequentialEngine">The engine to display.</param> 60 public SequentialEngine Editor(SequentialEngine sequentialEngine)60 public SequentialEngineView(SequentialEngine sequentialEngine) 61 61 : this() { 62 62 SequentialEngine = sequentialEngine; -
trunk/sources/HeuristicLab.TestFunctions/3.3/TestFunctionInjectorView.cs
r2520 r2546 38 38 /// </summary> 39 39 [Content(typeof(TestFunctionInjector), true)] 40 public partial class TestFunctionInjectorView : ViewBase {40 public partial class TestFunctionInjectorView : ItemViewBase { 41 41 /// <summary> 42 42 /// Gets or sets the TestFunctionInjector to represent visually. -
trunk/sources/HeuristicLab.ThreadParallelEngine/3.3/HeuristicLab.ThreadParallelEngine-3.3.csproj
r2520 r2546 86 86 <Compile Include="Properties\AssemblyInfo.cs" /> 87 87 <Compile Include="ThreadParallelEngine.cs" /> 88 <Compile Include="ThreadParallelEngine Editor.cs">88 <Compile Include="ThreadParallelEngineView.cs"> 89 89 <SubType>UserControl</SubType> 90 90 </Compile> 91 <Compile Include="ThreadParallelEngine Editor.Designer.cs">92 <DependentUpon>ThreadParallelEngine Editor.cs</DependentUpon>91 <Compile Include="ThreadParallelEngineView.Designer.cs"> 92 <DependentUpon>ThreadParallelEngineView.cs</DependentUpon> 93 93 </Compile> 94 94 </ItemGroup> -
trunk/sources/HeuristicLab.ThreadParallelEngine/3.3/ThreadParallelEngine.cs
r2526 r2546 32 32 /// Implementation of an engine being able to run in parallel with threads. 33 33 /// </summary> 34 [Creatable("Engines")] 35 [Item("Parallel Engine", "Engine for parallel execution of algorithms using multiple threads.")] 34 36 public class ThreadParallelEngine : EngineBase { 35 37 #region Inner Class Task -
trunk/sources/HeuristicLab.ThreadParallelEngine/3.3/ThreadParallelEngineView.Designer.cs
r2545 r2546 21 21 22 22 namespace HeuristicLab.ThreadParallelEngine { 23 partial class ThreadParallelEngine Editor{23 partial class ThreadParallelEngineView { 24 24 /// <summary> 25 25 /// Required designer variable. -
trunk/sources/HeuristicLab.ThreadParallelEngine/3.3/ThreadParallelEngineView.cs
r2545 r2546 36 36 /// </summary> 37 37 [Content(typeof(ThreadParallelEngine), true)] 38 public partial class ThreadParallelEngine Editor : EngineBaseEditor{38 public partial class ThreadParallelEngineView : EngineBaseView { 39 39 /// <summary> 40 40 /// Gets or sets the ThreadParallelEngine to display. … … 50 50 /// Initializes a new instance of <see cref="ThreadParallelEngineEditor"/>. 51 51 /// </summary> 52 public ThreadParallelEngine Editor() {52 public ThreadParallelEngineView() { 53 53 InitializeComponent(); 54 54 } … … 58 58 /// </summary> 59 59 /// <param name="threadParallelEngine">The engine to represent visually.</param> 60 public ThreadParallelEngine Editor(ThreadParallelEngine threadParallelEngine)60 public ThreadParallelEngineView(ThreadParallelEngine threadParallelEngine) 61 61 : this() { 62 62 ThreadParallelEngine = threadParallelEngine;
Note: See TracChangeset
for help on using the changeset viewer.