Exemplo n.º 1
0
        public void pageInit(DevManDevice pParent, int devID, string devName, bool onlinest)
        {
            this.m_ininit   = true;
            this.m_cleartab = true;
            this.tcDev.Controls.Clear();
            this.m_cleartab = false;
            DeviceInfo deviceByID = DeviceOperation.getDeviceByID(devID);

            if (deviceByID == null)
            {
                EcoMessageBox.ShowError(EcoLanguage.getMsg(LangRes.DevInfo_nofind, new string[]
                {
                    devName
                }));
                return;
            }
            this.m_onlinest = onlinest;
            this.m_curdevID = devID.ToString();
            this.tcDev.Controls.Add(this.tbDevice);
            this.propDev1.pageInit(pParent, devID, onlinest);
            if (deviceByID.GetPortInfo().Count > 0)
            {
                this.tcDev.Controls.Add(this.tbOutlet);
                this.propOutlet1.pageInit(devID, 0, onlinest);
            }
            if (deviceByID.GetBankInfo().Count > 0)
            {
                this.tcDev.Controls.Add(this.tbBank);
                this.propBank1.pageInit(devID, 0, onlinest);
            }
            if (deviceByID.GetLineInfo().Count > 0)
            {
                this.tcDev.Controls.Add(this.tbLine);
                this.propLine1.pageInit(devID, 0, onlinest);
            }
            if (deviceByID.GetSensorInfo().Count > 0)
            {
                this.tcDev.Controls.Add(this.tbSensor);
                this.propSensor1.pageInit(devID, onlinest);
            }
            if (DevAccessCfg.GetInstance().getDeviceModelConfig(deviceByID.ModelNm, deviceByID.FWVersion).popReading == 2)
            {
                this.tcDev.Controls.Add(this.tbPop);
                this.propPOP1.pageInit(devID, onlinest);
            }
            if (this.m_selectedTab == null || !this.tcDev.Contains(this.m_selectedTab))
            {
                this.m_selectedTab = this.tbDevice;
            }
            this.tcDev.SelectTab(this.m_selectedTab);
            this.m_ininit = false;
        }
Exemplo n.º 2
0
 public void pageInit(DevManDevice pParent, TreeNode rootNode)
 {
     this.m_pParent  = pParent;
     this.m_rootNode = rootNode;
     this.show_devTb();
 }