private void btnNewNote_Click(object sender, RoutedEventArgs e)
        {
            // Mo man hinh new note moi.
            NewNoteWindow newNoteWindow = new NewNoteWindow(selectedTag, xlTag, xlTextNote);

            newNoteWindow.ShowDialog();
        }
 public static IntPtr hookProc(int code, IntPtr wParam, IntPtr lParam)
 {
     if (code >= 0 && wParam == (IntPtr)WM_KEYDOWN)
     {
         int vkCode = Marshal.ReadInt32(lParam);
         //////ОБРАБОТКА НАЖАТИЯ
         if (vkCode.ToString() == "162")
         {
             NewNoteWindow newNoteWindow = new NewNoteWindow(xlTag, xlTextNote);
             newNoteWindow.WindowState = WindowState.Normal;
             newNoteWindow.ShowDialog();
         }
     }
     return(CallNextHookEx(hhook, code, (int)wParam, lParam));
 }
Esempio n. 3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.addNoteWindow = ((ViewNoteWindow.NewNoteWindow)(target));
                return;

            case 2:
                this.infoNewNote = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.txtTitleNote = ((Xceed.Wpf.Toolkit.WatermarkTextBox)(target));

            #line 22 "..\..\..\views\NewNoteWindow.xaml"
                this.txtTitleNote.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtTitleNote_TextChanged);

            #line default
            #line hidden
                return;

            case 4:
                this.btnDone = ((System.Windows.Controls.Button)(target));

            #line 24 "..\..\..\views\NewNoteWindow.xaml"
                this.btnDone.Click += new System.Windows.RoutedEventHandler(this.btnDone_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.txtlistTag = ((Xceed.Wpf.Toolkit.WatermarkTextBox)(target));

            #line 29 "..\..\..\views\NewNoteWindow.xaml"
                this.txtlistTag.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtlistTag_TextChanged);

            #line default
            #line hidden
                return;

            case 6:
                this.infoContentNote = ((System.Windows.Controls.Grid)(target));
                return;
            }
            this._contentLoaded = true;
        }
        private void menuNewNote_Click(object sender, RoutedEventArgs e)
        {
            NewNoteWindow newNoteWindow = new NewNoteWindow(xlTag, xlTextNote);

            newNoteWindow.ShowDialog();
        }