public bool SaveData(MGtd mgtd) { if (mgtd == null) { return false; } if (RbEver.Checked) { mgtd.EndType = CGtd.END_TYPE_EVER; return true; } if (RbLoop.Checked) { mgtd.EndType = CGtd.END_TYPE_LOOP; mgtd.ExeCount = decimal.ToInt32(SpLoop.Value); return true; } if (RbTime.Checked) { mgtd.EndType = CGtd.END_TYPE_TIME; mgtd.EndTime = DtTime.Value; return true; } return false; }
public void ShowData(MGtd mgtd) { if (mgtd != null && mgtd.Dates.Count == 1) { ADates dates = mgtd.Dates[0]; if (dates.Unit == CGtd.UNIT_SECOND) { if (dates.Type == CGtd.DATES_TYPE_EACH) { RbEach.Checked = true; SpEach.Value = dates.Values[0]; return; } if (dates.Type == CGtd.DATES_TYPE_WHEN) { RbWhen.Checked = true; foreach (int val in dates.Values) { SpWhen.Value = val; } return; } } } RbEach.Checked = true; }
public void ShowData(MGtd mgtd) { if (mgtd == null) { RbEver.Checked = true; return; } if (mgtd.EndType == CGtd.END_TYPE_LOOP) { RbLoop.Checked = true; if (mgtd.ExeCount > 0) { SpLoop.Value = mgtd.ExeCount; } return; } if (mgtd.EndType == CGtd.END_TYPE_TIME) { RbTime.Checked = true; if (mgtd.EndTime > DtTime.MinDate && mgtd.EndTime < DtTime.MaxDate) { DtTime.Value = mgtd.EndTime; } return; } RbEver.Checked = true; }
public bool SaveData(MGtd mgtd) { if (mgtd == null) { return false; } ADates dates = null; if (mgtd.Dates.Count == 1) { dates = mgtd.Dates[0]; } if (dates == null || dates.Unit != CGtd.UNIT_YEAR) { dates = new M.Dates.Year(); mgtd.Dates.Clear(); mgtd.Dates.Add(dates); } if (RbEach.Checked) { dates.Type = CGtd.DATES_TYPE_EACH; dates.Values.Clear(); dates.Values.Add(decimal.ToInt32(SpEach.Value)); return true; } return false; }
public void ShowData(MGtd mgtd) { if (mgtd == null) { return; } TbTips.Text = mgtd.Command; }
public bool SaveData(MGtd mgtd) { if (mgtd == null) { return false; } string tips = TbTips.Text; if (string.IsNullOrWhiteSpace(tips)) { Main.ShowAlert("请输入提示信息!"); TbTips.Focus(); return false; } mgtd.Command = tips; return true; }
public void ShowData(MGtd mgtd) { if (mgtd != null && mgtd.Dates.Count == 1) { ADates dates = mgtd.Dates[0]; if (dates.Unit == CGtd.UNIT_YEAR) { if (dates.Type == CGtd.DATES_TYPE_EACH) { RbEach.Checked = true; SpEach.Value = dates.Values[0]; return; } } } RbEach.Checked = true; }
public void Init(MGtd mgtd) { _MGtd = mgtd; switch (_MGtd.HintType) { case CGtd.HINT_TYPE_APPS: RbApps.Checked = true; break; case CGtd.HINT_TYPE_MAIL: RbMail.Checked = true; break; default: RbTips.Checked = true; break; } }
/// <summary> /// 提示相应的信息 /// </summary> /// <param name="gtd"></param> private void ShowHint(MGtd gtd) { if (_Main == null) { return; } foreach (var tmp in _Hinted) { if (tmp == gtd.Id) { return; } } _Main.ShowFlicker(); _Main.ShowBubbleTips(gtd.Subject); _Hinted.Add(gtd.Id); }
public void ShowData(MGtd mgtd) { }
public bool SaveData(MGtd mgtd) { return true; }
private void GtdEditor_Load(object sender, EventArgs e) { if (MGtd == null) { MGtd = new MGtd(); } TbTitle.Text = MGtd.Subject; switch (MGtd.Type) { case CGtd.TYPE_EVENT: RbEvent.Checked = true; break; case CGtd.TYPE_MATHS: RbMaths.Checked = true; break; default: RbDates.Checked = true; break; } UcStop.ShowData(MGtd); if (_Associated) { CkSwitch.Text = "已禁用(&D)"; CkSwitch.Checked = MGtd.Status == CGtd.STATUS_SUSPEND; } else { CkSwitch.Text = "保存为模板(&T)"; CkSwitch.Checked = MGtd.Shared; } }