Beispiel #1
0
            public TableMemberControl(FormFleet parent)
            {
                #region Initialize

                Name = new ImageLabel();
                Name.SuspendLayout();
                Name.Text       = "*nothing*";
                Name.Anchor     = AnchorStyles.Left;
                Name.TextAlign  = ContentAlignment.MiddleLeft;
                Name.ImageAlign = ContentAlignment.MiddleCenter;
                Name.Font       = parent.MainFont;
                Name.ForeColor  = parent.MainFontColor;
                Name.Padding    = new Padding(0, 1, 0, 1);
                Name.Margin     = new Padding(2, 0, 2, 0);
                Name.AutoSize   = true;
                //Name.AutoEllipsis = true;
                Name.Visible    = false;
                Name.Cursor     = Cursors.Help;
                Name.MouseDown += Name_MouseDown;
                Name.ResumeLayout();

                Level = new ShipStatusLevel();
                Level.SuspendLayout();
                Level.Anchor        = AnchorStyles.Left | AnchorStyles.Bottom;
                Level.Value         = 0;
                Level.MaximumValue  = 150;
                Level.ValueNext     = 0;
                Level.MainFont      = parent.MainFont;
                Level.SubFont       = parent.SubFont;
                Level.MainFontColor = parent.MainFontColor;
                Level.SubFontColor  = parent.SubFontColor;
                //Level.TextNext = "n.";
                Level.Padding  = new Padding(0, 0, 0, 0);
                Level.Margin   = new Padding(2, 0, 2, 1);
                Level.AutoSize = true;
                Level.Visible  = false;
                Name.ResumeLayout();

                HP = new ShipStatusHP();
                HP.SuspendLayout();
                HP.Anchor        = AnchorStyles.Left;
                HP.Value         = 0;
                HP.MaximumValue  = 0;
                HP.MaximumDigit  = 999;
                HP.UsePrevValue  = false;
                HP.MainFont      = parent.MainFont;
                HP.SubFont       = parent.SubFont;
                HP.MainFontColor = parent.MainFontColor;
                HP.SubFontColor  = parent.SubFontColor;
                HP.Padding       = new Padding(0, 0, 0, 0);
                HP.Margin        = new Padding(2, 1, 2, 2);
                HP.AutoSize      = true;
                HP.Visible       = false;
                HP.ResumeLayout();

                Condition = new ImageLabel();
                Condition.SuspendLayout();
                Condition.Text       = "*";
                Condition.Anchor     = AnchorStyles.Left | AnchorStyles.Right;
                Condition.Font       = parent.MainFont;
                Condition.ForeColor  = parent.MainFontColor;
                Condition.TextAlign  = ContentAlignment.BottomRight;
                Condition.ImageAlign = ContentAlignment.MiddleLeft;
                Condition.ImageList  = ResourceManager.Instance.Icons;
                Condition.Padding    = new Padding(2, 2, 2, 2);
                Condition.Margin     = new Padding(2, 0, 2, 0);
                Condition.Size       = new Size(40, 20);
                Condition.AutoSize   = true;
                Condition.Visible    = false;
                Condition.ResumeLayout();

                ShipResource = new ShipStatusResource(parent.ToolTipInfo);
                ShipResource.SuspendLayout();
                ShipResource.FuelCurrent = 0;
                ShipResource.FuelMax     = 0;
                ShipResource.AmmoCurrent = 0;
                ShipResource.AmmoMax     = 0;
                ShipResource.Anchor      = AnchorStyles.Left;
                ShipResource.Padding     = new Padding(0, 2, 0, 1);
                ShipResource.Margin      = new Padding(2, 0, 2, 0);
                ShipResource.Size        = new Size(30, 20);
                ShipResource.AutoSize    = false;
                ShipResource.Visible     = false;
                ShipResource.ResumeLayout();

                Equipments = new ShipStatusEquipment();
                Equipments.SuspendLayout();
                Equipments.Anchor       = AnchorStyles.Left;
                Equipments.Padding      = new Padding(0, 2, 0, 1);
                Equipments.Margin       = new Padding(2, 0, 2, 0);
                Equipments.Font         = parent.SubFont;
                Equipments.Size         = new Size(40, 20);
                Equipments.AutoSize     = true;
                Equipments.Visible      = false;
                Equipments.ShowAircraft = Utility.Configuration.Config.FormFleet.ShowAircraft;
                Equipments.ResumeLayout();


                ToolTipInfo = parent.ToolTipInfo;
                Parent      = parent;
                #endregion
            }