示例#1
0
        private void SetConfigInfo()
        {
            XSystemConfigInfo configInfo = m_ConfigTool.GetConfigInfo();

            this.nebWidth.Value          = XHelper.GetInt(configInfo.SignWidht);
            this.nebHeight.Value         = XHelper.GetInt(configInfo.SignHeight);
            this.nebRefreshMinutes.Value = XHelper.GetInt(configInfo.RefreshMinutes);
        }
示例#2
0
        protected override void SaveFunction()
        {
            XSystemConfigInfo configInfo = new XSystemConfigInfo();

            configInfo.SignWidht      = XHelper.GetInt(this.nebWidth.Value);
            configInfo.SignHeight     = XHelper.GetInt(this.nebHeight.Value);
            configInfo.RefreshMinutes = XHelper.GetInt(this.nebRefreshMinutes.Value);

            if (this.m_ConfigTool.SaveConfigInfo(configInfo))
            {
                XUICommon.SystemConfigInfo = configInfo;
                XMessageBox.ShowRemindMessage("保存成功!");
                this.Close();
            }
        }
示例#3
0
        public XSystemConfigInfo GetConfigInfo()
        {
            XmlDocument dct = new XmlDocument();

            dct.Load(m_ConfigFileName);

            XSystemConfigInfo configInfo = new XSystemConfigInfo();

            XmlNode signNode = dct.SelectSingleNode("SystemConfigs/SignConfig");

            if (signNode != null)
            {
                configInfo.SignWidht      = XHelper.GetInt(m_XmlTool.GetNodeAttributValue(signNode, "SignWidth"));
                configInfo.SignHeight     = XHelper.GetInt(m_XmlTool.GetNodeAttributValue(signNode, "SignHeight"));
                configInfo.RefreshMinutes = XHelper.GetInt(m_XmlTool.GetNodeAttributValue(signNode, "RefreshMinutes"));
            }

            return(configInfo);
        }
示例#4
0
        public bool SaveConfigInfo(XSystemConfigInfo configInfo)
        {
            XmlDocument dct = new XmlDocument();

            dct.Load(m_ConfigFileName);

            XmlNode signNode = dct.SelectSingleNode("SystemConfigs/SignConfig");

            signNode.Attributes["SignWidth"].Value      = configInfo.SignWidht.ToString();
            signNode.Attributes["SignHeight"].Value     = configInfo.SignHeight.ToString();
            signNode.Attributes["RefreshMinutes"].Value = configInfo.RefreshMinutes.ToString();
            try
            {
                dct.Save(m_ConfigFileName);
                return(true);
            }
            catch (Exception ex)
            {
                XMessageBox.ShowError(ex.Message);
                XErrorLogTool.WriteLog(ex.ToString());
                return(false);
            }
        }