public void btnNote_Click(object sender, EventArgs e) { lbMainName.Text = btnNote1.Text; //ColorChecker pnTool.Controls.Clear(); NoteForm r = new NoteForm(); r.Owner = this; r.TopLevel = false; r.AutoScroll = true; pnTool.Controls.Add(r); r.Show(); DetectButton(5); }
private void Note_button_Click(object sender, EventArgs e) { NoteForm form = new NoteForm(Administration.User, NoteAdministration); form.Note_Refresh(); this.Visible = false; var closing = form.ShowDialog(); if (closing == DialogResult.OK) { NoteAdministration = form.NoteAdministration; WriteToBinaryFile <List <Note> >(@"notes.bin", NoteAdministration.Notes); this.Visible = true; } }
//添加备注 private void CtxAddNote_Click(object sender, EventArgs e) { BathDBDataContext db_new = new BathDBDataContext(LogIn.connectionString); Seat seat = getContextSenderSeat(db_new, sender); if (seat.status != 2 && seat.status != 6) { GeneralClass.printErrorMsg("手牌未使用,不能添加备注"); return; } NoteForm noteForm = new NoteForm(); if (noteForm.ShowDialog() != DialogResult.OK) { return; } seat.note = noteForm.note; db_new.SubmitChanges(); }
private async Task ResetNoteFormAsync() => await NoteForm.ClearAsync();
private void OpenNote(object arg) { var openNoteForm = new NoteForm(); openNoteForm.Show(); }
public void Post([FromBody] NoteForm note) { _notesProcessor.Create(note); }
/// <summary> /// Registers and displays the given NoteForm. /// </summary> private void ShowNote(NoteForm noteForm) { noteForms.Add(noteForm); noteForm.HandleDestroyed += new EventHandler(NoteFormHandleDestroyed); noteForm.Show(PluginBase.MainForm); UpdateMenus(); }
/// <summary> /// Deletes all the visible sticky notes. /// </summary> private void DeleteAllNotes() { NoteForm[] notes = new NoteForm[noteForms.Count]; noteForms.CopyTo(notes); foreach (NoteForm noteForm in notes) { noteForm.Delete(false); } }
/// <summary> /// Create a new empty sticky note /// </summary> private void CreateNote(Object sender, EventArgs e) { Note note = (Note)preferences.Note.Copy(); note.Guid = System.Guid.NewGuid().ToString(); note.Left = Control.MousePosition.X - note.Width / 2; note.Top = Control.MousePosition.Y - note.Height / 2; NoteForm noteForm = new NoteForm(this, note, true); ShowNote(noteForm); noteForm.Activate(); }