コード例 #1
0
        /// <summary>
        /// Handle HotKey is Pressed Event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void HotKeyDown(object sender, EventArgs e)
        {
            NoteWindow noteWindow = null;

            noteWindow = new NoteWindow(databaseManager.GetListTag());

            noteWindow.ShowInTaskbar = false;
            noteWindow.Owner         = Application.Current.MainWindow;

            noteWindow.Closed     += (s, args) => Application.Current.MainWindow.Focus();
            noteWindow.NoteUpdate += new NoteWindow.NoteUpdateHandler(NoteWindow_DoneClick);
            noteWindow.Show();
            noteWindow.Activate();
            noteWindow.Topmost = true;
            noteWindow.Topmost = false;
            noteWindow.Focus();
        }
コード例 #2
0
        /// <summary>
        /// Show Header in context menu
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LVShowItem_ContextMenu(object sender, RoutedEventArgs e)
        {
            Note note = listNote.SelectedItem as Note;

            if (note != null)
            {
                NoteWindow showWindow = new NoteWindow(note, databaseManager.GetSpecificListTag(note));

                showWindow.ShowInTaskbar = false;
                showWindow.Owner         = Application.Current.MainWindow;

                showWindow.Closed += (s, args) => showWindow = null;
                showWindow.Show();
                showWindow.Activate();
                showWindow.Topmost = true;
                showWindow.Topmost = false;
                showWindow.Focus();
            }
        }
コード例 #3
0
        /// <summary>
        /// Edit Header in context menu
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LVEditItem_ContextMenu(object sender, RoutedEventArgs e)
        {
            Note note = listNote.SelectedItem as Note;

            if (note != null)
            {
                NoteWindow noteWindow = new NoteWindow(note, databaseManager.GetSpecificListTag(note), databaseManager.GetListTag());

                noteWindow.ShowInTaskbar = false;
                noteWindow.Owner         = Application.Current.MainWindow;

                noteWindow.Closed     += (s, args) => noteWindow = null;
                noteWindow.NoteUpdate += new NoteWindow.NoteUpdateHandler(NoteWindow_DoneClick);
                noteWindow.Show();
                noteWindow.Activate();
                noteWindow.Topmost = true;
                noteWindow.Topmost = false;
                noteWindow.Focus();
            }
        }