Example #1
0
 public void OnDeviceConnected(object sender, WebsocketEventArgs evt)
 {
     SynchronizationContextHelper.SendMainSyncContext(() =>
     {
         showNotifyIconMenu(evt.ctx);
     });
 }
Example #2
0
 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);
            });
        }
Example #4
0
        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(); });
            }
        }
Example #5
0
 public void OnDeviceDisconnected(object sender, WebsocketEventArgs evt)
 {
     SynchronizationContextHelper.SendMainSyncContext(() => { removeDeviceFromNotifyIconMenu(evt); });
 }