示例#1
0
 public static void StopToolService()
 {
     if (MainToolService != null)
     {
         MainWindow.DocumentChangedEvent -= DocumentChangedEventHandler;
         MainToolService.Stop();
         MainToolService = null;
     }
 }
示例#2
0
 public static void StartToolService()
 {
     if (MainToolService == null)
     {
         MainToolService = new ToolService(MainToolServiceName, MainWindow);
         MainWindow.DocumentChangedEvent += DocumentChangedEventHandler;
         MainToolService.RunAsync();
     }
 }