public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                PropertyColumnScript s = null != o ? (PropertyColumnScript)o : new PropertyColumnScript();

                // deserialize the base class
                info.GetBaseValueEmbedded(s, typeof(AbstractScript), parent);

                return(s);
            }
		/// <summary>
		/// Creates a column script as a copy from another script.
		/// </summary>
		/// <param name="b">The script to copy from.</param>
		/// <param name="forModification">If true, the new script text can be modified.</param>
		public PropertyColumnScript(PropertyColumnScript b, bool forModification)
			: base(b, forModification)
		{
		}
		/// <summary>
		/// Creates a column script as a copy from another script.
		/// </summary>
		/// <param name="b">The script to copy from.</param>
		public PropertyColumnScript(PropertyColumnScript b)
			: this(b, false)
		{
		}
    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;
    }
Exemple #5
0
		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]];

			IColumnScriptText script;
			dataTable.PropertyColumns.ColumnScripts.TryGetValue(m_Column, out script);
			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))
			{
				dataTable.PropCols.ColumnScripts[m_Column] = (IColumnScriptText)args[0];
			}
			this.m_Column = null;
		}
 /// <summary>
 /// Creates a column script as a copy from another script.
 /// </summary>
 /// <param name="b">The script to copy from.</param>
 /// <param name="forModification">If true, the new script text can be modified.</param>
 public PropertyColumnScript(PropertyColumnScript b, bool forModification)
     : base(b, forModification)
 {
 }
 /// <summary>
 /// Creates a column script as a copy from another script.
 /// </summary>
 /// <param name="b">The script to copy from.</param>
 public PropertyColumnScript(PropertyColumnScript b)
     : this(b, false)
 {
 }