Ejemplo n.º 1
0
 void ScriptEditorControl_OnRun(object sender, ScriptEditorEventArgs e)
 {
     try {
         this.ScriptEditorControl_OnCompile(sender, e);
         this.chartFormManager.BacktesterRunSimulationRegular();
     } catch (Exception ex) {
         Assembler.PopupException("ScriptEditorControl_OnRun", ex);
     }
 }
Ejemplo n.º 2
0
 void ScriptEditorControl_OnSave(object sender, ScriptEditorEventArgs e)
 {
     try {
         this.strategy.ScriptSourceCode = e.ScriptText;
         this.strategyRepository.StrategySave(this.strategy);
         this.chartFormManager.MainForm.DisplayStatus("Strategy [" + Path.Combine(this.strategy.StoredInFolderRelName, this.strategy.StoredInJsonRelName) + "] saved");
         this.chartFormManager.ScriptEditedNeedsSaving = false;
         this.chartFormManager.PopulateWindowTitlesFromChartContextOrStrategy();
     } catch (Exception ex) {
         Assembler.PopupException("ScriptEditorControl_OnSave", ex);
     }
 }
Ejemplo n.º 3
0
 void ScriptEditorControl_OnCompile(object sender, ScriptEditorEventArgs e)
 {
     try {
         this.ScriptEditorControl_OnSave(sender, e);
     } catch (Exception ex) {
         Assembler.PopupException("SAVING_STRATEGY_SOURCE_CODE_FAILED //ScriptEditorControl_OnSave() << ScriptEditorControl_OnCompile()", ex);
     }
     try {
         this.chartFormManager.StrategyCompileActivatePopulateSlidersShow();
     } catch (Exception ex) {
         Assembler.PopupException("COMPILING_STRATEGY_SOURCE_CODE_FAILED //ScriptEditorControl_OnCompile() << StrategyCompileActivatePopulateSlidersShow() has thrown", ex);
     }
 }
Ejemplo n.º 4
0
 void ScriptEditorControl_OnTextNotSaved(object sender, ScriptEditorEventArgs e)
 {
     try {
         if (this.chartFormManager.ScriptEditedNeedsSaving)
         {
             return;
         }
         this.chartFormManager.ScriptEditedNeedsSaving = true;
         this.chartFormManager.PopulateWindowTitlesFromChartContextOrStrategy();
     } catch (Exception ex) {
         Assembler.PopupException("ScriptEditorControl_OnTextNotSaved", ex);
     }
 }
Ejemplo n.º 5
0
 void ScriptEditorControl_OnDebug(object sender, ScriptEditorEventArgs e)
 {
     throw new NotImplementedException();
 }