コード例 #1
0
        public void SaveToHardware()
        {
            _isSaveToHWSuccessful = true;

            #region 冗余信息
            //if (UC_SendCardConfig.IsSentReduInfo)
            //{

            //    RedundancyInfoAccessor accessor = new RedundancyInfoAccessor(_serverProxy, _hwCardType, _selectedPortName);
            //    accessor.SaveReduInfoToHW(UC_SendCardConfig.SenderReduInfoList, new SaveCommonInfoCompeleteCallBack(OnSaveReduInfoComplete));
            //    OutPutDebugString("保存冗余信息!");
            //}
            //else
            //{
            //    _isReduInfoComplete = true;
            //    OutPutDebugString("没有发送冗余信息,跳过保存冗余!");
            //}
            #endregion

            #region 屏体信息

            ScreenInfoAccessor screenInfoAccessor = new ScreenInfoAccessor(_serverProxy, _hwCardType, _selectedPortName);
            screenInfoAccessor.SaveDviScreenInfoToHW(_graphicsDviInf, _oldDisplayList, OnSaveScreenInfoCompelete);
            
            #endregion

            
            string msg = string.Empty;
            msg = "正在保存硬件信息,请稍后.......";
            GetLangString(msg, "Lang_ScreenInfo_SaveDataProcessMsg", out msg);

            SendProgressMsg(msg);
        }
コード例 #2
0
        private void OnClearReduInfoComplete(object sender, CommonInfoCompeleteArgs args)
        {
            if (args.Result != CommonInfoCompeleteResult.OK)
            {
                string msg = "";
                msg = "返回出厂设置失败!";
                GetLangString(msg, "Lang_ScreenInfo_ReturnFactoryData", out msg);
                
                SendTextToMessageBox(msg, MessageBoxImage.Error);
                CloseProcessForm();

                return;
            }
            else
            {
                ScreenInfoAccessor accessor = new ScreenInfoAccessor(_serverProxy, _hwCardType, _selectedPortName);
                HWSoftwareSpaceRes res = accessor.ClearHWScreenInfo(OnClearScreenInfoComplete);
                if (res != HWSoftwareSpaceRes.OK)
                {
                    string msg = "";
                    msg = "返回出厂设置失败!";
                    GetLangString(msg, "Lang_ScreenInfo_ReturnFactoryData", out msg);

                    SendTextToMessageBox(msg, MessageBoxImage.Error);                                            
                    CloseProcessForm();
                    return;
                }
            }
        }
コード例 #3
0
 private bool WriteScreenFile(string saveFileName, string commPort, string sn, List<ILEDDisplayInfo> ledInfos)
 {
     _fLogService.Debug("CheckAndSetScreenChanged:初始化ScreenInfoAccessor:" + sn);
     ScreenInfoAccessor screenInfoAccessor = new ScreenInfoAccessor(_serverProxy, commPort);
     return screenInfoAccessor.SaveDviScreenInfoToFile(saveFileName, new GraphicsDVIPortInfo(), ledInfos);
 }