Beispiel #1
0
        private void BtnNewNote_Click(object sender, RoutedEventArgs e)
        {
            var nw = new NoteWindow(NoteManager);

            nw.TitleColor = TitleColor;
            //nw.Show();
        }
Beispiel #2
0
 public void Add(NoteWindow noteWindow, bool show = true)
 {
     Notes.Add(noteWindow);
     if (show)
     {
         noteWindow.Show();
     }
     OnNewNote(new NoteEventArgs(noteWindow));
 }
Beispiel #3
0
        public MainWindow()
        {
            InitializeComponent();
            //NoteWindow nw = new NoteWindow();
            //nw.Show();
            //242x126

            NoteManager = new NoteManager();

            NoteManager.NewNote         += NoteManager_NewNote;
            NoteManager.NoteClosed      += NoteManager_NoteClosed;
            NoteManager.NoteTextChanged += NoteManager_NoteTextChanged;

            NoteManager.LoadNotes("CasualNotes.json");

            if (NoteManager.IsEmpty)
            {
                NoteWindow nw = new NoteWindow(NoteManager);
                nw.Show();
            }
        }
Beispiel #4
0
 public void UpdateNote(NoteWindow nw)
 {
     OnNoteTextChanged(new NoteEventArgs(nw));
 }
Beispiel #5
0
 public bool Remove(NoteWindow noteWindow)
 {
     OnNoteClosed(new NoteEventArgs(noteWindow));
     return(Notes.Remove(noteWindow));
 }
Beispiel #6
0
 public NoteEventArgs(NoteWindow nw)
 {
     noteWindow = nw;
 }