protected override string GetArgument(int index, RCProcess.CustomCommandParser.CommandArg arg) { if (arg.Type == RCProcess.CustomCommandParser.DataType.ServerGroup) { return(this.currentServer); } return(base.GetArgument(index, arg)); }
protected virtual string GetArgument(int index, RCProcess.CustomCommandParser.CommandArg arg) { switch (arg.Type) { case RCProcess.CustomCommandParser.DataType.Date: { DateTimePicker dateTimePicker = this.controlArgs[index] as DateTimePicker; return(dateTimePicker.Value.ToString("yyyy/MM/dd HH:mm:ss")); } case RCProcess.CustomCommandParser.DataType.Boolean: { TwoRadioButton twoRadioButton = this.controlArgs[index] as TwoRadioButton; if (!twoRadioButton.Checked) { return("0"); } return("1"); } default: return(this.controlArgs[index].Text); } }
public ArgumentControl(Label label, Control control, RCProcess.CustomCommandParser.CommandArg argument) { this.Label = label; this.Control = control; this.Argument = argument; }