void ScriptEditorControl_OnRun(object sender, ScriptEditorEventArgs e) { try { this.ScriptEditorControl_OnCompile(sender, e); this.chartFormManager.BacktesterRunSimulationRegular(); } catch (Exception ex) { Assembler.PopupException("ScriptEditorControl_OnRun", ex); } }
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); } }
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); } }
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); } }
void ScriptEditorControl_OnDebug(object sender, ScriptEditorEventArgs e) { throw new NotImplementedException(); }