Beispiel #1
0
        // 配置对象转化
        private PandaParam ToPandaParam(ConfSonWebPandaZHCDDataService param)
        {
            return(new PandaParam()
            {
                appKey = param.AppKey,
                appSecret = param.AppSecret,
                getTokenUrl = param.GetTokenUrl,
                getDataUrl = param.GetDataUrl,
                useName = param.UseName,

                collectInterval = param.CollectInterval,
                saveInterVal = param.SaveInterVal
            });
        }
Beispiel #2
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            ConfSonWebPandaZHCDDataService info = new ConfSonWebPandaZHCDDataService();

            if (string.IsNullOrWhiteSpace(txt_appKey.Text))
            {
                MessageBox.Show("appKey不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            if (string.IsNullOrWhiteSpace(txt_appSecret.Text))
            {
                MessageBox.Show("appSecret不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            if (string.IsNullOrWhiteSpace(txt_getTokenUrl.Text))
            {
                MessageBox.Show("TokenUrl不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            if (string.IsNullOrWhiteSpace(txt_getDataUrl.Text))
            {
                MessageBox.Show("DataUrl不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            if (string.IsNullOrWhiteSpace(txt_useName.Text))
            {
                MessageBox.Show("useName不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            info.AppKey                = txt_appKey.Text;
            info.AppSecret             = txt_appSecret.Text;
            info.GetTokenUrl           = txt_getTokenUrl.Text;
            info.GetDataUrl            = txt_getDataUrl.Text;
            info.UseName               = txt_useName.Text;
            info.SaveInterVal          = Convert.ToInt32(txt_saveInterVal.Value);
            info.CollectInterval       = Convert.ToInt32(txt_collectInterval.Value);
            info.CommandTimeoutSeconds = Convert.ToInt32(txt_commandTimeoutSeconds.Value);

            if (config.SubmitSonWebPandaZHCDData(info, out string errMsg))
            {
                MessageBox.Show("提交 WEB熊猫综合测点接入服务 配置信息成功!", "成功", MessageBoxButtons.OK, MessageBoxIcon.Information);
                evtSubmit("WEB熊猫综合测点接入服务", EnvConfigInfo.Status.success);
            }
            else
            {
                MessageBox.Show("提交 WEB熊猫综合测点接入服务 配置信息失败," + errMsg, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                evtSubmit("WEB熊猫综合测点接入服务", EnvConfigInfo.Status.fail);
            }
        }
Beispiel #3
0
 public WEBPandaZHCDSacdaService(ConfSonWebPandaZHCDDataService pandaCeDianParam)
 {
     Config.pandaCeDianParam = pandaCeDianParam;
 }