Example #1
0
        public MiscViewModel(ViewModelMain owner)
            : base(owner)
        {
            OpenHyperlinkCommand        = new RelayCommand(OpenHyperlink);
            OpenSettingsWindowCommand   = new RelayCommand(OpenSettingsWindow);
            OpenShortcutWindowCommand   = new RelayCommand(OpenShortcutWindow);
            OpenHelloThereWindowCommand = new RelayCommand(OpenHelloThereWindow);

            ShortcutPopup = new ShortcutPopup(owner.ShortcutController);
        }
Example #2
0
        //set key shorcut to play sound
        private void Shortcut(object sender, EventArgs e)
        {
            Sound sound = (Sound)this.soundsList.SelectedItem;
            if (sound != null)
            {
                ShortcutPopup popup = new ShortcutPopup();
                popup.Text = sound.ToString() + " Shortcut";
                popup.Key = ShortcutManager<Keys>.GetInstance().GetShortcut(sound);
                popup.Note = ShortcutManager<NoteID>.GetInstance(NoteID.Comparer).GetShortcut(sound);
                popup.ShowDialog();

                ShortcutManager<Keys>.GetInstance().SetShortcut(sound, popup.Key);
                ShortcutManager<NoteID>.GetInstance(NoteID.Comparer).SetShortcut(sound, popup.Note);
            }
        }