Esempio n. 1
0
        private void bUpdate_Click(object sender, EventArgs e)
        {
            var config = ZDTHelper.Instance.JY_Config;

            config.ReadCodeBean = this.cb_ReadCodeName.Text;
            config.MES_Side     = (Form_Main.SIDE) this.cbSide.SelectedIndex;
            config.LocalIp      = this.tIP_Local.Text;
            config.LocalPort    = int.Parse(this.tPort_Local.Text);
            config.RemoteIp     = this.tIP_Remote.Text;
            config.RemotePort   = int.Parse(this.tPort_Remote.Text);
            config.bUseRemote   = !this.rB_SPI.Checked;
            config.bAlarm       = this.rB_Alarm.Checked;
            config.bPaste       = this.rB_PasteAll.Checked;
            config.BadmarkLen   = int.Parse(this.tBadMarkNO.Text);
            ZDTHelper.Save();
        }
Esempio n. 2
0
        private void bBJZSUpdate_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("是否确定修改 对接信息!!!y/n", "警告", MessageBoxButtons.YesNo) == DialogResult.No)
            {
                return;
            }

            BJZS_Config bean = new BJZS_Config();

            bean.ConnectAlarm                    = this.rbConnectAlarm.Checked;
            bean.DataAlarm                       = this.rbCodeFailAlarm.Checked;
            bean.FeederNo[0]                     = this.tbFeeder1No.Text;
            bean.FeederNo[1]                     = this.tbFeeder2No.Text;
            bean.FeederOrder[0]                  = this.tbFeeder1Order.Text;
            bean.FeederOrder[1]                  = this.tbFeeder2Order.Text;
            bean.FeederID[0]                     = this.tbLeftFeeder.Text;
            bean.FeederID[1]                     = this.tbRightFeeder.Text;
            ZDTHelper.Instance.TimeOut           = (int)this.ndTimeOut.Value;
            ZDTHelper.Instance.WebServiceAddress = this.tBJZSAddress.Text;
            ZDTHelper.Instance.LineID            = this.tLineNo.Text;
            ZDTHelper.Instance.MachineID         = this.tMachineNO.Text;
            ZDTHelper.Instance.Area              = this.combLocation.Text;
            ZDTHelper.Instance.FactoryID         = this.tFactoryArea.Text;
            ZDTHelper.Instance.EmployeeID        = this.tEmployeID.Text;
            ZDTHelper.Instance.EmployeeName      = this.tEmployerNo.Text;
            ZDTHelper.Instance.FpcNo             = this.tFpcNo.Text;

            bean.ReadCodeBean                    = this.tReadCodeName.Text;
            bean.AlarmCount                      = (int)this.nuRemainCount.Value;
            bean.AlarmHour                       = (int)this.nuRemainTime.Value;
            bean.EnableAlarmCount                = this.chbEnableLimit.Checked;
            bean.EnableAlarmHour                 = this.chbEnableMaterialTime.Checked;
            ZDTHelper.Instance.EnableJY          = this.bEnableJY.Checked;
            ZDTHelper.Instance.EnableBJZS        = this.bEnableBJZS.Checked;
            ZDTHelper.Instance.EnableAlarmUpload = this.bEnableAlarmUpload.Checked;

            ZDTHelper.Instance.BJZS_Config = bean;
            ZDTHelper.Instance.User        = this.tUser.Text;
            ZDTHelper.Instance.PassWd      = this.tPass.Text;
            ZDTHelper.Save();
        }