Example #1
0
 private void btnStartService_Click(object sender, EventArgs e)
 {
     (sender as Button).Enabled = !MainThreadContext.Main.StartService();
     timerJobUpdate.Enabled     = btnStopService.Enabled = true;
     //啟動 WCF 服務
     WcfHostService.StartWcfHost();
 }
Example #2
0
 protected override void OnStart(string[] args)
 {
     MainThreadContext.Main = new MainThread();
     MainThreadContext.Main.StartService();
     //啟動 WCF 服務
     WcfHostService.StartWcfHost();
 }