コード例 #1
0
 //清楚缓存【设备主页】
 private void DeleteCacheViewCallback(GeneralArgs <PreCacheToken> obj)
 {
     if (obj.Parameters != null)
     {
         SystemContext.Instance.CurCacheViews.RemoveViewCache(obj.Parameters);
     }
 }
コード例 #2
0
 /// <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);
     });
 }
コード例 #3
0
        private string ExecuteOpenAllCaseCommand()
        {
            base.NavigationForNewDislogWindow(ExportKeys.CaseListView);

            GeneralArgs args = new GeneralArgs(GeneralKeys.AllowShowDeviceList);

            base.MessageAggregation.SendGeneralMsg(args);

            return("打开所有案例");
        }
コード例 #4
0
        private string ExecuteCreateCaseCommand()
        {
            base.NavigationForMainWindow(ExportKeys.CaseCreationView);
            //通知主界面可以打开创建案例界面
            GeneralArgs args = new GeneralArgs(GeneralKeys.AllowShowCaseName);

            base.MessageAggregation.SendGeneralMsg(args);

            return("新建案例");
        }
コード例 #5
0
 /// <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);
     }
 }
コード例 #6
0
 /// <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);
     }
 }
コード例 #7
0
        /// <summary>
        /// 设置查询状态
        /// </summary>
        /// <param name="obj"></param>
        private void StartFilter(GeneralArgs <bool> obj)
        {
            AsyncOperator.Execute(() =>
            {
                CurrentOperation = Languagekeys.Searching;
                IsFiltering      = obj.Parameters;

                if (!IsFiltering)
                {
                    SelectDefaultNode(DataList);
                }
            });
        }
コード例 #8
0
        //自动提取完成
        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);
        }
コード例 #9
0
 private void ChangedLanguageCallback(GeneralArgs args)
 {
 }
コード例 #10
0
 /// <summary>
 /// 重新设置数据
 /// </summary>
 /// <param name="obj"></param>
 private void SetDataListKey(GeneralArgs<ObservableCollection<DataExtactionItem>> obj)
 {
     DataListSource = obj.Parameters;
     DoClearCommond();
 }