Ejemplo n.º 1
0
 private void newReminderControl(int i)
 {
     if (i == 0)
     {
         ReminderControl0.Message = Settings.Default.RemindMessage[i];
         ReminderControl0.RemindTime = Settings.Default.RemindAt[i];
         ReminderControl0.Index = 0;
         ReminderControl0.RemindFinish = Settings.Default.RemindCompleted[i];
         ReminderControl0.Show();
         ReminderControl0.Tag = ReminderControl0.Location.Y + ReminderControl0.Size.Height;
     }
     else
     {
         ReminderControl remindctrl = new ReminderControl()
         {
             ParentForm = this,
             Name = "ReminderControl" + i.ToString(),
             MinimumSize = ReminderControl0.MinimumSize,
             Location = new Point(4,
                        (int)((ReminderControl)panel2.Controls["ReminderControl" + (i - 1).ToString()]).Tag + 8),
             Message = Settings.Default.RemindMessage[i],
             RemindTime = Settings.Default.RemindAt[i],
             Index = i,
             RemindFinish = Settings.Default.RemindCompleted[i]
         };
         panel2.Controls.Add(remindctrl);
         remindctrl.Tag = remindctrl.Location.Y + remindctrl.Size.Height;
     }
 }
Ejemplo n.º 2
0
        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);

            if (lastReminderClick != this )
            {
                if (lastReminderClick != null) lastReminderClick.LastState = ReminderMouseState.LostFocus;
                if (lastState != ReminderMouseState.Clicked)
                {
                    base.BackColor = ((Main)ParentForm).NoteLabelColor(Main.NoteLabelStatus.Clicked);
                    lastState = ReminderMouseState.Clicked;
                }
                lastReminderClick = this;
            }
        }