Beispiel #1
0
        public override void Update(ApplicationTimer timer)
        {
            var elapsed  = (float)timer.ElapsedSeconds;
            var movement = elapsed;

            if (KeyboardHandler.Key(ConsoleKey.W).IsDown())
            {
                _camera.TranslateZ(movement);
            }
            if (KeyboardHandler.Key(ConsoleKey.S).IsDown())
            {
                _camera.TranslateZ(-movement);
            }

            if (KeyboardHandler.Key(ConsoleKey.A).IsDown())
            {
                _camera.TranslateX(movement);
            }
            if (KeyboardHandler.Key(ConsoleKey.D).IsDown())
            {
                _camera.TranslateX(-movement);
            }

            if (KeyboardHandler.Key(ConsoleKey.Spacebar).IsDown())
            {
                _camera.TranslateY(-movement);
            }
            if (KeyboardHandler.Modifier(ConsoleModifiers.Shift).IsDown())
            {
                _camera.TranslateY(movement);
            }

            if (KeyboardHandler.Key(ConsoleKey.UpArrow).IsDown())
            {
                _camera.RotateX(movement);
            }
            if (KeyboardHandler.Key(ConsoleKey.DownArrow).IsDown())
            {
                _camera.RotateX(-movement);
            }

            if (KeyboardHandler.Key(ConsoleKey.RightArrow).IsDown())
            {
                _camera.RotateY(movement);
            }
            if (KeyboardHandler.Key(ConsoleKey.LeftArrow).IsDown())
            {
                _camera.RotateY(-movement);
            }

            if (KeyboardHandler.Key(ConsoleKey.M).IsDown())
            {
                _msaa = _msaa.IsMultiSampled ? MsaaDesc.None : MsaaDesc.X8;
            }
        }
 private void ResetForm()
 {
     TextBoxApplication.Text      = "";
     TextBoxDuration.Text         = "";
     TextBoxIntervall.Text        = "";
     CheckBoxEnabled.IsChecked    = false;
     ComboBoxKeyMode.SelectedItem = KeyModes.Click;
     ComboBoxKeys.SelectedItem    = Keys.None;
     StackPanelKey.Children.Clear();
     ApplicationTimer?.Stop();
     ApplicationTimer?.Dispose();
 }
        public AutoKey Add()
        {
            AutoKey            = null;
            LabelTitle.Content = "Add";
            Initialize();
            MainWindow.ChangeTo <AutoKeyEditControl>();

            ApplicationTimer.Start();
            ContextMenuModul.Expanded  = false;
            ContextMenuModul.IsEnabled = false;
            IsOpen = true;

            while (IsOpen)
            {
                DoEvents();
            }

            ContextMenuModul.IsEnabled = true;

            MainWindow.ChangeTo <AutoKeysControl>();
            ResetForm();
            return(AutoKey);
        }
 public override void Update(ApplicationTimer timer)
 {
     _constants.Scale *= (FloatType)0.99;
 }
 public override void Update(ApplicationTimer timer) /* This app doesn't do any updating */ }
 public override void Update(ApplicationTimer timer)
 {
 }