コード例 #1
0
 public void OnDeviceConnected(object sender, WebsocketEventArgs evt)
 {
     SynchronizationContextHelper.SendMainSyncContext(() =>
     {
         showNotifyIconMenu(evt.ctx);
     });
 }
コード例 #2
0
 public void OnTotalCountUpdated(object sender, WebsocketEventArgs evt)
 {
     SynchronizationContextHelper.SendMainSyncContext(() =>
     {
         updateNotifyIconMenu(evt.ctx);
     });
 }
コード例 #3
0
        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);
            });
        }
コード例 #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(); });
            }
        }
コード例 #5
0
 public void OnDeviceDisconnected(object sender, WebsocketEventArgs evt)
 {
     SynchronizationContextHelper.SendMainSyncContext(() => { removeDeviceFromNotifyIconMenu(evt); });
 }