public override IConfig Clone() { CActionParam config = new CActionParam(Name); config.SystemContext = SystemContext; this.CopyTo(config); return(config); }
public static IActionParam BuildActionParamConfig(IMonitorSystemContext context, string xml) { CActionParam config = new CActionParam(); config.SystemContext = context; if (config.BuildConfig(xml)) { return(config); } else { return(null); } }
private void listBox_action_total_DoubleClick(object sender, EventArgs e) { if (listBox_action_total.SelectedIndex >= 0) { IActionConfig config = listBox_action_total.Items[listBox_action_total.SelectedIndex] as IActionConfig; if (config != null) { IActionParam paramConfig = new CActionParam(config.Name); paramConfig.Desc = config.Desc; paramConfig.Enabled = false; checkedListBox_action.Items.Add(paramConfig, paramConfig.Enabled); } } }
private void SetTaskAction(ArrayList list, XmlNode node) { if (node != null && node.FirstChild != null) { CActionParam config = new CActionParam(); foreach (XmlNode xSubNode in node.ChildNodes) { if (!xSubNode.Name.Equals("#comment") && xSubNode.FirstChild != null && xSubNode.FirstChild.Value != null) { config.SetValue(xSubNode.Name, xSubNode.FirstChild.Value); } } config.Name = config.StrValue("Name"); lock (list.SyncRoot) { list.Add(config); } } }