Exemple #1
0
        private void CloseUnusedWindows()
        {
            if (keyboardInputSetupScreen != null)
            {
                keyboardInputSetupScreen.Close();
                keyboardInputSetupScreen = null;
            }

            if (mouseInputSetupScreen != null)
            {
                mouseInputSetupScreen.Close();
                mouseInputSetupScreen = null;
            }
        }
Exemple #2
0
        public void ShowInputCreationScreen(object sender, RoutedEventArgs e)
        {
            Instruction obj = ((FrameworkElement)sender).DataContext as Instruction;

            CloseUnusedWindows();
            if (obj.instructionType == InstructionType.KEYBOARD)
            {
                keyboardInputSetupScreen = new KeyboardInputSetup(obj, this);
                keyboardInputSetupScreen.Show();
            }
            else
            {
                mouseInputSetupScreen = new MouseInputSetup(obj, this);
                mouseInputSetupScreen.Show();
            }
        }