예제 #1
0
        async public static Task <Result> SaveAsync(this RichTextBox richTextBox)
        {
            Result result = default;
            await Dispatch.InvokeAsync(() => result = richTextBox.Save());

            return(result);
        }
예제 #2
0
 /// <summary>
 /// Activates the first instance of the application.
 /// </summary>
 /// <param name="args">List of arguments to pass to the first instance.</param>
 public void InvokeFirstInstance(IList <string> args)
 {
     if (Application.Current != null)
     {
         // Do an asynchronous call to ActivateFirstInstance function
         Dispatch.InvokeAsync(DispatcherPriority.Normal, new DispatcherOperationCallback(SingleInstance <TApplication> .ActivateFirstInstanceCallback), args);
     }
 }
예제 #3
0
 async Task Alert(string message, double progress)
 {
     await Dispatch.InvokeAsync(() =>
     {
         SplashWindow.Message  = message;
         SplashWindow.Progress = progress;
     });
 }