Changeset 11700 for branches/CodeEditor/HeuristicLab.Scripting.Views
- Timestamp:
- 12/19/14 13:00:30 (10 years ago)
- Location:
- branches/CodeEditor
- Files:
-
- 4 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/CodeEditor/HeuristicLab.Scripting.Views/3.3/HeuristicLab.Scripting.Views-3.3.csproj
r11623 r11700 118 118 </ItemGroup> 119 119 <ItemGroup> 120 <ProjectReference Include="..\..\HeuristicLab.CodeEditor\3.3\HeuristicLab.CodeEditor-3.3.csproj"> 121 <Project>{489cfe09-fdf7-4c89-bab5-bd09cadd61ad}</Project> 122 <Name>HeuristicLab.CodeEditor-3.3</Name> 123 <Private>False</Private> 120 <ProjectReference Include="..\..\HeuristicLab.CodeEditor\3.4\HeuristicLab.CodeEditor-3.4.csproj"> 121 <Project>{c38691ae-ecb4-489a-a05d-b035554e0168}</Project> 122 <Name>HeuristicLab.CodeEditor-3.4</Name> 124 123 </ProjectReference> 125 124 <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj"> -
branches/CodeEditor/HeuristicLab.Scripting.Views/3.3/Plugin.cs.frame
r11174 r11700 25 25 [Plugin("HeuristicLab.Scripting.Views", "3.3.10.$WCREV$")] 26 26 [PluginFile("HeuristicLab.Scripting.Views-3.3.dll", PluginFileType.Assembly)] 27 [PluginDependency("HeuristicLab.CodeEditor", "3. 3")]27 [PluginDependency("HeuristicLab.CodeEditor", "3.4")] 28 28 [PluginDependency("HeuristicLab.Collections", "3.3")] 29 29 [PluginDependency("HeuristicLab.Common", "3.3")] -
branches/CodeEditor/HeuristicLab.Scripting.Views/3.3/ScriptView.Designer.cs
r11657 r11700 19 19 */ 20 20 #endregion 21 22 using System.Collections.Generic; 23 using System.Reflection; 24 using HeuristicLab.Common; 21 25 22 26 namespace HeuristicLab.Scripting.Views { … … 46 50 private void InitializeComponent() { 47 51 this.components = new System.ComponentModel.Container(); 48 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ScriptView));49 52 this.compilationLabel = new System.Windows.Forms.Label(); 50 53 this.imageList = new System.Windows.Forms.ImageList(this.components); … … 214 217 this.codeEditor.TabIndex = 0; 215 218 this.codeEditor.UserCode = ""; 219 this.codeEditor.AssembliesLoaded += new System.EventHandler<EventArgs<IEnumerable<Assembly>>>(this.codeEditor_AssembliesLoaded); 220 this.codeEditor.AssembliesLoading += new System.EventHandler<EventArgs<IEnumerable<Assembly>>>(this.codeEditor_AssembliesLoading); 221 this.codeEditor.AssembliesUnloaded += new System.EventHandler<EventArgs<IEnumerable<Assembly>>>(this.codeEditor_AssembliesUnloaded); 222 this.codeEditor.AssembliesUnloading += new System.EventHandler<EventArgs<IEnumerable<Assembly>>>(this.codeEditor_AssembliesUnloading); 216 223 this.codeEditor.TextEditorTextChanged += new System.EventHandler(this.codeEditor_TextEditorTextChanged); 217 224 // 218 225 // splitContainer1 219 226 // 220 this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 221 | System.Windows.Forms.AnchorStyles.Left) 227 this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 228 | System.Windows.Forms.AnchorStyles.Left) 222 229 | System.Windows.Forms.AnchorStyles.Right))); 223 230 this.splitContainer1.Location = new System.Drawing.Point(0, 56); -
branches/CodeEditor/HeuristicLab.Scripting.Views/3.3/ScriptView.cs
r11657 r11700 22 22 using System; 23 23 using System.CodeDom.Compiler; 24 using System.Collections.Generic; 24 25 using System.Drawing; 25 26 using System.Globalization; 26 27 using System.Linq; 28 using System.Reflection; 27 29 using System.Windows.Forms; 30 using HeuristicLab.Common; 28 31 using HeuristicLab.Common.Resources; 29 32 using HeuristicLab.Core.Views; … … 35 38 [Content(typeof(Script), true)] 36 39 public partial class ScriptView : NamedItemView { 40 private const string AssembliesLoadingMessage = "Loading Assemblies"; 41 private const string AssembliesUnloadingMessage = "Unloading Assemblies"; 42 private const int SilentAssemblyLoadingOperationLimit = 10; 43 37 44 #region Properties 38 45 public new Script Content { … … 73 80 codeEditor.UserCode = string.Empty; 74 81 } else { 75 if (codeEditor.UserCode != Content.Code) 76 codeEditor.UserCode = Content.Code; 77 foreach (var asm in Content.GetAssemblies()) 78 codeEditor.AddAssembly(asm); 82 codeEditor.UserCode = Content.Code; 83 codeEditor.AddAssembliesAsync(Content.GetAssemblies()); 79 84 if (Content.CompileErrors == null) { 80 85 compilationLabel.ForeColor = SystemColors.ControlDarkDark; … … 131 136 Locked = false; 132 137 codeEditor.Focus(); 133 OnContentChanged();138 //OnContentChanged(); 134 139 } 135 140 } … … 157 162 } 158 163 159 codeEditor.ShowCompileErrors(Content.CompileErrors , ".cs");164 codeEditor.ShowCompileErrors(Content.CompileErrors); 160 165 161 166 AdjustErrorListViewColumnSizes(); … … 196 201 } 197 202 #endregion 203 204 private void codeEditor_AssembliesLoading(object sender, EventArgs<IEnumerable<Assembly>> e) { 205 if (e.Value.Count() <= SilentAssemblyLoadingOperationLimit) return; 206 var mainForm = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>(); 207 mainForm.AddOperationProgressToView(this, AssembliesLoadingMessage); 208 } 209 210 private void codeEditor_AssembliesLoaded(object sender, EventArgs<IEnumerable<Assembly>> e) { 211 if (e.Value.Count() <= SilentAssemblyLoadingOperationLimit) return; 212 var mainForm = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>(); 213 mainForm.RemoveOperationProgressFromView(this); 214 } 215 216 private void codeEditor_AssembliesUnloading(object sender, EventArgs<IEnumerable<Assembly>> e) { 217 if (e.Value.Count() <= SilentAssemblyLoadingOperationLimit) return; 218 var mainForm = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>(); 219 mainForm.AddOperationProgressToView(this, AssembliesUnloadingMessage); 220 } 221 222 private void codeEditor_AssembliesUnloaded(object sender, EventArgs<IEnumerable<Assembly>> e) { 223 if (e.Value.Count() <= SilentAssemblyLoadingOperationLimit) return; 224 var mainForm = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>(); 225 mainForm.RemoveOperationProgressFromView(this); 226 } 198 227 } 199 228 }
Note: See TracChangeset
for help on using the changeset viewer.