//측기 수정 시 이벤트
 private void dataMng_onUpdateWDeviceEvt(object sender, UpdateWDeviceEventArgs e)
 {
     if (this.SelfTestDeviceLV.Items.ContainsKey(e.WD.PKID.ToString()))
     {
         this.SelfTestDeviceLV.Items[e.WD.PKID.ToString()].SubItems[2].Text = string.Format("{0}({1})", e.WD.Name, this.dataMng.GetTypeDevice(e.WD.TypeDevice).Name);
     }
 }
Example #2
0
 /// <summary>
 /// 측기 수정 이벤트
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dataMng_onUpdateWDeviceEvt(object sender, UpdateWDeviceEventArgs e)
 {
     try
     {
         this.WDeviceLV.Items[e.WD.PKID.ToString()].SubItems[2].Text = this.dataMng.GetTypeDevice(e.WD.TypeDevice).Name;
         this.WDeviceLV.Items[e.WD.PKID.ToString()].SubItems[3].Text = e.WD.ID;
         this.WDeviceLV.Items[e.WD.PKID.ToString()].SubItems[4].Text = e.WD.Name;
         this.WDeviceLV.Items[e.WD.PKID.ToString()].SubItems[5].Text = e.WD.CellNumber;
     }
     catch (Exception ex)
     {
         Console.WriteLine(string.Format("DeviceMng.dataMng_onUpdateWDeviceEvt() - {0}", ex.Message));
     }
 }
Example #3
0
 //측기 정보 수정 시 발생하는 이벤트
 private void dataMng_onUpdateWDeviceEvt(object sender, UpdateWDeviceEventArgs e)
 {
     for (int i = 0; i < this.SmsUserTV.Nodes.Count; i++)
     {
         for (int j = 0; j < this.SmsUserTV.Nodes[i].Nodes.Count; j++)
         {
             if (this.SmsUserTV.Nodes[i].Nodes[j].Name == e.WD.PKID.ToString())
             {
                 this.SmsUserTV.Nodes[i].Nodes[j].Text = string.Format("{0}({1})", e.WD.Name,
                                                                       this.dataMng.GetTypeDevice(e.WD.TypeDevice).Name);
             }
         }
     }
 }
        /// <summary>
        /// 측기 수정 이벤트
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dataMng_onUpdateWDeviceEvt(object sender, UpdateWDeviceEventArgs e)
        {
            if ((e.WD.HaveSensor & 0x01) == 0x01) //강수
            {
                this.WData1LV.Items[e.WD.PKID.ToString()].SubItems[2].Text = e.WD.Name;
            }

            if ((e.WD.HaveSensor & 0x02) == 0x02) //수위
            {
                this.WData2LV.Items[e.WD.PKID.ToString()].SubItems[2].Text = e.WD.Name;
            }

            if ((e.WD.HaveSensor & 0x04) == 0x04) //유속
            {
                this.WData3LV.Items[e.WD.PKID.ToString()].SubItems[2].Text = e.WD.Name;
            }
        }
Example #5
0
        /// <summary>
        /// 측기 수정 이벤트
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dataMng_onUpdateWDeviceEvt(object sender, UpdateWDeviceEventArgs e)
        {
            if (e.WD.EthernetUse)
            {
                EthernetClient tmpE = this.dataMng.getEthernetClient(e.WD.ID);

                if (tmpE.Client == null || tmpE.ID == string.Empty || !tmpE.Client.Connected)
                {
                    this.WeatherListView.Items[e.WD.PKID.ToString()].StateImageIndex = 0;
                }
                else
                {
                    this.WeatherListView.Items[e.WD.PKID.ToString()].StateImageIndex = 1;
                }
            }
            else
            {
                this.WeatherListView.Items[e.WD.PKID.ToString()].StateImageIndex = NotUseIcon;
            }

            this.WeatherListView.Items[e.WD.PKID.ToString()].SubItems[2].Text = this.dataMng.GetTypeDevice(e.WD.TypeDevice).Name;
            this.WeatherListView.Items[e.WD.PKID.ToString()].SubItems[3].Text = e.WD.ID;
            this.WeatherListView.Items[e.WD.PKID.ToString()].SubItems[4].Text = e.WD.Name;
            this.WeatherListView.Items[e.WD.PKID.ToString()].SubItems[5].Text = e.WD.CellNumber;

            if (this.WeatherListView.SelectedItems.Count == 1)
            {
                if (this.WeatherListView.SelectedItems[0].Name == e.WD.PKID.ToString())
                {
                    this.WeatherListView.Items[e.WD.PKID.ToString()].Selected = false;
                    this.WeatherListView.Items[e.WD.PKID.ToString()].Focused  = false;
                    this.WeatherListView.Items[e.WD.PKID.ToString()].Selected = true;
                    this.WeatherListView.Items[e.WD.PKID.ToString()].Focused  = true;
                    this.WeatherListView.Items[e.WD.PKID.ToString()].EnsureVisible();
                }
            }

            this.SetWeatherData(string.Format("{0}의 {1} 측기가 수정되었습니다.", this.dataMng.GetTypeDevice(e.WD.TypeDevice).Name, e.WD.ID));
        }