예제 #1
0
        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);
        }
예제 #2
0
        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;
            }
        }
예제 #3
0
        //添加备注
        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();
예제 #5
0
        private void OpenNote(object arg)
        {
            var openNoteForm = new NoteForm();

            openNoteForm.Show();
        }
예제 #6
0
 public void Post([FromBody] NoteForm note)
 {
     _notesProcessor.Create(note);
 }
예제 #7
0
 /// <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();
 }
예제 #8
0
 /// <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);
     }
 }
예제 #9
0
 /// <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();
 }