Ejemplo n.º 1
0
        private void HandleHotkey(Message m)
        {
            if (m.LParam == (IntPtr)5832712)
            {
                if (this.WindowState == FormWindowState.Minimized)
                {
                    this.WindowState = FormWindowState.Normal;
                }

                this.Activate();

                this.Show();
                this.Focus();
                wpfStarterComboBox1.SetText(string.Empty);
                wpfStarterComboBox1.SetFocus();
            }
            else if (m.LParam == (IntPtr)5439496)
            {
                if (newTask.IsDisposed)
                {
                    newTask = new NewTask();
                }
                else
                {
                    newTask.Dispose();
                    newTask = new NewTask();
                }
                newTask.StartPosition = FormStartPosition.Manual;
                newTask.Show();
                newTask.Activate();
                newTask.WindowState = FormWindowState.Maximized;
                newTask.Focus();
                wpfStarterComboBox1.SetFocus();
            }
        }
Ejemplo n.º 2
0
        void ReleaseDesignerOutlets()
        {
            if (NewTask != null)
            {
                NewTask.Dispose();
                NewTask = null;
            }

            if (SearchBar != null)
            {
                SearchBar.Dispose();
                SearchBar = null;
            }

            if (taskListTableView != null)
            {
                taskListTableView.Dispose();
                taskListTableView = null;
            }
        }