Beispiel #1
0
        private void CallEditeNoteWindow(object sender, EventArgs args)
        {
            var createWindow = new AddOrEditNote(NotesList[_noteIndex]);

            _isCreatedNew = false;
            createWindow.SaveButtonClicked += SaveNoteChanges;
            createWindow.WindowClosed      += Window_Closed;
            Enabled = false;
            createWindow.Show();
        }
Beispiel #2
0
        private void CallCreateNoteWindow(object sender, EventArgs args)
        {
            if (NotesList.Count == 50)
            {
                MessageBox.Show("Достигнуто максимаьлное число заметок! Очистите список, чтобы добавить новые.");
                return;
            }
            var createWindow = new AddOrEditNote();

            _isCreatedNew = true;
            createWindow.SaveButtonClicked += SaveNoteChanges;
            createWindow.WindowClosed      += Window_Closed;
            Enabled = false;
            createWindow.Show();
        }