示例#1
0
 private void StartDialog(IProgressItemViewModel <T> itemViewModel)
 {
     DispatcherViewFactory.InvokeAsync("Secondary GUI", () =>
     {
         var window = _window;
         if (window == null)
         {
             window = _window = PrepareProgressView();
             AddProgressItem(window, itemViewModel);
             window.Closing += HandleWindowClosing;
             window.Show();
         }
         else
         {
             AddProgressItem(window, itemViewModel);
         }
     }).ConfigureAwait(false);
 }
示例#2
0
 private void OnInitializationParamsChanged(TParams initParams)
 {
     DispatcherViewFactory.CreateViewContract(ThreadName, () => CreateControl(initParams)).ContinueWith(
         t => Content = FrameworkElementAdapters.ContractToViewAdapter(t.Result), UiThread.Current.TaskScheduler);
 }