void IBMDSwitcherStillsCallback.Notify(_BMDSwitcherMediaPoolEventType eventType, IBMDSwitcherFrame frame, int index) { switch (eventType) { case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeValidChanged: break; case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeNameChanged: break; case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeHashChanged: break; case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeAudioValidChanged: break; case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeAudioNameChanged: break; case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeAudioHashChanged: break; case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeLockBusy: break; case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeLockIdle: OnLockIdle?.Invoke(); break; case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeTransferCompleted: OnTransferCompleted?.Invoke(); break; case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeTransferCancelled: OnTransferCancelled?.Invoke(); break; case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeTransferFailed: OnTransferFailled?.Invoke(); break; default: break; } }
public void QueueDownload(string source, string destination, string tag, OnTransferCompleted callback) { Uri requestUri = new Uri(source, UriKind.Absolute); Uri downloadLocation = new Uri(destination, UriKind.Relative); BackgroundTransferRequest request = new BackgroundTransferRequest(requestUri, downloadLocation); request.TransferPreferences = TransferPreferences.AllowCellularAndBattery; request.TransferStatusChanged += new EventHandler<BackgroundTransferEventArgs>(OnBackgroundTransferStatusChanged); request.Tag = tag; try { _idMapping.Add(request.RequestId, callback); BackgroundTransferService.Add(request); } catch (InvalidOperationException) { _requests.Add(request); } }
public void QueueDownload(string source, string destination, string tag, OnTransferCompleted callback) { Uri requestUri = new Uri(source, UriKind.Absolute); Uri downloadLocation = new Uri(destination, UriKind.Relative); BackgroundTransferRequest request = new BackgroundTransferRequest(requestUri, downloadLocation); request.TransferPreferences = TransferPreferences.AllowCellularAndBattery; request.TransferStatusChanged += new EventHandler <BackgroundTransferEventArgs>(OnBackgroundTransferStatusChanged); request.Tag = tag; try { _idMapping.Add(request.RequestId, callback); BackgroundTransferService.Add(request); } catch (InvalidOperationException) { _requests.Add(request); } }