Пример #1
0
        /// <summary>
        /// 확인 버튼 클릭
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OkBtn_Click(object sender, EventArgs e)
        {
            WSmsRecvKind wSmsRecvKind = new WSmsRecvKind(
                this.Alarm1CB.Checked,
                this.Alarm2CB.Checked,
                this.Alarm3CB.Checked,
                this.Batt1Volt.Checked,
                this.Batt1Tempo.Checked,
                this.Batt1Test.Checked,
                this.Batt1Repair.Checked,
                this.Batt1Reset.Checked,
                this.Batt2Volt.Checked,
                this.Batt2Tempo.Checked,
                this.Batt2Test.Checked,
                this.Batt2Repair.Checked,
                this.Batt2Reset.Checked,
                this.SensorCB.Checked,
                this.FanCB.Checked,
                this.CdmaCB.Checked);

            if (this.OnSmsRecvKind != null)
            {
                this.OnSmsRecvKind(this, new RecvSMSKindEventArgs(wSmsRecvKind));
            }

            this.Close();
        }
Пример #2
0
 /// <summary>
 /// 초기화
 /// </summary>
 private void init(WSmsRecvKind _smsKindClass)
 {
     this.Alarm1CB.Checked    = _smsKindClass.Alarm1;
     this.Alarm2CB.Checked    = _smsKindClass.Alarm2;
     this.Alarm3CB.Checked    = _smsKindClass.Alarm3;
     this.Batt1Volt.Checked   = _smsKindClass.Batt1Volt;
     this.Batt1Tempo.Checked  = _smsKindClass.Batt1Tempo;
     this.Batt1Test.Checked   = _smsKindClass.Batt1Test;
     this.Batt1Repair.Checked = _smsKindClass.Batt1Repair;
     this.Batt1Reset.Checked  = _smsKindClass.Batt1Reset;
     this.Batt2Volt.Checked   = _smsKindClass.Batt2Volt;
     this.Batt2Tempo.Checked  = _smsKindClass.Batt2Tempo;
     this.Batt2Test.Checked   = _smsKindClass.Batt2Test;
     this.Batt2Repair.Checked = _smsKindClass.Batt2Repair;
     this.Batt2Reset.Checked  = _smsKindClass.Batt2Reset;
     this.SensorCB.Checked    = _smsKindClass.SensorState;
     this.FanCB.Checked       = _smsKindClass.FanState;
     this.CdmaCB.Checked      = _smsKindClass.CDMATime;
 }
Пример #3
0
        //수신항목 사용자지정 버튼 클릭
        private void RecvKindBtn_Click(object sender, EventArgs e)
        {
            if (this.code == 1) //등록
            {
                using (SMSRecvKindDlg recvDlg = new SMSRecvKindDlg())
                {
                    recvDlg.OnSmsRecvKind += new EventHandler <RecvSMSKindEventArgs>(recvDlg_OnSmsRecvKind);
                    recvDlg.ShowDialog();
                    recvDlg.OnSmsRecvKind -= new EventHandler <RecvSMSKindEventArgs>(recvDlg_OnSmsRecvKind);
                }
            }
            else if (this.code == 2) //수정
            {
                WSmsRecvKind wSmsRecvKindClass = new WSmsRecvKind();

                for (int i = 0; i < this.dataMng.MapSmsItemList.Count; i++)
                {
                    if (this.dataMng.MapSmsItemList[i].FkSmsUser == this.pkid)
                    {
                        if (this.dataMng.MapSmsItemList[i].FkDevice == (uint)WeatherDataMng.SMSType.임계치1단계)
                        {
                            wSmsRecvKindClass.Alarm1 = this.dataMng.MapSmsItemList[i].IsUse;
                        }

                        if (this.dataMng.MapSmsItemList[i].FkDevice == (uint)WeatherDataMng.SMSType.임계치2단계)
                        {
                            wSmsRecvKindClass.Alarm2 = this.dataMng.MapSmsItemList[i].IsUse;
                        }

                        if (this.dataMng.MapSmsItemList[i].FkDevice == (uint)WeatherDataMng.SMSType.임계치3단계)
                        {
                            wSmsRecvKindClass.Alarm3 = this.dataMng.MapSmsItemList[i].IsUse;
                        }

                        if (this.dataMng.MapSmsItemList[i].FkDevice == (uint)WeatherDataMng.SMSType.배터리1전압이상)
                        {
                            wSmsRecvKindClass.Batt1Volt = this.dataMng.MapSmsItemList[i].IsUse;
                        }

                        if (this.dataMng.MapSmsItemList[i].FkDevice == (uint)WeatherDataMng.SMSType.배터리1온도이상)
                        {
                            wSmsRecvKindClass.Batt1Tempo = this.dataMng.MapSmsItemList[i].IsUse;
                        }

                        if (this.dataMng.MapSmsItemList[i].FkDevice == (uint)WeatherDataMng.SMSType.배터리1점검시기)
                        {
                            wSmsRecvKindClass.Batt1Test = this.dataMng.MapSmsItemList[i].IsUse;
                        }

                        if (this.dataMng.MapSmsItemList[i].FkDevice == (uint)WeatherDataMng.SMSType.배터리1교체시기)
                        {
                            wSmsRecvKindClass.Batt1Repair = this.dataMng.MapSmsItemList[i].IsUse;
                        }

                        if (this.dataMng.MapSmsItemList[i].FkDevice == (uint)WeatherDataMng.SMSType.배터리1교체초기화)
                        {
                            wSmsRecvKindClass.Batt1Reset = this.dataMng.MapSmsItemList[i].IsUse;
                        }

                        if (this.dataMng.MapSmsItemList[i].FkDevice == (uint)WeatherDataMng.SMSType.배터리2전압이상)
                        {
                            wSmsRecvKindClass.Batt2Volt = this.dataMng.MapSmsItemList[i].IsUse;
                        }

                        if (this.dataMng.MapSmsItemList[i].FkDevice == (uint)WeatherDataMng.SMSType.배터리2온도이상)
                        {
                            wSmsRecvKindClass.Batt2Tempo = this.dataMng.MapSmsItemList[i].IsUse;
                        }

                        if (this.dataMng.MapSmsItemList[i].FkDevice == (uint)WeatherDataMng.SMSType.배터리2점검시기)
                        {
                            wSmsRecvKindClass.Batt2Test = this.dataMng.MapSmsItemList[i].IsUse;
                        }

                        if (this.dataMng.MapSmsItemList[i].FkDevice == (uint)WeatherDataMng.SMSType.배터리2교체시기)
                        {
                            wSmsRecvKindClass.Batt2Repair = this.dataMng.MapSmsItemList[i].IsUse;
                        }

                        if (this.dataMng.MapSmsItemList[i].FkDevice == (uint)WeatherDataMng.SMSType.배터리2교체초기화)
                        {
                            wSmsRecvKindClass.Batt2Reset = this.dataMng.MapSmsItemList[i].IsUse;
                        }

                        if (this.dataMng.MapSmsItemList[i].FkDevice == (uint)WeatherDataMng.SMSType.센서상태)
                        {
                            wSmsRecvKindClass.SensorState = this.dataMng.MapSmsItemList[i].IsUse;
                        }

                        if (this.dataMng.MapSmsItemList[i].FkDevice == (uint)WeatherDataMng.SMSType.FAN이상)
                        {
                            wSmsRecvKindClass.FanState = this.dataMng.MapSmsItemList[i].IsUse;
                        }

                        if (this.dataMng.MapSmsItemList[i].FkDevice == (uint)WeatherDataMng.SMSType.CDMA시간설정이상)
                        {
                            wSmsRecvKindClass.CDMATime = this.dataMng.MapSmsItemList[i].IsUse;
                        }
                    }
                }

                using (SMSRecvKindDlg recvDlg = new SMSRecvKindDlg(wSmsRecvKindClass))
                {
                    recvDlg.OnSmsRecvKind += new EventHandler <RecvSMSKindEventArgs>(recvDlg_OnSmsRecvKind);
                    recvDlg.ShowDialog();
                    recvDlg.OnSmsRecvKind -= new EventHandler <RecvSMSKindEventArgs>(recvDlg_OnSmsRecvKind);
                }
            }
        }
Пример #4
0
        /// <summary>
        /// 생성자
        /// </summary>
        /// <param name="smsKindClass"></param>
        public SMSRecvKindDlg(WSmsRecvKind _smsKindClass)
        {
            InitializeComponent();

            this.init(_smsKindClass);
        }
Пример #5
0
 /// <summary>
 /// 기본생성자
 /// </summary>
 /// <param name="_smsKindClass"></param>
 public RecvSMSKindEventArgs(WSmsRecvKind _smsKindClass)
 {
     this.smsKindClass = _smsKindClass;
 }