public void HandleEventSendMobileDownload(object sender, MobileDownloadEventArgs args) { _logger.Debug(typeof(MOTR_Webserver), "Mobile download!"); for (int i = 0; i < aWebservers.Count; i++) { //If we found a connection with websocket, we will return now if (aWebservers[i].server.MobileDownload(args.MobileID, args.UserID)) { return; } } //If reached here we don't have a active connection, trigger a push message if (args.PushID.Length == 0) { _logger.Warning(typeof(MOTR_Webserver), "Mobile " + args.MobileID.ToString() + " does not have pushid registered, unable to download"); return; } MOTR_PushMobile m_MobilePush = new MOTR_PushMobile(); m_MobilePush.SendPush(args.PushID); }
//Triggers an event to the MOTR-Webserver class that updates the specified queue for procentage public void DownloadMobileTrigger(MobileDownloadEventArgs e) { OnMobileDownload?.Invoke(this, e); }