本文整理汇总了C#中System.Windows.Input.ExecutedRoutedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# ExecutedRoutedEventArgs类的具体用法?C# ExecutedRoutedEventArgs怎么用?C# ExecutedRoutedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ExecutedRoutedEventArgs类属于System.Windows.Input命名空间,在下文中一共展示了ExecutedRoutedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CommandBinding_Executed_Ok
/// <summary>
/// 确定
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void CommandBinding_Executed_Ok(object sender, ExecutedRoutedEventArgs e)
{
if (this.ComitEvent != null)
{
ComitEvent.Invoke();
}
}
示例2: dataGridKinds_PreviewExecuted
private void dataGridKinds_PreviewExecuted(object sender, ExecutedRoutedEventArgs e)
{
if (e.Command == DataGrid.DeleteCommand)
{
MessageBoxButton button = MessageBoxButton.YesNo;
if (MessageBox.Show("Czy napewno chcesz usunąć?", "Usuwanie", button) == MessageBoxResult.Yes)
{
try
{
KindPresenter kindPresenter = (KindPresenter)this.DataContext;
var kind = (Kind)this.dataGridKinds.SelectedItem;
if (kind != null)
{
kindPresenter.DeleteKind((Kind)kind);
e.Handled = false;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
e.Handled = true;
}
}
else
{
e.Handled = true;
}
}
}
示例3: CompareCommits_Executed
private void CompareCommits_Executed(object sender, ExecutedRoutedEventArgs e)
{
try
{
this.details.RenderTransform.SetValue(TranslateTransform.XProperty, this.ActualWidth);
this.details.Visibility = Visibility.Visible;
var animationDuration = TimeSpan.FromSeconds(.5);
var animation = new DoubleAnimation(0, new Duration(animationDuration));
animation.EasingFunction = new CubicEase() { EasingMode = EasingMode.EaseOut };
loading.Visibility = Visibility.Visible;
animation.Completed += (_, x) =>
{
var ids = e.Parameter as string[];
this.details.Show(this.gitViewModel.Tracker, ids[0], ids[1]);
loading.Visibility = Visibility.Collapsed;
};
this.details.RenderTransform.BeginAnimation(TranslateTransform.XProperty, animation);
}
catch (Exception ex)
{
Log.WriteLine("MainWindow.CompareCommits_Executed {0}", ex.ToString());
}
}
示例4: ExecutedOpenLogDirectory
private void ExecutedOpenLogDirectory(object sender, ExecutedRoutedEventArgs e)
{
var fileListener = ConfigManager.GetService<LogManager>().Listeners.OfType<FileLogListener>().FirstOrDefault();
if (fileListener != null)
Process.Start(fileListener.LogDirectory);
}
示例5: AddUser_Executed
private void AddUser_Executed(object sender, ExecutedRoutedEventArgs e)
{
this.userTask.save(this.user);
e.Handled = true;
Window currentForm = this;
currentForm.Close();
}
示例6: ListEditExecuted
protected override void ListEditExecuted(object sender, ExecutedRoutedEventArgs e)
{
var id = (int) e.Parameter;
var deliveryType = ((ForeignDeliveryListVM) VM).GetDeliveryType(id);
var p = new ForeignDeliveryPoolDetail(PageMode.EditMode, deliveryType, id);
RedirectTo(p);
}
示例7: CommandBinding_Executed_Delete
private void CommandBinding_Executed_Delete(object sender, ExecutedRoutedEventArgs e)
{
ManagementViewModel vm = DataContext as ManagementViewModel;
ExperienceInformation exp = (e.OriginalSource as DataGridRow).DataContext as ExperienceInformation;
if( vm.DelExperience(exp.Id))
Query();
}
示例8: CommandBinding_Executed_ModifyPassword
private void CommandBinding_Executed_ModifyPassword(object sender, ExecutedRoutedEventArgs e)
{
ManagementViewModel vm = DataContext as ManagementViewModel;
vm.ModifyPassword();
}
示例9: ExecuteStartVoice
private void ExecuteStartVoice(object sender, ExecutedRoutedEventArgs e)
{
_isAnyVoiceChatActive = true;
this.IsChatting = true;
if (App.Settings.Current.Voice.UseStun)
{
var stun = new StunUdpClient(App.Settings.Current.Voice.StunServer, App.Settings.Current.Voice.AltStunServer);
stun.BeginGetClient((ar) =>
{
UdpClient client = null;
try
{
client = stun.EndGetClient(ar, out _publicEndPoint);
}
catch (StunException ex)
{
System.Diagnostics.Debug.WriteLine("STUN error: " + ex.Message);
}
this.Dispatcher.BeginInvoke((Action)(() => this.Start(client)));
});
}
else
{
this.Start();
}
}
示例10: NewGameSinglePlayerCommand_Executed
private void NewGameSinglePlayerCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{
gameController = new SinglePlayerGameController(gameGrid, gameOptions.SelectedIconSet);
gameController.StartGame();
}
示例11: WebcamRecorder_Executed
private void WebcamRecorder_Executed(object sender, ExecutedRoutedEventArgs e)
{
var webcam = new Webcam();
Hide();
var result = webcam.ShowDialog();
if (result.HasValue && result.Value)
{
// If Close
Environment.Exit(0);
}
else if (result.HasValue)
{
#region If Backbutton or Stop Clicked
if (webcam.ExitArg == ExitAction.Recorded)
{
var editor = new Editor { ListFrames = webcam.ListFrames };
GenericShowDialog(editor);
return;
}
Show();
#endregion
}
}
示例12: ExecutedAddStrategy
private void ExecutedAddStrategy(object sender, ExecutedRoutedEventArgs e)
{
if (SelectedStrategy != null)
new CloneStrategyCommand(SelectedStrategy).SyncProcess(this);
else
new AddStrategyCommand(SelectedStrategyInfo, SessionType.Battle).SyncProcess(this);
}
示例13: CommandBindingPreviousPage
private void CommandBindingPreviousPage(object sender, ExecutedRoutedEventArgs e)
{
if (NavigationService != null)
{
NavigationService.Navigate(new Uri(@"Pages\Step12.xaml", UriKind.Relative));
}
}
示例14: Close_Executed
private void Close_Executed(object sender, ExecutedRoutedEventArgs e)
{
// Configure the message box to be displayed
string messageBoxText = "你确定要退出?";
string caption = "提示框";
MessageBoxButton button = MessageBoxButton.YesNoCancel;
MessageBoxImage icon = MessageBoxImage.Warning;
// Display message box
MessageBoxResult result = MessageBox.Show(messageBoxText, caption, button, icon);
// Process message box results
switch (result)
{
case MessageBoxResult.Yes:
// User pressed Yes button
// ...
this.Close();
break;
case MessageBoxResult.No:
// User pressed No button
// ...
break;
case MessageBoxResult.Cancel:
// User pressed Cancel button
// ...
break;
}
}
示例15: SaveCommandBinding_Executed
void SaveCommandBinding_Executed(object sender, ExecutedRoutedEventArgs e)
{
if (MySQLHandler.JuniorSubjectSelection.Default.saveChanges())
MessageBox.Show("Saved");
else
MessageBox.Show("Not Saved");
}