Пример #1
0
 /// <summary>
 /// Индикация успешного запуска
 /// </summary>
 public void IndicateLaunch()
 {
     HighlightSyntax();
     AnimateModeChange(ApplicationMode.Running);
     LaunchButtonBox.Background = new SolidColorBrush(Colors.Transparent);
     StopButtonBox.Background   = new SolidColorBrush(AppColors.RunningAccent);
     SourceCodeBox.IsReadOnly   = true;
     InterpreterBox.IsReadOnly  = false;
     InterpreterBox.Focus();
 }
Пример #2
0
 private void RegisterHotkeys()
 {
     hotkeys = new Dictionary <Key, HotkeyDelegate>
     {
         {
             Key.F5, () => { viewModel.StartStop(); }
         },
         {
             Key.Enter, () =>
             {
                 if (!InterpreterBox.IsFocused)
                 {
                     return;
                 }
                 viewModel.Evaluate(InterpreterBox.Text);
                 InterpreterBox.Text = "";
             }
         },
         {
             Key.Up, () =>
             {
                 if (InterpreterBox.IsFocused)
                 {
                     InterpreterBox.Undo();
                 }
             }
         },
         {
             Key.Down, () =>
             {
                 if (InterpreterBox.IsFocused)
                 {
                     InterpreterBox.Redo();
                 }
             }
         }
     };
 }