Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/21/15 10:12:08 (9 years ago)
Author:
jkarder
Message:

#2077: merged r11700:11806 back to trunk

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources

  • trunk/sources/HeuristicLab.Operators.Programmable.Views/3.3/ProgrammableOperatorView.cs

    r11171 r11807  
    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.