public void OnDeviceConnected(object sender, WebsocketEventArgs evt) { SynchronizationContextHelper.SendMainSyncContext(() => { showNotifyIconMenu(evt.ctx); }); }
public void OnTotalCountUpdated(object sender, WebsocketEventArgs evt) { SynchronizationContextHelper.SendMainSyncContext(() => { updateNotifyIconMenu(evt.ctx); }); }
public void OnFileEnding(object sender, WebsocketEventArgs args) { var file_id = args.ctx.fileCtx.file_id; var file_name = args.ctx.fileCtx.file_name; var file_type = args.ctx.fileCtx.type; SynchronizationContextHelper.SendMainSyncContext(() => { showFile(file_id, file_name, file_type, args.ctx.device_name, args.ctx.device_id); }); }
public static void CloseOpenedWindow(ProtocolContext ctx) { List <BackToPhoneDialog> opendDialogs; lock (cs) { opendDialogs = OpenDialogs.Where(x => x.Ctx == ctx).ToList(); } foreach (var dialog in opendDialogs) { SynchronizationContextHelper.SendMainSyncContext(() => { dialog.Close(); }); } }
public void OnDeviceDisconnected(object sender, WebsocketEventArgs evt) { SynchronizationContextHelper.SendMainSyncContext(() => { removeDeviceFromNotifyIconMenu(evt); }); }