private void del_Click(object sender, EventArgs e) { List <Event> eventslist = new List <Event>(); //如果是备忘任务,这个会显示到所有的日期列表的最后面 - 暂时这样显示 EventDataDict.GetInstance().RemoveEventWithID(event_id.Text); }
/** * 添加事件 */ private void add_Click(object sender, EventArgs e) { int etype = event_type.SelectedIndex; //创建任务 if (mIsCreate == true) { Event evt = new Event(eventTitle.Text, hourTxt.Text + ":" + minuteTxt.Text, selectedDate.Text, etype); EventDataDict.GetInstance().AddEvent(evt); } // 编辑任务 else { //如果是备忘任务,这个会显示到所有的日期列表的最后面 - 暂时这样显示 Event evt = EventDataDict.GetInstance().GetEventWithID(event_id.Text); if (evt != null) { evt.Time = hourTxt.Text + ":" + minuteTxt.Text; evt.Title = eventTitle.Text; //改变类型的情况下,备忘任务改成其他任务会自动改变日期 if (evt.Type != etype && evt.Type == 2) { EventDataDict.GetInstance().EventMoveToDate(evt, etype, mCurrentSelectedDate); } else { EventDataDict.GetInstance().UpdateEvent(evt, etype); } } } }
private void onHideDialog(object sender, EventArgs e) { mEventData.closed = 1; EventDataDict.GetInstance().UpdateEvent(mEventData, mEventData.Type); this.Close(); }