Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/06/15 12:44:09 (10 years ago)
Author:
jkarder
Message:

#2077: merged r11807:11811, r11816, r11819, r11822, r11825, r11834, r11835, r11836, r11933 and r11936 into stable

Location:
stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Operators.Programmable.Views/3.3/ProgrammableOperatorView.cs

    r11170 r11937  
    8282      base.OnContentChanged();
    8383      if (ProgrammableOperator == null) {
    84         codeEditor.UserCode = "";
     84        codeEditor.UserCode = string.Empty;
    8585        assembliesTreeView.Nodes.Clear();
    8686        parameterCollectionView.Content = null;
    8787      } else {
    8888        codeEditor.Prefix = GetGeneratedPrefix();
    89         codeEditor.Suffix = String.Format("    {0}\n  }}\n}}", ProgrammableOperator.MethodSuffix);
     89        codeEditor.Suffix = String.Format("    {0}{1}  }}{1}}}", ProgrammableOperator.MethodSuffix, Environment.NewLine);
    9090        codeEditor.UserCode = ProgrammableOperator.Code;
    91         if (codeEditor.UserCode == "")
    92           codeEditor.UserCode = "    \n    \n    \n    \n";
     91        if (codeEditor.UserCode == string.Empty)
     92          codeEditor.UserCode = string.Format("    {0}", Environment.NewLine);
    9393        InitializeAssemblyList();
    9494        InitializeNamespacesList();
    95         foreach (var a in ProgrammableOperator.SelectedAssemblies) {
    96           codeEditor.AddAssembly(a);
    97         }
     95        codeEditor.AddAssemblies(ProgrammableOperator.SelectedAssemblies);
    9896        codeEditor.ScrollAfterPrefix();
    99         codeEditor.ShowCompileErrors(ProgrammableOperator.CompileErrors, "ProgrammableOperator");
    100         showCodeButton.Enabled =
    101           ProgrammableOperator.CompilationUnitCode != null &&
    102           ProgrammableOperator.CompilationUnitCode.Length > 0;
     97        codeEditor.ShowCompileErrors(ProgrammableOperator.CompileErrors);
     98        showCodeButton.Enabled = !string.IsNullOrEmpty(ProgrammableOperator.CompilationUnitCode);
    10399        parameterCollectionView.Content = ProgrammableOperator.Parameters;
    104100        if (ProgrammableOperator.CompileErrors == null) {
Note: See TracChangeset for help on using the changeset viewer.