public void Display(PostIt postIt) { if (postIt.GetText() != tb.Text) { tb.Text = postIt.GetText(); } Location = new Point(postIt.GetX(), postIt.GetY()); if (postIt.IsSelected()) { Selected(); } else { Deseleted(); } }
public override void ActionMouseDown(object sender, MouseEventArgs e) { if (view.CursorButtonIsChecked()) { if (e.Button == MouseButtons.Left) { if ((Control.ModifierKeys & Keys.Shift) != Keys.Shift) { model.UnselectAll(); postIt.SetSelect(true); } else { postIt.SetSelect(!postIt.IsSelected()); } model.PopUpPostIt(postIt); } } UpdateView(); mousePosition = e.Location; }