Interaction logic for ManualPlayerWindow.xaml
Inheritance: System.Windows.Window, ILayerContainer
Esempio n. 1
0
        public static void Instance(MainWindow main)
        {
            main.DetachControls();
            ManualPlayerWindow NewForm = new ManualPlayerWindow();

            NewForm.mainForm = main;
            SessionCore.Instance.Windows.Show(NewForm);
        }
Esempio n. 2
0
        public void CommandBinding_ManualMode(object sender, ExecutedRoutedEventArgs e)
        {
            if (!menuManualMode.IsEnabled)
            {
                return;
            }

            Window parent = Window.GetWindow(this);

            if (parent.GetType() == typeof(MainWindow))
            {
                // Start manual mode.
                ManualPlayerWindow.Instance((MainWindow)parent);
                menuManualMode.IsChecked = true;
            }
            else if (parent.GetType() == typeof(ManualPlayerWindow))
            {
                // Close manual mode.
                ((ManualPlayerWindow)parent).CloseManual();
                menuManualMode.IsChecked = false;
            }
        }
 public static void Instance(MainWindow main) {
     main.DetachControls();
     ManualPlayerWindow NewForm = new ManualPlayerWindow();
     NewForm.mainForm = main;
     SessionCore.Instance.Windows.Show(NewForm);
 }