private void btnTempLoad_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Are you sure to load the tag template?", "Confirm Message", MessageBoxButtons.OKCancel) != DialogResult.OK)
            {
                return;
            }

            if (lvTagList.Items.Count > 0)
            {
                foreach (cls_Tag tag in this.objManager.TagSetManager.tag_set_list[this.set_index].tag_set)
                {
                    template_data.TryAdd(tag.TagName, tag);
                }
                delgSetTagTemplate(template_data);
            }

            if (lvCalcTagList.Items.Count > 0)
            {
                foreach (cls_CalcTag calc_tag in this.objManager.TagSetManager.tag_set_list[this.set_index].calc_tag_set)
                {
                    template_calc_data.TryAdd(calc_tag.TagName, calc_tag);
                }
                delgSetCalcTagTemplate(template_calc_data);
            }

            this.objManager = null;

            this.Close();
        }
Exemple #2
0
 public frmListOTA(IEW.ObjectManager.ObjectManager obj_mgr, GateWayManager gw_mgr, OTAManager ota_mgr)
 {
     InitializeComponent();
     this.obj_manager = obj_mgr;
     this.gw_manager  = gw_mgr;
     this.ota_manager = ota_mgr;
     this.obj_manager.OTAAckEventHandler += new EventHandler(this.RefreshOTAAck);
 }
 public frmOnlineMonitor(IEW.ObjectManager.ObjectManager obj_mgr)
 {
     InitializeComponent();
     this.gateway_mgr = obj_mgr.GatewayManager;
     this.object_mgr  = obj_mgr;
     this.object_mgr.HeartBeatEventHandler += new EventHandler(this.StatusUpdate);
     this.object_mgr.AlarmEventHandler     += new EventHandler(this.StatusUpdate);
     this.object_mgr.EDCReportEventHandler += new EventHandler(this.StatusUpdate);
     this.object_mgr.StartAckEventHandler  += new EventHandler(this.StatusUpdate);
     this.object_mgr.ConfigAckEventHandler += new EventHandler(this.StatusUpdate);
 }