예제 #1
0
 public override ICommand UpdateChartTemplateCommand(CurveChartTemplate template, IWithChartTemplates withChartTemplates, string templateName)
 {
     return(updateChartTemplates(withChartTemplates, x =>
     {
         withChartTemplates.RemoveChartTemplate(templateName);
         template.Name = templateName;
         withChartTemplates.AddChartTemplate(template);
     }));
 }
        public override ICommand UpdateChartTemplateCommand(CurveChartTemplate curveChartTemplate, IWithChartTemplates withChartTemplates, string templateName)
        {
            if (withChartTemplates.IsAnImplementationOf <IMoBiSimulation>())
            {
                return(new UpdateChartTemplateInSimulationSettingsCommand(curveChartTemplate, withChartTemplates.DowncastTo <IMoBiSimulation>(), templateName).Run(_context));
            }

            return(updateChartTemplates(withChartTemplates, x =>
            {
                withChartTemplates.RemoveChartTemplate(templateName);
                curveChartTemplate.Name = templateName;
                withChartTemplates.AddChartTemplate(curveChartTemplate);
            }));
        }
예제 #3
0
 public override ICommand UpdateChartTemplateCommand(CurveChartTemplate template, IWithChartTemplates withChartTemplates, string templateName)
 {
     withChartTemplates.AddChartTemplate(template);
     return(new OSPSuiteEmptyCommand <IOSPSuiteExecutionContext>());
 }