Exemple #1
0
 private Task OnLearnCompleteAction(string dirPath)
 {
     return(new Task(() => {
         var dialog = new TaskDialog();
         var openFolderBtn = new TaskDialogButton("Open folder");
         var relodDataBtn = new TaskDialogButton("Reload translation info");
         dialog.Buttons.Add(openFolderBtn);
         dialog.Buttons.Add(relodDataBtn);
         dialog.AllowDialogCancellation = false;
         dialog.ExpandedByDefault = true;
         dialog.Content = "Learning complete. Choose options";
         var resultButton = dialog.ShowDialog();
         if (resultButton == openFolderBtn)
         {
             System.Diagnostics.Process.Start(dirPath);
         }
         _translationProvider.ReloadInfo();
         UpdateTranslationConfigs();
         CurrentLineIndex = 0;
         OnLearnComplete = null;
     }));
 }