private void button_Click(object sender, RoutedEventArgs e)
        {
            Button button = sender as Button;

            for (int i = 0; i < _noteButtons.Count; i++)
            {
                if (_noteButtons[i] == button)
                {
                    NoteWindow noteWin = new NoteWindow(_noteIDs[i]);
                    noteWin.Owner = Owner;
                    noteWin.Show();
                    break;
                }
            }

            Close();
        }
        private void createWindow(WinType type)
        {
            Window win = null;

            switch (type)
            {
            case WinType.WinNote:
            case WinType.WinLoadNote:
                if (type == WinType.WinNote)
                {
                    win = new NoteWindow();
                }
                else
                {
                    win = new LoadNoteWindow();
                }
                win.Owner = this;
                win.Show();
                break;

            case WinType.WinSignIn:
            case WinType.WinRegister:
                for (int i = OwnedWindows.Count - 1; i >= 0; i--)
                {
                    OwnedWindows[i].Close();
                }
                if (OwnedWindows.Count > 0)
                {
                    break;
                }

                if (type == WinType.WinSignIn)
                {
                    win = new SignInWindow();
                }
                else
                {
                    win = new RegisterWindow();
                }

                win.Owner = this;
                win.ShowDialog();
                break;
            }
        }