示例#1
0
        private void InitializeComponent()
        {
            ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(ManRack));

            this.lbRack            = new ListBox();
            this.butModify         = new Button();
            this.butDel            = new Button();
            this.butNew            = new Button();
            this.devManFloorGrids1 = new DevManFloorGrids();
            base.SuspendLayout();
            componentResourceManager.ApplyResources(this.lbRack, "lbRack");
            this.lbRack.FormattingEnabled = true;
            this.lbRack.Name = "lbRack";
            this.lbRack.SelectedIndexChanged += new System.EventHandler(this.lbRack_SelectedIndexChanged);
            this.butModify.BackColor          = Color.Gainsboro;
            componentResourceManager.ApplyResources(this.butModify, "butModify");
            this.butModify.Name = "butModify";
            this.butModify.UseVisualStyleBackColor = false;
            this.butModify.Click += new System.EventHandler(this.butModify_Click);
            this.butDel.BackColor = Color.Gainsboro;
            componentResourceManager.ApplyResources(this.butDel, "butDel");
            this.butDel.Name = "butDel";
            this.butDel.UseVisualStyleBackColor = false;
            this.butDel.Click    += new System.EventHandler(this.butDel_Click);
            this.butNew.BackColor = Color.Gainsboro;
            componentResourceManager.ApplyResources(this.butNew, "butNew");
            this.butNew.Name = "butNew";
            this.butNew.UseVisualStyleBackColor = false;
            this.butNew.Click += new System.EventHandler(this.butNew_Click);
            this.devManFloorGrids1.BackColor = Color.WhiteSmoke;
            componentResourceManager.ApplyResources(this.devManFloorGrids1, "devManFloorGrids1");
            this.devManFloorGrids1.Name    = "devManFloorGrids1";
            this.devManFloorGrids1.TabStop = false;
            base.AutoScaleMode             = AutoScaleMode.None;
            this.BackColor = Color.WhiteSmoke;
            base.Controls.Add(this.devManFloorGrids1);
            base.Controls.Add(this.lbRack);
            base.Controls.Add(this.butModify);
            base.Controls.Add(this.butDel);
            base.Controls.Add(this.butNew);
            componentResourceManager.ApplyResources(this, "$this");
            base.Name            = "ManRack";
            base.VisibleChanged += new System.EventHandler(this.ManRack_VisibleChanged);
            base.ResumeLayout(false);
        }
示例#2
0
        private void InitializeComponent()
        {
            ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(ManZone));

            this.butModify         = new Button();
            this.butDel            = new Button();
            this.tvZone            = new TreeView();
            this.butAdd            = new Button();
            this.devManFloorGrids1 = new DevManFloorGrids();
            base.SuspendLayout();
            this.butModify.BackColor = Color.Gainsboro;
            componentResourceManager.ApplyResources(this.butModify, "butModify");
            this.butModify.Name = "butModify";
            this.butModify.UseVisualStyleBackColor = false;
            this.butModify.Click += new System.EventHandler(this.butModify_Click);
            this.butDel.BackColor = Color.Gainsboro;
            componentResourceManager.ApplyResources(this.butDel, "butDel");
            this.butDel.Name = "butDel";
            this.butDel.UseVisualStyleBackColor = false;
            this.butDel.Click        += new System.EventHandler(this.butDel_Click);
            this.tvZone.HideSelection = false;
            componentResourceManager.ApplyResources(this.tvZone, "tvZone");
            this.tvZone.Name          = "tvZone";
            this.tvZone.BeforeSelect += new TreeViewCancelEventHandler(this.tvZone_BeforeSelect);
            this.tvZone.AfterSelect  += new TreeViewEventHandler(this.tvZone_AfterSelect);
            this.butAdd.BackColor     = Color.Gainsboro;
            componentResourceManager.ApplyResources(this.butAdd, "butAdd");
            this.butAdd.Name = "butAdd";
            this.butAdd.UseVisualStyleBackColor = false;
            this.butAdd.Click += new System.EventHandler(this.butAdd_Click);
            this.devManFloorGrids1.BackColor = Color.WhiteSmoke;
            componentResourceManager.ApplyResources(this.devManFloorGrids1, "devManFloorGrids1");
            this.devManFloorGrids1.Name    = "devManFloorGrids1";
            this.devManFloorGrids1.TabStop = false;
            base.AutoScaleMode             = AutoScaleMode.None;
            this.BackColor = Color.WhiteSmoke;
            base.Controls.Add(this.devManFloorGrids1);
            base.Controls.Add(this.butModify);
            base.Controls.Add(this.butDel);
            base.Controls.Add(this.tvZone);
            base.Controls.Add(this.butAdd);
            componentResourceManager.ApplyResources(this, "$this");
            base.Name = "ManZone";
            base.ResumeLayout(false);
        }
示例#3
0
        private bool sysparaCheck()
        {
            bool flag          = false;
            int  selectedIndex = this.cbDClayout.SelectedIndex;

            if (selectedIndex < EcoGlobalVar.DCLayoutType)
            {
                int num  = DevManFloorGrids.get_DCRows(selectedIndex);
                int num2 = DevManFloorGrids.get_DCColumns(selectedIndex);
                System.Collections.ArrayList allRack = RackInfo.getAllRack();
                foreach (RackInfo rackInfo in allRack)
                {
                    if (rackInfo.StartPoint_X + 1 > num || rackInfo.EndPoint_X + 1 > num)
                    {
                        EcoMessageBox.ShowError(EcoLanguage.getMsg(LangRes.Rack_OutRange, new string[]
                        {
                            rackInfo.GetDisplayRackName(EcoGlobalVar.RackFullNameFlag)
                        }));
                        bool result = false;
                        return(result);
                    }
                    if (rackInfo.StartPoint_Y + 1 > num2 || rackInfo.EndPoint_Y + 1 > num2)
                    {
                        EcoMessageBox.ShowError(EcoLanguage.getMsg(LangRes.Rack_OutRange, new string[]
                        {
                            rackInfo.GetDisplayRackName(EcoGlobalVar.RackFullNameFlag)
                        }));
                        bool result = false;
                        return(result);
                    }
                }
                System.Collections.ArrayList allZone = ZoneInfo.getAllZone();
                foreach (ZoneInfo zoneInfo in allZone)
                {
                    if (zoneInfo.StartPointX + 1 > num || zoneInfo.EndPointX + 1 > num)
                    {
                        EcoMessageBox.ShowError(EcoLanguage.getMsg(LangRes.Zone_OutRange, new string[]
                        {
                            zoneInfo.ZoneName
                        }));
                        bool result = false;
                        return(result);
                    }
                    if (zoneInfo.StartPointY + 1 > num2 || zoneInfo.EndPointY + 1 > num2)
                    {
                        EcoMessageBox.ShowError(EcoLanguage.getMsg(LangRes.Zone_OutRange, new string[]
                        {
                            zoneInfo.ZoneName
                        }));
                        bool result = false;
                        return(result);
                    }
                }
            }
            if (this.rbEC1.Checked)
            {
                Ecovalidate.checkTextIsNull(this.tbECVoltage, ref flag);
                if (flag)
                {
                    EcoMessageBox.ShowError(EcoLanguage.getMsg(LangRes.Required, new string[]
                    {
                        this.rbEC1.Text
                    }));
                    return(false);
                }
                if (!Ecovalidate.Rangeint(this.tbECVoltage, 90, 260))
                {
                    EcoMessageBox.ShowError(EcoLanguage.getMsg(LangRes.Range, new string[]
                    {
                        this.rbEC1.Text,
                        "90",
                        "260"
                    }));
                    return(false);
                }
            }
            if (this.rbEC2.Checked)
            {
                try
                {
                    int l_id = System.Convert.ToInt32(this.lbECDevNm.Tag.ToString());
                    if (DeviceOperation.getDeviceByID(l_id) == null)
                    {
                        EcoMessageBox.ShowError(EcoLanguage.getMsg(LangRes.Required, new string[]
                        {
                            this.rbEC2.Text
                        }));
                        bool result = false;
                        return(result);
                    }
                }
                catch (System.Exception)
                {
                    EcoMessageBox.ShowError(EcoLanguage.getMsg(LangRes.Required, new string[]
                    {
                        this.rbEC2.Text
                    }));
                    bool result = false;
                    return(result);
                }
            }
            if (this.txtco2_elec.Text.Length > 0 && !Ecovalidate.NumberFormat_double(this.txtco2_elec))
            {
                EcoMessageBox.ShowError(EcoLanguage.getMsg(LangRes.Comm_invalidNumber, new string[0]));
                return(false);
            }
            if (this.txtprice_elec.Text.Length > 0 && !Ecovalidate.NumberFormat_double(this.txtprice_elec))
            {
                EcoMessageBox.ShowError(EcoLanguage.getMsg(LangRes.Comm_invalidNumber, new string[0]));
                return(false);
            }
            if (this.txtprice_co2.Text.Length > 0 && !Ecovalidate.NumberFormat_double(this.txtprice_co2))
            {
                EcoMessageBox.ShowError(EcoLanguage.getMsg(LangRes.Comm_invalidNumber, new string[0]));
                return(false);
            }
            return(true);
        }