public void TearDown(WpfServerController controller) { try { if (controller.Model.WorkerThread != null) { controller.Model.WorkerThread.Abort(); } controller.Model.Router.Dispose(); } catch { } }
public bool Start(WpfServerController controller) { try { var localPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); controller.Model.ServerSettings = ServerSettingsHelper.Load(Path.Combine(SettingsFileLocator.LocateConfigurationFolder(), "MessageRouter.Server.WpfServer.xml")); controller.Model.Router = new WpfRouterServer(controller.Log, controller.Model.ServerSettings); controller.Model.WorkerThread = new Thread(controller.Model.Router.Start); controller.Model.WorkerThread.Start(); return(true); } catch (Exception e) { controller.Log.Error(e); MessageBox.Show(e.ToString(), "Message Router", MessageBoxButton.OK, MessageBoxImage.Error); return(false); } }
public void OpenLogsFolder(WpfServerController controller) { Process.Start("explorer.exe", controller.Model.LogsFolder); }