void plan2ui(rplan p) { dt1_plan.Text = p.starttm.ToString("D"); dt2_plan.Text = p.starttm.ToString("t"); text_plancycle.Text = p.cycle.ToString(); cb_planunit.Text = p.unit.ToString(); text_planmsg.Text = p.msg; }
void plan_add(rplan p) { if (p == null) { return; } plan_msghash.Add(p.msg, p.tb); plan_tbhash.Add(p.tb, p); }
void plan_click(object sender, EventArgs e) { if (!plan_tbhash.ContainsKey(sender)) { return; } rplan p = (rplan)plan_tbhash[sender]; plan2ui(p); //p.trigger(); // for test }
void plan_del(string msg) { if (!plan_msghash.ContainsKey(text_planmsg.Text)) { plan_log_func("!E: <" + msg + "> not found!"); return; } TextBox tb = (TextBox)plan_msghash[text_planmsg.Text]; rplan p = (rplan)plan_tbhash[tb]; p.stop(); plan_msghash.Remove(text_planmsg.Text); plan_tbhash.Remove(tb); plan_panel.del(tb); }