private void btn_Start_Click(object sender, EventArgs e) { tbx_Secs.Text = string.Empty; tmr_Seconds.Start(); tbx_Status.Text = "Starting"; _CswScheduleService = new CswScheduleService(new CswScheduleLogicFactoryNbt(), new CswScheduleResourceFactoryNbt(), new CswScheduleLogicDetailPersistenceFactoryNbt()); _CswScheduleService.start(); tbx_Status.Text = "Running"; }
protected override void OnStart(string[] args) { ////Uri baseAddress = new Uri( "http://localhost:8080/SchedService" ); //if( serviceHost != null ) //{ // serviceHost.Close(); //} //serviceHost = new System.ServiceModel.ServiceHost( typeof( CswSchedSvcAdminEndPoint ) ); _CswScheduleService = new CswScheduleService(new CswScheduleLogicFactoryNbt(), new CswScheduleResourceFactoryNbt(), new CswScheduleLogicDetailPersistenceFactoryNbt()); CswSchedSvcAdminEndPoint.CswScheduleService = _CswScheduleService; _CswScheduleService.start(); // serviceHost.Open(); }//OnStart()