示例#1
0
        private void newNote_Click(object sender, RoutedEventArgs e)
        {
            NoteControl noteControl = new NoteControl();

            noteControl.Owner  = mainWindow;
            mainWindow.Opacity = 0.4;
            noteControl.controlType.Content = "New Note";
            noteControl.ShowDialog();
            listNote();
        }
示例#2
0
        private void editNote_Click(object sender, RoutedEventArgs e)
        {
            NoteControl noteControl = new NoteControl();

            noteControl.Owner  = mainWindow;
            mainWindow.Opacity = 0.4;
            noteControl.controlType.Content = "Edit Note";
            noteControl.itemID     = selectedNote.id;
            noteControl.title.Text = selectedNote.title;
            noteControl.content.AppendText(selectedNote.content);
            noteControl.ShowDialog();

            listNote();
        }
示例#3
0
        private void viewNote_Click(object sender, RoutedEventArgs e)
        {
            NoteControl viewNote = new NoteControl();

            viewNote.Owner               = mainWindow;
            mainWindow.Opacity           = 0.4;
            viewNote.controlType.Content = "View";

            //Disable save and close button and active close button
            viewNote.saveNote.Visibility       = Visibility.Hidden;
            viewNote.cancelSaveNote.Visibility = Visibility.Hidden;
            viewNote.close.Visibility          = Visibility.Visible;

            viewNote.title.Text       = selectedNote.title;
            viewNote.title.IsReadOnly = true;

            viewNote.content.AppendText(selectedNote.content);
            viewNote.content.IsReadOnly = true;

            viewNote.ShowDialog();
        }