//清楚缓存【设备主页】 private void DeleteCacheViewCallback(GeneralArgs <PreCacheToken> obj) { if (obj.Parameters != null) { SystemContext.Instance.CurCacheViews.RemoveViewCache(obj.Parameters); } }
/// <summary> /// 发送普通消息(UI线程) /// </summary> /// <param name="msgData"></param> public void SendGeneralMsgToUI <TParam>(GeneralArgs <TParam> msgData) { GalaSoft.MvvmLight.Threading.DispatcherHelper.CheckBeginInvokeOnUI(() => { GalaSoft.MvvmLight.Messaging.Messenger.Default.Send <GeneralArgs <TParam> >(msgData, msgData.MsgToken); }); }
private string ExecuteOpenAllCaseCommand() { base.NavigationForNewDislogWindow(ExportKeys.CaseListView); GeneralArgs args = new GeneralArgs(GeneralKeys.AllowShowDeviceList); base.MessageAggregation.SendGeneralMsg(args); return("打开所有案例"); }
private string ExecuteCreateCaseCommand() { base.NavigationForMainWindow(ExportKeys.CaseCreationView); //通知主界面可以打开创建案例界面 GeneralArgs args = new GeneralArgs(GeneralKeys.AllowShowCaseName); base.MessageAggregation.SendGeneralMsg(args); return("新建案例"); }
/// <summary> /// 发送普通消息 /// </summary> /// <param name="msgData"></param> public void SendGeneralMsg <TParam>(GeneralArgs <TParam> msgData) { try { GalaSoft.MvvmLight.Messaging.Messenger.Default.Send <GeneralArgs <TParam> >(msgData, msgData.MsgToken); } catch (Exception ex) { LoggerManagerSingle.Instance.Error(ex); } }
/// <summary> /// 发送普通消息(任意线程) /// </summary> /// <param name="msgData"></param> public void SendGeneralMsg(GeneralArgs msgData) { try { GalaSoft.MvvmLight.Messaging.Messenger.Default.Send <GeneralArgs>(msgData, msgData.GeneralKey); } catch (Exception ex) { LoggerManagerSingle.Instance.Error(ex); } }
/// <summary> /// 设置查询状态 /// </summary> /// <param name="obj"></param> private void StartFilter(GeneralArgs <bool> obj) { AsyncOperator.Execute(() => { CurrentOperation = Languagekeys.Searching; IsFiltering = obj.Parameters; if (!IsFiltering) { SelectDefaultNode(DataList); } }); }
//自动提取完成 private void TaskCompleteCallback(GeneralArgs <bool> args) { //跳转 var tmp = CurDevModel.DeviceExtractionAdorner as DeviceExtractionAdorner; //var a = DevNavigationManager.GetOrCreateView(ExportKeys.DataDisplayView, tmp.Target.Path); //a.DataSource.ReceiveParameters(args.Parameters); //SubView = a; SwitchSubView(DevMainSubViewType.ExtractResult, tmp.Target.Path, args.Parameters); SetAutoWarningPath(tmp.Target.Path); }
private void ChangedLanguageCallback(GeneralArgs args) { }
/// <summary> /// 重新设置数据 /// </summary> /// <param name="obj"></param> private void SetDataListKey(GeneralArgs<ObservableCollection<DataExtactionItem>> obj) { DataListSource = obj.Parameters; DoClearCommond(); }