Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/08/19 11:36:09 (5 years ago)
Author:
dpiringe
Message:

#3026

  • added ConvertableAttribute, a new attribute for classes/structs (usage: convertable with JsonInterface)
  • changed JCGenerator -> is now a static class with one public static method Instantiate
  • changed JCInstantiator -> is now a static class with one public static method GenerateTemplate
  • refactored JsonItem
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/FileManager.cs

    r17339 r17349  
    4343
    4444        if (saveFileDialog.ShowDialog() == DialogResult.OK) {
    45           JCGenerator gen = new JCGenerator();
    4645          IAlgorithm alg = namedItem as IAlgorithm;
    47           File.WriteAllText(saveFileDialog.FileName, gen.GenerateTemplate(alg));
     46          File.WriteAllText(saveFileDialog.FileName, JCGenerator.GenerateTemplate(alg));
    4847        }
    4948      }
     
    6261
    6362      if (openFileDialog.ShowDialog() == DialogResult.OK) {
    64         JCInstantiator instantiator = new JCInstantiator();
    6563        try {
    66           var content = instantiator.Instantiate(openFileDialog.FileName);
     64          var content = JCInstantiator.Instantiate(openFileDialog.FileName);
    6765          IView view = MainFormManager.MainForm.ShowContent(content);
    6866          if (view == null)
Note: See TracChangeset for help on using the changeset viewer.