Changeset 3177
- Timestamp:
- 03/22/10 16:43:57 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 7 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/HeuristicLab.Core.Views-3.3.csproj
r3149 r3177 87 87 <ItemGroup> 88 88 <None Include="HeuristicLabCoreViewsPlugin.cs.frame" /> 89 <Compile Include="ControlExtensions.cs" />90 89 <Compile Include="VariableValueView.cs"> 91 90 <SubType>UserControl</SubType> -
trunk/sources/HeuristicLab.Core.Views/3.3/ViewHost.cs
r2870 r3177 26 26 using HeuristicLab.Common; 27 27 using HeuristicLab.MainForm; 28 using HeuristicLab.MainForm.WindowsForms; 28 29 29 30 namespace HeuristicLab.Core.Views { … … 53 54 Initialize(); 54 55 } 56 } 57 } 58 59 public new bool Enabled { 60 get { return base.Enabled; } 61 set { 62 this.SuspendRepaint(); 63 base.Enabled = value; 64 this.ResumeRepaint(true); 55 65 } 56 66 } -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/ControlExtensions.cs
r3171 r3177 21 21 22 22 using System; 23 using System.Runtime.InteropServices; 23 24 using System.Windows.Forms; 24 using System.Runtime.InteropServices;25 25 26 namespace HeuristicLab. Core.Views {26 namespace HeuristicLab.MainForm.WindowsForms { 27 27 public static class ControlExtensions { 28 28 [DllImport("user32.dll")] -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/HeuristicLab.MainForm.WindowsForms-3.2.csproj
r2900 r3177 93 93 </Compile> 94 94 <None Include="HeuristicLabMainFormWindowsFormsPlugin.cs.frame" /> 95 <Compile Include="ControlExtensions.cs" /> 95 96 <Compile Include="DockForm.cs"> 96 97 <SubType>Form</SubType> -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/View.cs
r2962 r3177 21 21 22 22 using System; 23 using System.Collections.Generic;24 using System.ComponentModel;25 using System.Drawing;26 using System.Data;27 using System.Text;28 using System.Xml;29 23 using System.Windows.Forms; 30 24 … … 161 155 protected virtual void OnInitialized(EventArgs e) { 162 156 } 157 158 public new bool Enabled { 159 get { return base.Enabled; } 160 set { 161 SuspendRepaint(); 162 base.Enabled = value; 163 ResumeRepaint(true); 164 } 165 } 166 167 public void SuspendRepaint() { 168 ((Control)this).SuspendRepaint(); 169 } 170 public void ResumeRepaint(bool refresh) { 171 ((Control)this).ResumeRepaint(refresh); 172 } 163 173 } 164 174 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs
r3149 r3177 146 146 Invoke(new EventHandler(Content_Started), sender, e); 147 147 else { 148 this.SuspendRepaint();149 148 SaveEnabled = false; 150 149 parameterCollectionView.Enabled = false; … … 156 155 resetButton.Enabled = false; 157 156 UpdateExecutionTimeTextBox(); 158 this.ResumeRepaint(true);159 157 } 160 158 } … … 163 161 Invoke(new EventHandler(Content_Stopped), sender, e); 164 162 else { 165 this.SuspendRepaint();166 163 SaveEnabled = true; 167 164 parameterCollectionView.Enabled = true; … … 173 170 resetButton.Enabled = true; 174 171 UpdateExecutionTimeTextBox(); 175 this.ResumeRepaint(true);176 172 } 177 173 } … … 207 203 this.Cursor = Cursors.AppStarting; 208 204 newProblemButton.Enabled = openProblemButton.Enabled = saveProblemButton.Enabled = false; 205 problemViewHost.Enabled = false; 209 206 210 207 var call = new Func<string, object>(XmlParser.Deserialize); … … 223 220 else 224 221 Content.Problem = problem; 222 problemViewHost.Enabled = true; 225 223 newProblemButton.Enabled = openProblemButton.Enabled = saveProblemButton.Enabled = true; 226 224 this.Cursor = Cursors.Default; … … 234 232 this.Cursor = Cursors.AppStarting; 235 233 newProblemButton.Enabled = openProblemButton.Enabled = saveProblemButton.Enabled = false; 234 problemViewHost.Enabled = false; 236 235 237 236 var call = new Action<IProblem, string, int>(XmlGenerator.Serialize); … … 246 245 } 247 246 Invoke(new Action(delegate() { 247 problemViewHost.Enabled = true; 248 248 newProblemButton.Enabled = openProblemButton.Enabled = saveProblemButton.Enabled = true; 249 249 this.Cursor = Cursors.Default; -
trunk/sources/HeuristicLab.Optimization.Views/3.3/UserDefinedAlgorithmView.cs
r2998 r3177 112 112 this.Cursor = Cursors.AppStarting; 113 113 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = saveOperatorGraphButton.Enabled = false; 114 operatorGraphViewHost.Enabled = false; 114 115 115 116 var call = new Func<string, object>(XmlParser.Deserialize); … … 127 128 else 128 129 Content.OperatorGraph = operatorGraph; 130 operatorGraphViewHost.Enabled = true; 129 131 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = saveOperatorGraphButton.Enabled = true; 130 132 this.Cursor = Cursors.Default; … … 138 140 this.Cursor = Cursors.AppStarting; 139 141 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = saveOperatorGraphButton.Enabled = false; 142 operatorGraphViewHost.Enabled = false; 140 143 141 144 var call = new Action<OperatorGraph, string, int>(XmlGenerator.Serialize); … … 150 153 } 151 154 Invoke(new Action(delegate() { 155 operatorGraphViewHost.Enabled = true; 152 156 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = saveOperatorGraphButton.Enabled = true; 153 157 this.Cursor = Cursors.Default; -
trunk/sources/HeuristicLab.Optimizer/3.3/FileManager.cs
r2961 r3177 28 28 using HeuristicLab.Core.Views; 29 29 using HeuristicLab.MainForm; 30 using HeuristicLab.MainForm.WindowsForms; 30 31 using HeuristicLab.Persistence.Default.Xml; 31 32 … … 241 242 private static void DisableView(IView view) { 242 243 Invoke(delegate() { 243 ((UserControl)view).Enabled = false; 244 ((Control)view).SuspendRepaint(); 245 ((Control)view).Enabled = false; 246 ((Control)view).ResumeRepaint(true); 244 247 }); 245 248 } 246 249 private static void EnableView(IView view) { 247 250 Invoke(delegate() { 248 ((UserControl)view).Enabled = true; 251 ((Control)view).SuspendRepaint(); 252 ((Control)view).Enabled = true; 253 ((Control)view).ResumeRepaint(true); 249 254 }); 250 255 }
Note: See TracChangeset
for help on using the changeset viewer.