public static void GoBabyGo(string settingsFile) { TransientSettingsData.LoadCurrent(settingsFile); Dispatcher dispatcher; if (Application.Current == null) { dispatcher = Dispatcher.CurrentDispatcher; } else { dispatcher = Application.Current.Dispatcher; } if (dispatcher.CheckAccess()) { var zoomer = new Zoomer(); zoomer.Magnify(); } else { dispatcher.Invoke((Action)(() => GoBabyGo(settingsFile))); } }
private void HandleMagnify(object sender, ExecutedRoutedEventArgs e) { Zoomer zoomer = new Zoomer(); zoomer.Magnify(this.Target); e.Handled = true; }
void HandleMagnify(object sender, ExecutedRoutedEventArgs e) { var zoomer = new Zoomer(); zoomer.Magnify(Target); e.Handled = true; }
public static void GoBabyGo() { Dispatcher dispatcher; if (Application.Current == null && !SnoopModes.MultipleDispatcherMode) dispatcher = Dispatcher.CurrentDispatcher; else dispatcher = Application.Current.Dispatcher; if (dispatcher.CheckAccess()) { Zoomer zoomer = new Zoomer(); zoomer.Magnify(); } else { dispatcher.Invoke((Action)GoBabyGo); } }
public static void GoBabyGo() { Dispatcher dispatcher; if (Application.Current == null && !SnoopModes.MultipleDispatcherMode) { dispatcher = Dispatcher.CurrentDispatcher; } else { dispatcher = Application.Current.Dispatcher; } if (dispatcher.CheckAccess()) { Zoomer zoomer = new Zoomer(); zoomer.Magnify(); } else { dispatcher.Invoke((Action)GoBabyGo); } }