Пример #1
0
        public NoteWindow(Note note)
        {
            InitializeComponent();

            _note = note;

            NoteTitleBox.Text   = _note.Title;
            NoteContentBox.Text = _note.Content;
#if RAZER
            SharpBladeHelper.Manager.Touchpad.SetWindow(this);
            SharpBladeHelper.Manager.DisableDynamicKey(RazerAPI.DynamicKeyType.DK1);
            SharpBladeHelper.Manager.DisableDynamicKey(RazerAPI.DynamicKeyType.DK2);
            SharpBladeHelper.Manager.DisableDynamicKey(RazerAPI.DynamicKeyType.DK3);
            SharpBladeHelper.Manager.DisableDynamicKey(RazerAPI.DynamicKeyType.DK5);
            SharpBladeHelper.Manager.DisableDynamicKey(RazerAPI.DynamicKeyType.DK10);
            SharpBladeHelper.Manager.DynamicKeyEvent += ManagerDynamicKeyEvent;
            SharpBladeHelper.Manager.EnableDynamicKey(RazerAPI.DynamicKeyType.DK1, @".\Resources\RazerNotesSave.png");
            SharpBladeHelper.Manager.EnableDynamicKey(RazerAPI.DynamicKeyType.DK2, @".\Resources\RazerNotesBack.png");

            SharpBladeHelper.Manager.Touchpad.EnableGesture(RazerAPI.GestureType.Tap);
            SharpBladeHelper.Manager.Touchpad.Gesture += TouchpadOnGesture;

            RenderPoll.RenderWindow = this;
            RenderPoll.Start();
#endif
        }
Пример #2
0
        public NotesWindow()
        {
            InitializeComponent();

#if RAZER
            SharpBladeHelper.Manager.Touchpad.DisableOSGesture(RazerAPI.GestureType.All);
            SharpBladeHelper.Manager.Touchpad.SetWindow(this);

            SharpBladeHelper.ShutdownListener();

            SharpBladeHelper.Manager.DynamicKeyEvent += OnDynamicKeyEvent;
            SharpBladeHelper.Manager.DisableDynamicKey(RazerAPI.DynamicKeyType.DK1);
            SharpBladeHelper.Manager.DisableDynamicKey(RazerAPI.DynamicKeyType.DK2);
            SharpBladeHelper.Manager.EnableDynamicKey(RazerAPI.DynamicKeyType.DK1, @".\Resources\RazerNotesAdd.png");
            SharpBladeHelper.Manager.EnableDynamicKey(RazerAPI.DynamicKeyType.DK2, @".\Resources\RazerNotesView.png");
            SharpBladeHelper.Manager.EnableDynamicKey(RazerAPI.DynamicKeyType.DK3, @".\Resources\RazerNotesEdit.png");
            SharpBladeHelper.Manager.EnableDynamicKey(RazerAPI.DynamicKeyType.DK4, @".\Resources\RazerNotesDelete.png");
            SharpBladeHelper.Manager.EnableDynamicKey(RazerAPI.DynamicKeyType.DK5, @".\Resources\RazerNotesDown.png");
            SharpBladeHelper.Manager.EnableDynamicKey(RazerAPI.DynamicKeyType.DK10, @".\Resources\RazerNotesUp.png");
#endif
            if (NotesListBox.Items.Count > 0)
            {
                NotesListBox.SelectedIndex = 0;
            }
#if RAZER
            RenderPoll.RenderWindow = this;
            RenderPoll.Start();
#endif
        }
Пример #3
0
        private void NewNote()
        {
#if RAZER
            SharpBladeHelper.Manager.Touchpad.ClearWindow();
            SharpBladeHelper.Manager.DynamicKeyEvent -= OnDynamicKeyEvent;
            RenderPoll.Stop();
#endif
            Application.Current.MainWindow = new NoteWindow();
            Close();
            Application.Current.MainWindow.Show();
        }
Пример #4
0
        private void Back()
        {
            DisposeCaretManager();

#if RAZER
            SharpBladeHelper.Manager.Touchpad.ClearWindow();
            SharpBladeHelper.Manager.DynamicKeyEvent -= ManagerDynamicKeyEvent;
            SharpBladeHelper.Manager.SetKeyboardCapture(false);
            SharpBladeHelper.Manager.Touchpad.DisableGesture(RazerAPI.GestureType.Tap);
            SharpBladeHelper.Manager.Touchpad.Gesture -= TouchpadOnGesture;
            RenderPoll.Stop();
#endif

            Application.Current.MainWindow = new NotesWindow();
            Close();
            Application.Current.MainWindow.Show();
        }
Пример #5
0
        private void ViewNote()
        {
            var selectedItem = NotesListBox.SelectedItem;

            if (selectedItem == null)
            {
                return;
            }
#if RAZER
            SharpBladeHelper.Manager.Touchpad.ClearWindow();
            SharpBladeHelper.Manager.DynamicKeyEvent -= OnDynamicKeyEvent;
            RenderPoll.Stop();
#endif
            Application.Current.MainWindow = new ViewNote((Note)selectedItem);
            Close();
            Application.Current.MainWindow.Show();
        }