public GXMacroEditDlg(GXMacro macro) { InitializeComponent(); _macro = macro; NameTb.Text = macro.Name; DescriptionTb.Text = macro.Description; EnabledCb.Checked = !macro.Disable; }
public GXMacroDelayDlg(GXMacro macro) { InitializeComponent(); _macro = macro; int delay = 1000; if (!string.IsNullOrEmpty(macro.Value)) { delay = int.Parse(macro.Value); } NameTb.Text = macro.Name; DelayTb.Value = new DateTime(2000, 1, 1).AddMilliseconds(delay); DescriptionTb.Text = macro.Description; }
/// <summary> /// Clone macro object. /// </summary> /// <returns></returns> public GXMacro Clone() { GXMacro target = new GXMacro(); target.Timestamp = Timestamp; target.Disable = Disable; target.Verify = Verify; target.Type = Type; target.Name = Name; target.Device = Device; target.ObjectType = ObjectType; target.LogicalName = LogicalName; target.Index = Index; target.Value = Value; target.Data = Data; target.Exception = Exception; target.DataType = DataType; target.UIDataType = UIDataType; target.Parameters = Parameters; target.External = External; return(target); }