public static void CreateNetPipeService() { NetPipeHelper = new NetPipeHelper(true, AppName); NetPipeHelper.DealMessageFunc += mNetPipeHelper_DealMessageFunc; try { NetPipeHelper.Start(); //ShowInfoMessage(string.Format("Service started.")); } catch (Exception ex) { ShowExceptionMessage(string.Format("Start service fail.\t{0}", ex.Message)); } }
void LoginPage_Loaded(object sender, RoutedEventArgs e) { mNetPipeHelper = new NetPipeHelper(true, string.Empty); mNetPipeHelper.DealMessageFunc += mNetPipeHelper_DealMessageFunc; try { mNetPipeHelper.Start(); OnShowMessage(string.Format("Service started.")); } catch (Exception ex) { OnShowMessage(string.Format("Start service fail.\t{0}", ex.Message)); } }
private static void CreateNetPipeService() { NetPipeHelper = new NetPipeHelper(true, Session.SessionID); NetPipeHelper.DealMessageFunc += mNetPipeHelper_DealMessageFunc; try { NetPipeHelper.Start(); WriteLog("NetPipe", string.Format("NetPipe service created.\t{0}", Session.SessionID)); } catch (Exception ex) { WriteLog("NetPipe", string.Format("Start service fail.\t{0}", ex.Message)); } }
private void CreateNetPipeService() { mNetPipeHelper = new NetPipeHelper(true, string.Empty); mNetPipeHelper.DealMessageFunc += mNetPipeHelper_DealMessageFunc; try { mNetPipeHelper.Start(); OnShowMessage(string.Format("Service started.")); } catch (Exception ex) { OnShowMessage(string.Format("Start service fail.\t{0}", ex.Message)); } }
private static void CreateNetPipeClient() { try { GNetPipeHelper = new NetPipeHelper(false, GClassSessionInfo.SessionID); GNetPipeHelper.DealMessageFunc += GNetPipeHelper_DealMessageFunc; GNetPipeHelper.Start(); } catch (Exception ex) { if (GNetPipeHelper != null) { GNetPipeHelper.Stop(); } MessageBox.Show(ex.ToString()); } }
private void CreateNetPipeService() { if (mNetPipeHelper != null) { mNetPipeHelper.Stop(); } mNetPipeHelper = new NetPipeHelper(false, mClientID); mNetPipeHelper.DealMessageFunc += mNetPipeHelper_DealMessageFunc; var result = mNetPipeHelper.Start(); if (result) { OnShowMessage(string.Format("NetPipe service created.")); } else { OnShowMessage(string.Format("Create NetPipe service fail.")); } }