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