private void ShowTip(MouseEventArgs e, MemorialDay md)
        {
            MDayDescTip.ToolTipTitle = md.Title;
            string msg = md.HandledDescription;

            MDayDescTip.Show(msg, this, e.X, e.Y, msg.Length << 9);
        }
예제 #2
0
        private void NewDate()
        {
            MemorialDay md = editForm.Create();

            if (md != null)
            {
                memorialDays.Add(md);
                DayListView.Items.Add(md.GetListViewItem());
            }
        }
예제 #3
0
 private void EditDate()
 {
     if (DayListView.SelectedItems.Count > 0)
     {
         MemorialDay md = DayListView.SelectedItems[0].Tag as MemorialDay;
         if (md != null)
         {
             editForm.Edit(md);
             md.Update();
         }
     }
 }
예제 #4
0
        public void Edit(MemorialDay md)
        {
            Text                 = "编辑:" + md.Title;
            DateTextBox.Text     = md.Date.ToString();
            DateTimePicker.Value = new DateTime((int)md.Date.Year, (int)md.Date.Month, (int)md.Date.Day);
            TitleTextBox.Text    = md.Title;
            DescTextBox.Text     = md.Description;

            switch (ShowDialog())
            {
            case DialogResult.OK:
                md.Date.Year   = uint.Parse(DateTextBox.Text.Substring(0, 4));
                md.Date.Month  = uint.Parse(DateTextBox.Text.Substring(5, 2));
                md.Date.Day    = uint.Parse(DateTextBox.Text.Substring(8, 2));
                md.Title       = TitleTextBox.Text;
                md.Description = DescTextBox.Text;
                break;

            default:
                break;
            }
        }