コード例 #1
0
 private void OnServiceAdded(IService service)
 {
     if (this.ServiceAdded != null)
     {
         AppServiceEventArg eventArg = new AppServiceEventArg();
         eventArg.ServiceName = service.ServiceName;
         eventArg.EventType   = AppServiceEventType.ServiceAdded;
         this.ServiceAdded(service, eventArg);
         //this.ServiceAdded(service, EventArgs.Empty);
     }
 }
コード例 #2
0
 private void OnServiceStopped(IService serviceRemoved)
 {
     if (this.ServiceStopped != null)
     {
         AppServiceEventArg eventArg = new AppServiceEventArg();
         eventArg.ServiceName = serviceRemoved.ServiceName;
         eventArg.EventType   = AppServiceEventType.ServiceRemoved;
         this.ServiceStopped(serviceRemoved, eventArg);
         //this.ServiceStopped(serviceRemoved, EventArgs.Empty);
     }
 }