Exemplo n.º 1
0
        private void InitializeComponent()
        {
            Font font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));

            //238

            this.name         = new System.Windows.Forms.Label();
            this.hits         = new System.Windows.Forms.Label();
            this.healthBar    = new CalExtension.UI.Status.HealthBar();
            this.manaBar      = new ManaBar();
            this.mana         = new Label();
            this.staminaBar   = new StaminaBar();
            this.stam         = new Label();
            this.ar           = new Label();
            this.weight       = new Label();
            this.btnA         = new Button();
            this.btnB         = new Button();
            this.btnX         = new Button();
            this.btnY         = new Button();
            this.chbxKeep     = new CheckBox();
            this.chbxHeal     = new CheckBox();
            this.chbxAlie     = new CheckBox();
            this.runLabel     = new System.Windows.Forms.Label();
            this.notifiyLabel = new Label();

            this.SuspendLayout();

            if (this.mobile.Serial == World.Player.Serial)
            {
                //
                // name
                //
                this.runLabel.AutoSize  = true;
                this.runLabel.BackColor = System.Drawing.Color.Transparent;
                this.runLabel.Enabled   = false;
                this.runLabel.Font      = font;
                this.runLabel.Name      = "runLabel";
                this.runLabel.Size      = new System.Drawing.Size(20, 14);
                this.runLabel.TabIndex  = 0;
                this.runLabel.Text      = "-";

                this.notifiyLabel.AutoSize  = true;
                this.notifiyLabel.BackColor = System.Drawing.Color.Transparent;
                this.notifiyLabel.Enabled   = false;
                this.notifiyLabel.Font      = font;
                this.notifiyLabel.Name      = "notifiyLabel";
                this.notifiyLabel.Size      = new System.Drawing.Size(20, 14);
                this.notifiyLabel.TabIndex  = 0;
                this.notifiyLabel.Text      = "";


                //-4 -2
                this.name.AutoSize  = true;
                this.name.BackColor = System.Drawing.Color.Transparent;
                this.name.Enabled   = false;
                this.name.Font      = font;

                this.name.Location = new System.Drawing.Point(3, 3);
                this.name.Name     = "name";
                this.name.Size     = new System.Drawing.Size(100, 14);
                this.name.TabIndex = 0;
                this.name.Text     = "label1";


                this.ar.AutoSize  = true;
                this.ar.BackColor = System.Drawing.Color.Transparent;
                this.ar.Enabled   = false;
                this.ar.Font      = font;
                this.ar.ForeColor = System.Drawing.Color.Silver;
                this.ar.Location  = new System.Drawing.Point(105, 3);
                this.ar.Name      = "ar";
                this.ar.Size      = new System.Drawing.Size(40, 14);
                this.ar.TabIndex  = 0;
                this.ar.Text      = "ar: 0000";

                this.weight.AutoSize  = true;
                this.weight.BackColor = System.Drawing.Color.Transparent;
                this.weight.Enabled   = false;
                this.weight.Font      = font;
                this.weight.ForeColor = System.Drawing.Color.Silver;
                this.weight.Location  = new System.Drawing.Point(142, 3);
                this.weight.Name      = "weight";
                this.weight.Size      = new System.Drawing.Size(40, 14);
                this.weight.TabIndex  = 0;
                this.weight.Text      = "w: 0000";



                //
                // healthBar
                //
                this.healthBar.Enabled  = false;
                this.healthBar.Hits     = 0;
                this.healthBar.Location = new System.Drawing.Point(56, 20);
                this.healthBar.MaxHits  = 0;
                this.healthBar.Name     = "healthBar";
                this.healthBar.Size     = new System.Drawing.Size(128, 10);
                this.healthBar.TabIndex = 2;
                this.healthBar.Text     = "healthBar1";
                this.healthBar.Unknown  = false;

                this.manaBar.Enabled  = false;
                this.manaBar.Mana     = 0;
                this.manaBar.Location = new System.Drawing.Point(56, 34);
                this.manaBar.MaxMana  = 0;
                this.manaBar.Name     = "manaBar";
                this.manaBar.Size     = new System.Drawing.Size(128, 10);
                this.manaBar.TabIndex = 2;
                this.manaBar.Text     = "manaBar1";
                this.manaBar.Unknown  = false;
                //-4 -2

                this.staminaBar.Enabled  = false;
                this.staminaBar.Stam     = 0;
                this.staminaBar.Location = new System.Drawing.Point(56, 48);
                this.staminaBar.MaxStam  = 0;
                this.staminaBar.Name     = "staminaBar";
                this.staminaBar.Size     = new System.Drawing.Size(128, 10);
                this.staminaBar.TabIndex = 2;
                this.staminaBar.Text     = "staminaBar1";
                this.staminaBar.Unknown  = false;


                //
                // hits
                //
                this.hits.AutoSize  = true;
                this.hits.BackColor = System.Drawing.Color.Transparent;
                this.hits.Enabled   = false;
                this.hits.Font      = font;

                this.hits.ForeColor = System.Drawing.Color.Silver;
                this.hits.Location  = new System.Drawing.Point(3, 18);
                this.hits.Name      = "hits";
                this.hits.Size      = new System.Drawing.Size(50, 10);
                this.hits.TabIndex  = 1;
                this.hits.Text      = "0000/0000";

                this.mana.AutoSize  = true;
                this.mana.BackColor = System.Drawing.Color.Transparent;
                this.mana.Enabled   = false;
                this.mana.Font      = font;
                this.mana.ForeColor = System.Drawing.Color.Silver;
                this.mana.Location  = new System.Drawing.Point(3, 32);
                this.mana.Name      = "hits";
                this.mana.Size      = new System.Drawing.Size(50, 10);
                this.mana.TabIndex  = 1;
                this.mana.Text      = "0000/0000";

                this.stam.AutoSize  = true;
                this.stam.BackColor = System.Drawing.Color.Transparent;
                this.stam.Enabled   = false;
                this.stam.Font      = font;
                this.stam.ForeColor = System.Drawing.Color.Silver;
                this.stam.Location  = new System.Drawing.Point(3, 46);
                this.stam.Name      = "hits";
                this.stam.Size      = new System.Drawing.Size(50, 10);
                this.stam.TabIndex  = 1;
                this.stam.Text      = "0000/0000";
                //
                // StatusForm
                //

                //int lastX = 0;
                int lastY = 0;


                lastY = staminaBar.Location.Y + staminaBar.Size.Height;



                this.ClientSize = new System.Drawing.Size(190, lastY + 20);
                this.Controls.Add(this.manaBar);
                this.Controls.Add(this.mana);

                this.Controls.Add(this.staminaBar);
                this.Controls.Add(this.stam);
                this.Controls.Add(this.ar);
                this.Controls.Add(this.weight);

                this.Controls.Add(this.btnA);
                this.Controls.Add(this.btnB);
                this.Controls.Add(this.btnX);
                this.Controls.Add(this.btnY);

                this.Controls.Add(this.runLabel);
                //   this.Controls.Add(this.notifiyLabel); TODO

                this.runLabel.Location = new Point(3, lastY);



                this.btnA.Name      = "btnA";
                this.btnA.Location  = new System.Drawing.Point(56, lastY + 3);
                this.btnA.Size      = new System.Drawing.Size(12, 12);
                this.btnA.TabIndex  = 1;
                this.btnA.BackColor = Color.LawnGreen;
                this.btnA.FlatStyle = FlatStyle.Flat;
                this.btnA.FlatAppearance.BorderSize = 0;
                this.btnA.ForeColor = System.Drawing.Color.Black;
                this.btnA.TabStop   = false;
                this.btnA.Padding   = new Padding(0);
                Control prevCont = this.btnA;

                this.btnB.Name      = "btnB";
                this.btnB.Location  = new System.Drawing.Point(prevCont.Location.X + prevCont.Size.Width + 3, lastY + 3);
                this.btnB.Size      = new System.Drawing.Size(12, 12);
                this.btnB.TabIndex  = 1;
                this.btnB.BackColor = Color.Firebrick;
                this.btnB.FlatStyle = FlatStyle.Flat;
                this.btnB.FlatAppearance.BorderSize = 0;
                this.btnB.ForeColor = System.Drawing.Color.Black;
                this.btnB.TabStop   = false;
                this.btnB.Padding   = new Padding(0);
                prevCont            = this.btnB;

                this.btnX.Name      = "btnX";
                this.btnX.Location  = new System.Drawing.Point(prevCont.Location.X + prevCont.Size.Width + 3, lastY + 3);
                this.btnX.Size      = new System.Drawing.Size(12, 12);
                this.btnX.TabIndex  = 1;
                this.btnX.BackColor = Color.Blue;
                this.btnX.FlatStyle = FlatStyle.Flat;
                this.btnX.FlatAppearance.BorderSize = 0;
                this.btnX.ForeColor = System.Drawing.Color.Black;
                this.btnX.TabStop   = false;
                this.btnX.Padding   = new Padding(0);
                prevCont            = this.btnX;

                this.btnY.Name      = "btnY";
                this.btnY.Location  = new System.Drawing.Point(prevCont.Location.X + prevCont.Size.Width + 3, lastY + 3);
                this.btnY.Size      = new System.Drawing.Size(12, 12);
                this.btnY.TabIndex  = 1;
                this.btnY.BackColor = Color.Orange;
                this.btnY.FlatStyle = FlatStyle.Flat;
                this.btnY.FlatAppearance.BorderSize = 0;
                this.btnY.ForeColor = System.Drawing.Color.Black;
                this.btnY.TabStop   = false;
                this.btnY.Padding   = new Padding(0);
                this.btnY.Margin    = new Padding(0);
                prevCont            = this.btnY;

                this.chbxHeal.Name      = "heal";
                this.chbxHeal.Location  = new System.Drawing.Point(prevCont.Location.X + prevCont.Size.Width + 3, lastY + 3);
                this.chbxHeal.Size      = new System.Drawing.Size(12, 12);
                this.chbxHeal.TabIndex  = 1;
                this.chbxHeal.BackColor = Color.Transparent;
                prevCont = this.chbxHeal;

                this.chbxAlie.Name      = "alie";
                this.chbxAlie.Location  = new System.Drawing.Point(prevCont.Location.X + prevCont.Size.Width + 3, lastY + 3);
                this.chbxAlie.Size      = new System.Drawing.Size(12, 12);
                this.chbxAlie.TabIndex  = 1;
                this.chbxAlie.BackColor = Color.Transparent;
                prevCont = this.chbxAlie;

                this.chbxKeep.Name      = "keep";
                this.chbxKeep.Location  = new System.Drawing.Point(prevCont.Location.X + prevCont.Size.Width + 3, lastY + 3);
                this.chbxKeep.Size      = new System.Drawing.Size(12, 12);
                this.chbxKeep.TabIndex  = 1;
                this.chbxKeep.BackColor = Color.Transparent;

                this.BackColor = System.Drawing.Color.Black;

                this.Controls.Add(this.hits);
                this.Controls.Add(this.name);
                this.Controls.Add(this.healthBar);
            }
            else
            {
                font = new System.Drawing.Font("Arial", 7.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                int minPading = 2;

                this.name.AutoSize  = true;
                this.name.BackColor = System.Drawing.Color.Transparent;
                this.name.Enabled   = false;
                this.name.Font      = font;
                this.name.Location  = new System.Drawing.Point(minPading, minPading);
                this.name.Name      = "name";
                this.name.TabIndex  = 0;
                this.name.Text      = "label1";

                this.hits.AutoSize  = true;
                this.hits.BackColor = System.Drawing.Color.Transparent;
                this.hits.Enabled   = false;
                this.hits.Font      = font;
                this.hits.ForeColor = System.Drawing.Color.Silver;
                this.hits.Location  = new System.Drawing.Point(minPading, 14);//12
                this.hits.Name      = "hits";
                this.hits.TabIndex  = 1;
                this.hits.Text      = "000/000";

                this.healthBar.Enabled  = false;
                this.healthBar.Hits     = 0;
                this.healthBar.Location = new System.Drawing.Point(48, this.hits.Location.Y + 2);//38
                this.healthBar.MaxHits  = 0;
                this.healthBar.Name     = "healthBar";
                this.healthBar.Size     = new System.Drawing.Size(104, 10);//8
                this.healthBar.TabIndex = 2;
                this.healthBar.Text     = "healthBar1";
                this.healthBar.Unknown  = false;

                this.runLabel.AutoSize  = true;
                this.runLabel.BackColor = System.Drawing.Color.Transparent;
                this.runLabel.Enabled   = false;
                this.runLabel.Font      = font;
                this.runLabel.Name      = "runLabel";
                //this.runLabel.Size = new System.Drawing.Size(20, 8);
                this.runLabel.TabIndex = 0;
                this.runLabel.Text     = "-";
                this.runLabel.Location = new Point(minPading, 28);

                int lastY = 0;

                int chbxBoxSize = 11;

                lastY = this.healthBar.Location.Y + this.healthBar.Height;//30 - (chbxBoxSize + 2);

                this.btnA.Name      = "btnA";
                this.btnA.Location  = new System.Drawing.Point(48, lastY + 3);
                this.btnA.Size      = new System.Drawing.Size(chbxBoxSize, chbxBoxSize);
                this.btnA.TabIndex  = 1;
                this.btnA.BackColor = Color.LawnGreen;
                this.btnA.FlatStyle = FlatStyle.Flat;
                this.btnA.FlatAppearance.BorderSize = 0;
                this.btnA.ForeColor = System.Drawing.Color.Black;
                this.btnA.TabStop   = false;
                this.btnA.Padding   = new Padding(0);

                Control prevCont = this.btnA;

                this.btnB.Name      = "btnB";
                this.btnB.Location  = new System.Drawing.Point(prevCont.Location.X + chbxBoxSize + 3, lastY + 3);
                this.btnB.Size      = new System.Drawing.Size(chbxBoxSize, chbxBoxSize);
                this.btnB.TabIndex  = 1;
                this.btnB.BackColor = Color.Firebrick;
                this.btnB.FlatStyle = FlatStyle.Flat;
                this.btnB.FlatAppearance.BorderSize = 0;
                this.btnB.ForeColor = System.Drawing.Color.Black;
                this.btnB.TabStop   = false;
                this.btnB.Padding   = new Padding(0);
                prevCont            = this.btnB;

                this.btnX.Name      = "btnX";
                this.btnX.Location  = new System.Drawing.Point(prevCont.Location.X + prevCont.Size.Width + 3, lastY + 3);
                this.btnX.Size      = new System.Drawing.Size(chbxBoxSize, chbxBoxSize);
                this.btnX.TabIndex  = 1;
                this.btnX.BackColor = Color.Blue;
                this.btnX.FlatStyle = FlatStyle.Flat;
                this.btnX.FlatAppearance.BorderSize = 0;
                this.btnX.ForeColor = System.Drawing.Color.Black;
                this.btnX.TabStop   = false;
                this.btnX.Padding   = new Padding(0);
                prevCont            = this.btnX;

                this.btnY.Name      = "btnY";
                this.btnY.Location  = new System.Drawing.Point(prevCont.Location.X + prevCont.Size.Width + 3, lastY + 3);
                this.btnY.Size      = new System.Drawing.Size(chbxBoxSize, chbxBoxSize);
                this.btnY.TabIndex  = 1;
                this.btnY.BackColor = Color.Orange;
                this.btnY.FlatStyle = FlatStyle.Flat;
                this.btnY.FlatAppearance.BorderSize = 0;
                this.btnY.ForeColor = System.Drawing.Color.Black;
                this.btnY.TabStop   = false;
                this.btnY.Padding   = new Padding(0);
                this.btnY.Margin    = new Padding(0);
                prevCont            = this.btnY;

                this.chbxHeal.Name      = "heal";
                this.chbxHeal.Location  = new System.Drawing.Point(prevCont.Location.X + prevCont.Size.Width + 3, lastY + 3);
                this.chbxHeal.Size      = new System.Drawing.Size(chbxBoxSize, chbxBoxSize);
                this.chbxHeal.TabIndex  = 1;
                this.chbxHeal.BackColor = Color.Transparent;
                prevCont = this.chbxHeal;

                this.chbxAlie.Name      = "alie";
                this.chbxAlie.Location  = new System.Drawing.Point(prevCont.Location.X + prevCont.Size.Width + 3, lastY + 3);
                this.chbxAlie.Size      = new System.Drawing.Size(chbxBoxSize, chbxBoxSize);
                this.chbxAlie.TabIndex  = 1;
                this.chbxAlie.BackColor = Color.Transparent;
                prevCont = this.chbxAlie;

                this.chbxKeep.Name      = "keep";
                this.chbxKeep.Location  = new System.Drawing.Point(prevCont.Location.X + prevCont.Size.Width + 3, lastY + 3);
                this.chbxKeep.Size      = new System.Drawing.Size(chbxBoxSize, chbxBoxSize);
                this.chbxKeep.TabIndex  = 1;
                this.chbxKeep.BackColor = Color.Transparent;


                this.Controls.Add(this.hits);
                this.Controls.Add(this.name);
                this.Controls.Add(this.healthBar);

                this.Controls.Add(this.btnA);
                this.Controls.Add(this.btnB);
                this.Controls.Add(this.btnX);
                this.Controls.Add(this.btnY);

                this.Controls.Add(this.chbxHeal);
                this.Controls.Add(this.chbxAlie);
                this.Controls.Add(this.chbxKeep);

                this.Controls.Add(this.runLabel);

                this.ClientSize = new System.Drawing.Size(158, 44);
            }

            this.DoubleBuffered = true;
            this.Name           = "StatusForm";
            this.ResumeLayout(false);
            this.PerformLayout();

            this.OriginalWidth  = this.Width;
            this.OriginalHeight = this.Height;
        }