public override void Run(Altaxo.Worksheet.GUI.WorksheetController ctrl) { Altaxo.Data.DataTable dataTable = ctrl.DataTable; if (ctrl.SelectedPropertyColumns.Count == 0) { return; } m_Column = dataTable.PropertyColumns[ctrl.SelectedPropertyColumns[0]]; IScriptText script = (IScriptText)dataTable.PropertyColumns.ColumnScripts[m_Column]; if (script == null) { script = new PropertyColumnScript(); } object[] args = new object[] { script, new ScriptExecutionHandler(this.EhScriptExecution) }; if (Current.Gui.ShowDialog(args, "PropertyColumnScript of " + m_Column.Name)) { if (null != dataTable.PropertyColumns.ColumnScripts[m_Column]) { dataTable.PropertyColumns.ColumnScripts[m_Column] = (IColumnScriptText)args[0]; } else { dataTable.PropertyColumns.ColumnScripts.Add(m_Column, args[0]); } } this.m_Column = null; }
public override void Run(Altaxo.Gui.Worksheet.Viewing.WorksheetController ctrl) { Altaxo.Data.DataTable dataTable = ctrl.DataTable; if (ctrl.SelectedPropertyColumns.Count == 0) { return; } m_Column = dataTable.PropertyColumns[ctrl.SelectedPropertyColumns[0]]; dataTable.PropertyColumns.ColumnScripts.TryGetValue(m_Column, out var script); if (script == null) { script = new PropertyColumnScript(); } object[] args = new object[] { script, new ScriptExecutionHandler(EhScriptExecution) }; if (Current.Gui.ShowDialog(args, "PropertyColumnScript of " + m_Column.Name)) { dataTable.PropCols.ColumnScripts[m_Column] = (IColumnScriptText)args[0]; } m_Column = null; }