Exemplo n.º 1
0
        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            var vm = this.DataContext as MainViewModel;

            // Launch the console app
            if (e.Key == Key.Escape)
            {
                vm.StartCal();
               
            }
            else if (e.Key == Key.C && Keyboard.Modifiers == ModifierKeys.Control)
            {
                var contentConfigWindow = Application.Current.Windows.Cast<Window>().SingleOrDefault(w => w.Name == "MediaContentConfiguration");
                if (contentConfigWindow == null)
                    contentConfigWindow = new KAIT.Kiosk.MediaContentConfiguration();

                var mediaContentConfigurationViewModel = new MediaContentConfigurationViewModel(vm.ConfigurationProvider);
                contentConfigWindow.DataContext = mediaContentConfigurationViewModel;
                contentConfigWindow.ShowDialog();
            }
        }
Exemplo n.º 2
0
        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            var vm = this.DataContext as MainViewModel;

            // Launch the console app
            if (e.Key == Key.Escape)
            {
                vm.StartCal();
            }
            else if (e.Key == Key.C && Keyboard.Modifiers == ModifierKeys.Control)
            {
                var contentConfigWindow = Application.Current.Windows.Cast <Window>().SingleOrDefault(w => w.Name == "MediaContentConfiguration");
                if (contentConfigWindow == null)
                {
                    contentConfigWindow = new KAIT.Kiosk.MediaContentConfiguration();
                }

                var mediaContentConfigurationViewModel = new MediaContentConfigurationViewModel(vm.ConfigurationProvider);
                contentConfigWindow.DataContext = mediaContentConfigurationViewModel;
                contentConfigWindow.ShowDialog();
            }
        }