Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/19/14 13:00:30 (10 years ago)
Author:
jkarder
Message:

#2077: created branch and added first version

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  
    118118  </ItemGroup>
    119119  <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>
    124123    </ProjectReference>
    125124    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
  • branches/CodeEditor/HeuristicLab.Scripting.Views/3.3/Plugin.cs.frame

    r11174 r11700  
    2525  [Plugin("HeuristicLab.Scripting.Views", "3.3.10.$WCREV$")]
    2626  [PluginFile("HeuristicLab.Scripting.Views-3.3.dll", PluginFileType.Assembly)]
    27   [PluginDependency("HeuristicLab.CodeEditor", "3.3")]
     27  [PluginDependency("HeuristicLab.CodeEditor", "3.4")]
    2828  [PluginDependency("HeuristicLab.Collections", "3.3")]
    2929  [PluginDependency("HeuristicLab.Common", "3.3")]
  • branches/CodeEditor/HeuristicLab.Scripting.Views/3.3/ScriptView.Designer.cs

    r11657 r11700  
    1919 */
    2020#endregion
     21
     22using System.Collections.Generic;
     23using System.Reflection;
     24using HeuristicLab.Common;
    2125
    2226namespace HeuristicLab.Scripting.Views {
     
    4650    private void InitializeComponent() {
    4751      this.components = new System.ComponentModel.Container();
    48       System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ScriptView));
    4952      this.compilationLabel = new System.Windows.Forms.Label();
    5053      this.imageList = new System.Windows.Forms.ImageList(this.components);
     
    214217      this.codeEditor.TabIndex = 0;
    215218      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);
    216223      this.codeEditor.TextEditorTextChanged += new System.EventHandler(this.codeEditor_TextEditorTextChanged);
    217224      //
    218225      // splitContainer1
    219226      //
    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)
    222229            | System.Windows.Forms.AnchorStyles.Right)));
    223230      this.splitContainer1.Location = new System.Drawing.Point(0, 56);
  • branches/CodeEditor/HeuristicLab.Scripting.Views/3.3/ScriptView.cs

    r11657 r11700  
    2222using System;
    2323using System.CodeDom.Compiler;
     24using System.Collections.Generic;
    2425using System.Drawing;
    2526using System.Globalization;
    2627using System.Linq;
     28using System.Reflection;
    2729using System.Windows.Forms;
     30using HeuristicLab.Common;
    2831using HeuristicLab.Common.Resources;
    2932using HeuristicLab.Core.Views;
     
    3538  [Content(typeof(Script), true)]
    3639  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
    3744    #region Properties
    3845    public new Script Content {
     
    7380        codeEditor.UserCode = string.Empty;
    7481      } 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());
    7984        if (Content.CompileErrors == null) {
    8085          compilationLabel.ForeColor = SystemColors.ControlDarkDark;
     
    131136        Locked = false;
    132137        codeEditor.Focus();
    133         OnContentChanged();
     138        //OnContentChanged();
    134139      }
    135140    }
     
    157162      }
    158163
    159       codeEditor.ShowCompileErrors(Content.CompileErrors, ".cs");
     164      codeEditor.ShowCompileErrors(Content.CompileErrors);
    160165
    161166      AdjustErrorListViewColumnSizes();
     
    196201    }
    197202    #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    }
    198227  }
    199228}
Note: See TracChangeset for help on using the changeset viewer.