public MainWindow() { InitializeComponent(); try { service = Service.GetInstance(); } catch (FileNotFoundException) { var msg = "File run_with_logs.py was not found! PsychoPy might not function properly."; MessageBox.Show(msg, "File not found", MessageBoxButton.OK, MessageBoxImage.Error); } service.ProgressUpdate += (s, e) => { Dispatcher.Invoke(delegate { var args = (StatusEventArgs) e; lblStatus.Content = args.Message; } ); }; InitClients(); InitTabs(); SetProject(unnamedProject); service.StartPingSvc(clients); // USE MSMQ if it is enabled if (service.MSMQConfig.MSMQ) { service.TransferLabClientService(clients); StartMSMQService(); } }
public static Service GetInstance() { if (_service == null) _service = new Service(); return _service; }