예제 #1
0
			public TableEnemyMemberControl( FormCompass parent ) {

				#region Initialize

				Parent = parent;
				ToolTipInfo = parent.ToolTipInfo;


				ShipName = new ImageLabel();
				ShipName.Anchor = AnchorStyles.Left;
				ShipName.ForeColor = parent.MainFontColor;
				ShipName.ImageAlign = ContentAlignment.MiddleCenter;
				ShipName.Padding = new Padding( 0, 1, 0, 1 );
				ShipName.Margin = new Padding( 2, 0, 2, 0 );
				ShipName.MaximumSize = new Size( 120, 20 );
				ShipName.AutoEllipsis = true;
				ShipName.AutoSize = true;
				ShipName.Cursor = Cursors.Help;
				ShipName.MouseClick += ShipName_MouseClick;

				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.Size = new Size( 40, 20 );	//checkme: 要る?
				Equipments.AutoSize = true;
				Equipments.ResumeLayout();

				ConfigurationChanged();

				#endregion

			}
예제 #2
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.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 = ExpTable.ShipMaximumLevel;
                Level.ValueNext = 0;
                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;
                Level.ResumeLayout();

                HP = new ShipStatusHP();
                HP.SuspendLayout();
                HP.Anchor = AnchorStyles.Left;
                HP.Value = 0;
                HP.MaximumValue = 0;
                HP.MaximumDigit = 999;
                HP.UsePrevValue = false;
                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.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.Size = new Size( 40, 20 );
                Equipments.AutoSize = true;
                Equipments.Visible = false;
                Equipments.ResumeLayout();

                ConfigurationChanged( parent );

                ToolTipInfo = parent.ToolTipInfo;
                Parent = parent;
                #endregion
            }
 public LayoutParameter(ShipStatusEquipment parent)
 {
     Parent = parent;
     ResetLayout();
 }