Beispiel #1
0
        private void StartApplicationThreadMethod()
        {
            try
            {
                if (hostComm == null)
                {
                    hostComm = new HostComm();
                    hostComm.ConnectedToHostEvent += new HostComm.ConnectedToHostHandler(m_HostComm_Impl_ConnectedToHostEvent);
                    hostComm.StartUp();
                }

                acsServer = new ACSServer(hostComm, log, _localCaseListPath, out caseList);
                acsServer.CaseListUpdateEvent += new ACSServer.CaseListUpdateHandler(UpdateCaseList);
                acsServer.StartUp();

                log.PrintLine("Network service (re)started.");

                if (caseList.FullSyncStarted)
                {
                    FullSyncMenuItem.Dispatcher.Invoke(DispatcherPriority.Normal,
                                                       new Action(delegate()
                    {
                        FullSyncMenuItem.Header = "Stop Sync";
                    }));
                }
            }
            catch (Exception exp)
            {
                log.PrintInfoLine("StartApplicationThreadMethod exp: " + exp);
            }
        }
Beispiel #2
0
 private void ShutdownACSServer()
 {
     if (acsServer != null)
     {
         acsServer.ShutDown();
         acsServer = null;
     }
 }