Пример #1
0
 //----------------------------------------------
 //----------------------------------------------
 #region MapDisplayer Region.
 private void Initialize_ForMapDisplayer_Component()
 {
     this.Size = new Size(12 * (ThereIsConstants.Forming.GameClient.Width / 84),
                          2 * (ThereIsConstants.Forming.GameClient.Height / 12));
     //-----------------------------
     //News:
     this.MessageLabel1 =
         new InfoLabel(this, this.Father, InfoLabels.MDKSIL);
     this.MessageLabel2      = new LabelControl(this);
     this.PictureBoxControl1 = new PictureBoxControl(this);
     //---------------------------
     this.UnlimitedPointWorks = new Point[]
     {
         new Point(0, 1 * (Width / 12)),                            // 1
         new Point(1 * (Width / 12), 1 * (Width / 12)),             // 2
         new Point(1 * (Width / 12), 0),                            // 3
         new Point(11 * (Width / 12), 0),                           // 4
         new Point(11 * (Width / 12), 1 * (Width / 12)),            // 5
         new Point(Width, 1 * (Width / 12)),                        // 6
         new Point(Width, Height - (1 * (Width / 12))),             // 7
         new Point(11 * (Width / 12), Height - (1 * (Width / 12))), // 8
         new Point(11 * (Width / 12), Height),                      // 9
         new Point(1 * (Width / 12), Height),                       // 10
         new Point(1 * (Width / 12), Height - (1 * (Width / 12))),  // 11
         new Point(0, Height - (1 * (Width / 12))),                 // 12
     };
     //-----------------------------
     //Names:
     this.PictureBoxControl1.SetPictureName(KingdomPreviewPictureBoxNameInRes);
     //TabIndexes:
     this.PictureBoxControl1.CurrentStatus = this.CurrentStatus;
     //FontsAndTextAligns:
     this.MessageLabel2.Font =
         new Font(ThereIsConstants.Forming.TheMainForm.PrivateFonts.Families[1],
                  11, FontStyle.Bold);
     this.MessageLabel2.TextAlign = ContentAlignment.MiddleCenter;
     //Sizes:
     this.MessageLabel2.Size = new Size(UnlimitedPointWorks[4].X -
                                        UnlimitedPointWorks[1].X,
                                        UnlimitedPointWorks[1].Y - UnlimitedPointWorks[2].Y);
     this.PictureBoxControl1.Size = new Size(UnlimitedPointWorks[5].X - UnlimitedPointWorks[0].X,
                                             UnlimitedPointWorks[10].Y - UnlimitedPointWorks[1].Y);
     //Locations:
     this.MessageLabel2.Location =
         new Point(((UnlimitedPointWorks[3].X - UnlimitedPointWorks[2].X) / 2) -
                   (MessageLabel2.Width / 2), UnlimitedPointWorks[2].Y);
     this.PictureBoxControl1.Location = UnlimitedPointWorks[0];
     this.MessageLabel1.Location      =
         new Point((this.Width / 2) - (this.MessageLabel1.Width / 2),
                   UnlimitedPointWorks[10].Y - (2 * this.MessageLabel1.Height));
     //Colors:
     this.SetColorTransparent();
     this.MessageLabel2.SetColorTransparent();
     this.MessageLabel2.ForeColor = Color.GhostWhite;
     //ComboBoxes:
     //Enableds:
     //Texts:
     this.MessageLabel2.SetLabelText("#" + CurrentStatus.ToString() + " ");
     //AddRanges:
     //ToolTipSettings:
     //Images:
     this.PictureBoxControl1.SetPicture();
     this.PictureBoxControl1.SizeMode = PictureBoxSizeMode.StretchImage;
     //Events:
     this.SizeChanged += MapDisplayer_SizeChanged;
     this.Paint       += MapDisplayer_Paint;
     this.MessageLabel1.AddEnterEventToAllChild(MapSigner_MouseEnter);
     this.MessageLabel1.AddLeaveEventToAllChild(MapSigner_MouseLeave);
     //-----------------------------
     this.Controls.AddRange(new Control[]
     {
         this.MessageLabel2,
         this.PictureBoxControl1,
     });
     this.PictureBoxControl1.Controls.Add(this.MessageLabel1);
 }