示例#1
0
 private void Navigate_Invoked(Windows.UI.Xaml.Input.KeyboardAccelerator sender, Windows.UI.Xaml.Input.KeyboardAcceleratorInvokedEventArgs args)
 {
     ViewModel.OnConnect();
 }
 private void SelectAllAcceleratorDG_Invoked(Windows.UI.Xaml.Input.KeyboardAccelerator sender, Windows.UI.Xaml.Input.KeyboardAcceleratorInvokedEventArgs args)
 {
 }
示例#3
0
 private void VolumeDecreased_Invoked(Windows.UI.Xaml.Input.KeyboardAccelerator sender, Windows.UI.Xaml.Input.KeyboardAcceleratorInvokedEventArgs args)
 {
     if (walkman != null && cassetteTape != null)
     {
         walkman.Volume(volumeSlider.Value -= 0.5);
     }
 }
示例#4
0
 private void ContextButton_OnAcceleratorInvoked(Windows.UI.Xaml.Input.KeyboardAccelerator sender, Windows.UI.Xaml.Input.KeyboardAcceleratorInvokedEventArgs args)
 {
     this.triggerType = LauncherResultActionEvent.TriggerType.KeyboardShortcut;
 }
 private void KeyboardAccelerator_Invoked(Windows.UI.Xaml.Input.KeyboardAccelerator sender, Windows.UI.Xaml.Input.KeyboardAcceleratorInvokedEventArgs args)
 {
     if ((DataContext as ChatViewModel).SendMessageCommand.CanExecute())
     {
         (DataContext as ChatViewModel).SendMessageCommand.Execute();
     }
 }
示例#6
0
 private void EscShotcut_Invoked(Windows.UI.Xaml.Input.KeyboardAccelerator sender, Windows.UI.Xaml.Input.KeyboardAcceleratorInvokedEventArgs args)
 {
     if (TimerStatus == TimerStatus.Holding)
     {
         TimerStatus = TimerStatus.Display;
     }
     else if (TimerStatus == TimerStatus.Observing)
     {
         TimerStatus = TimerStatus.Waiting;
     }
     ResetTimer();
 }
示例#7
0
        private void CtrlDAccelerator_Invoked(Windows.UI.Xaml.Input.KeyboardAccelerator sender, Windows.UI.Xaml.Input.KeyboardAcceleratorInvokedEventArgs args)
        {
            DeleteResult(0);
            if (allResult.CurrentGroup().Results.Count > 0)
            {
                DisplayTime(allResult.CurrentGroup().Results[0]);
            }
            else
            {
                DisplayTime(Result.GetFormattedString(0d));
            }

            if (InfoFrame.Content is ResultPage)
            {
                (InfoFrame.Content as ResultPage).UpdateTotalStatistics();
            }
        }
示例#8
0
 private void KeyboardAccelerator_Invoked(Windows.UI.Xaml.Input.KeyboardAccelerator sender, Windows.UI.Xaml.Input.KeyboardAcceleratorInvokedEventArgs args)
 {
     ViewModel.LoginCommand.Execute();
 }
示例#9
0
        private async void Paste_Invoked(Windows.UI.Xaml.Input.KeyboardAccelerator sender, Windows.UI.Xaml.Input.KeyboardAcceleratorInvokedEventArgs args)
        {
            Windows.ApplicationModel.DataTransfer.DataPackageView dataPackageView = Windows.ApplicationModel.DataTransfer.Clipboard.GetContent();
            if (dataPackageView.Contains(Windows.ApplicationModel.DataTransfer.StandardDataFormats.Text))
            {
                string newText = await dataPackageView.GetTextAsync();

                // Modify the internal text store.
                _text = _text.Substring(0, _selection.StartCaretPosition) +
                        newText +
                        _text.Substring(Math.Min(_text.Length, _selection.EndCaretPosition));

                // You can set the proper font or direction for the updated text based on the language by checking
                // args.InputLanguage.  We will not do that in this sample.

                // Modify the current selection.
                _selection.StartCaretPosition = _selection.EndCaretPosition += newText.Length;

                // Update the selection of the edit context. There is no need to notify the system
                // because the system itself changed the selection.
                SetSelectionAndNotify(_selection);
            }
        }
示例#10
0
 private void SearchBoxKeyboardAccelerator_Invoked(Windows.UI.Xaml.Input.KeyboardAccelerator sender, Windows.UI.Xaml.Input.KeyboardAcceleratorInvokedEventArgs args)
 {
     SearchBox.Focus(FocusState.Keyboard);
 }