コード例 #1
0
            private void InitializeGeneralComponent()
            {
                this.Size =
                    new Size((this.ChatBackground.Width -
                              (2 * NoInternetConnectionSandBox.from_the_edge)) / 2,
                             (this.ChatBackground.Width / 10));
                this.GoldenIcon = GameIcon.GenerateFakeIcon(FakeIcons.s_golden_btn_chat);
                //this.ImageAlign = ContentAlignment.MiddleCenter;
                //---------------------------------------------
                //---------------------------------------------
                //News:
                this.UnlimitedPointWorks = new Point[]
                {
                    new Point(0, 0),          // 1
                    new Point(Width, 0),      // 2
                    new Point(Width, Height), // 3
                    new Point(0, Height),     // 4
                };
                this.PaintColors = new Color[]
                {
                    Color.Transparent,
                };
                this.PaintBrushes = new Brush[]
                {
                    new SolidBrush(this.PaintColors[0]),
                };
                //---------------------------------------------
                //Names:
                this.SetLabelName(Channel.ToString());
                //TabIndexes
                //FontAndTextAligns:
                this.Font =
                    new Font(ThereIsConstants.Forming.TheMainForm.PrivateFonts.Families[1],
                             13.4f, FontStyle.Bold);
                this.TextAlign = ContentAlignment.MiddleCenter;
                //Sizes:


                //Locations:


                //Colors:
                this.SetColorTransparent();
                this.SetTextColor(Color.Black);
                this.SetLabelText();
                this.SetLabelSoundEffects(Noises.ClickNoise);
                //ComboBoxes:
                //Enableds:
                //Texts:
                //AddRanges:
                //ToolTipSettings:
                //GraphicWorks:
                //Effects:
                //---------------------------------------------
                //Events:
                //---------------------------------------------

                //---------------------------------------------
                //Final Blows:
            }
コード例 #2
0
            //---------------------------------------------
            #region Initialize Region
            private void InitializeComponent()
            {
                this.Size = new Size(this.BackLabel.Width,
                                     this.BackLabel.Height / 12);
                this.Location =
                    new Point(0, this.BackLabel.Height - this.Height);
                //---------------------------------------------
                //---------------------------------------------
                //News:
                this.EmojiIconLabel = new IconLabelControl(this,
                                                           GameIcon.GenerateIcon(Main_Icons.s_main_chat_emoji));
                this.ChatBoxControl   = new TextBoxControl();
                this.SendLabelControl = new IconLabelControl(this,
                                                             GameIcon.GenerateFakeIcon(FakeIcons.s_chat_send_fake));
                //---------------------------------------------
                //Names:
                //TabIndexes
                //FontAndTextAligns:
                this.ChatBoxControl.Font =
                    new Font(this.ChatBoxControl.Font.FontFamily,
                             13f, FontStyle.Regular);
                //Sizes:
                this.ChatBoxControl.Size =
                    new Size((3 * (this.Width / 4)) -
                             (NoInternetConnectionSandBox.from_the_edge / 2),
                             this.ChatBoxControl.Height);
                this.EmojiIconLabel.SetIconSize();
                this.EmojiIconLabel.Size =
                    Size.Round(this.EmojiIconLabel.IconSizeF);
                this.SendLabelControl.Size =
                    new Size(3 * (this.Height / 5),
                             3 * (this.Height / 5));
                this.SendLabelControl.SetIconSize(this.SendLabelControl.Size);
                //Locations:
                this.ChatBoxControl.Location =
                    new Point(NoInternetConnectionSandBox.from_the_edge / 2,
                              (this.Height / 2) -
                              (this.ChatBoxControl.Height / 2));
                this.EmojiIconLabel.SetIconLocation();
                this.EmojiIconLabel.Location =
                    new Point(this.ChatBoxControl.Location.X +
                              this.ChatBoxControl.Width +
                              NoInternetConnectionSandBox.from_the_edge,
                              (this.Height / 2) - (this.EmojiIconLabel.Height / 2));
                this.SendLabelControl.SetIconLocation();
                this.SendLabelControl.Location =
                    new Point(this.EmojiIconLabel.Location.X +
                              this.EmojiIconLabel.Width +
                              (NoInternetConnectionSandBox.from_the_edge / 2),
                              (this.Height / 2) -
                              (this.SendLabelControl.Height / 2));
                //Colors:
                this.BackColor = Color.WhiteSmoke;
                //ComboBoxes:
                //Enableds:
                this.ChatBoxControl.AcceptsReturn = false;
                //Texts:
                //AddRanges:
                //ToolTipSettings:
                //GraphicWorks:
                //Effects:
                //---------------------------------------------
                //Events:

                //---------------------------------------------
                this.Controls.Add(this.ChatBoxControl);
                this.Controls.AddRange(new LabelControl[]
                {
                    this.EmojiIconLabel,
                    this.SendLabelControl
                });
                //---------------------------------------------
                //Final Blows:
            }
コード例 #3
0
            //---------------------------------------------
            //---------------------------------------------
            //---------------------------------------------
            #region Initialize Region
            private void InitializeComponent()
            {
                this.SuspendLayout();
                //-----------------------------------------
                //News:
                this.Profile_NavIcon      = GameIcon.GenerateIcon(Main_Icons.s_main_role_bg);
                this.Profile_NavIconLabel = new IconLabelControl(this, this.Profile_NavIcon);
                this.AvatarIconLabel      = new IconLabelControl(this,
                                                                 GameIcon.GenerateIcon(ThereIsServer.GameObjects.MyProfile.PlayerAvatar,
                                                                                       AvatarFormat.Format02));
                this.ExpTrackIconLabel = new IconLabelControl(this,
                                                              GameIcon.GenerateIcon(Main_Icons.s_main_exp_track));
                this.ExpThumbIconLabel = new IconLabelControl(this,
                                                              GameIcon.GenerateIcon(Main_Icons.s_main_exp_thumb));
                this.TimeIconLabel = new IconLabelControl(this,
                                                          GameIcon.GenerateFakeIcon(FakeIcons.s_time_icon_fake));
                this.DiamondResIconLabel = new PlayerResourcesLabelControl(this,
                                                                           PlayerResourceType.Diamond);
                this.CouponResIconLabel = new PlayerResourcesLabelControl(this,
                                                                          PlayerResourceType.Coupon);
                this.CoinResIconLabel = new PlayerResourcesLabelControl(this,
                                                                        PlayerResourceType.Coin);
                this.ManaResIconLabel = new PlayerResourcesLabelControl(this,
                                                                        PlayerResourceType.Mana);


                this.PlayerNameLabelControl = new LabelControl(this);
                this.PlayerLvlLabelControl  = new LabelControl(this);
                this.GameTimeTrigger        = new Trigger()
                {
                    Index            = 0,
                    Enabled          = false,
                    Running_Worker   = false,
                    SingleLineWorker = true,
                    Interval         = 1000,
                    Name             = GameTimeTriggerName,
                };
                //-----------------------------------------
                //Names:
                //TabIndexes:
                //FontAndTextAligns:
                this.PlayerNameLabelControl.Font = this.TimeIconLabel.Font =
                    new Font(ThereIsConstants.Forming.TheMainForm.PrivateFonts.Families[1],
                             15, FontStyle.Bold);
                this.PlayerLvlLabelControl.Font =
                    new Font(ThereIsConstants.Forming.TheMainForm.PrivateFonts.Families[1],
                             11, FontStyle.Bold);
                this.ExpThumbIconLabel.Font =
                    new Font(ThereIsConstants.Forming.TheMainForm.PrivateFonts.Families[1],
                             12, FontStyle.Bold);
                this.PlayerNameLabelControl.TextAlign = ContentAlignment.MiddleLeft;
                this.PlayerLvlLabelControl.TextAlign  = ContentAlignment.BottomCenter;
                this.ExpThumbIconLabel.TextAlign      = ContentAlignment.TopRight;
                this.TimeIconLabel.TextAlign          = ContentAlignment.MiddleCenter;
                this.TimeIconLabel.Image =
                    Image.FromFile(ThereIsConstants.Path.Datas_Path +
                                   ThereIsConstants.Path.DoubleSlash +
                                   this.MyRes.GetString(GameTimerBGNameInRes));
                //Sizes:
                Size roundedSize = Size.Round(Profile_NavIconLabel.IconSizeF); // rounded size of nav Icon.

                this.Profile_NavIconLabel.SetIconSize();
                this.ExpTrackIconLabel.SetIconSize();
                this.TimeIconLabel.SetIconSize();

                this.AvatarIconLabel.SetIconSize(Profile_NavIconLabel.IconSizeF.Height -
                                                 (2 * (NoInternetConnectionSandBox.from_the_edge / 5)),
                                                 Profile_NavIconLabel.IconSizeF.Height -
                                                 (2 * (NoInternetConnectionSandBox.from_the_edge / 5)));
                this.Size = this.Profile_NavIconLabel.Size =
                    new Size(roundedSize.Width + NoInternetConnectionSandBox.from_the_edge,
                             roundedSize.Height + NoInternetConnectionSandBox.from_the_edge);
                this.AvatarIconLabel.Size =
                    new Size(Profile_NavIconLabel.Height -
                             NoInternetConnectionSandBox.from_the_edge,
                             Profile_NavIconLabel.Height);
                this.PlayerNameLabelControl.Size =
                    new Size(roundedSize.Width - roundedSize.Height,
                             (10 * (roundedSize.Height / 16)));
                this.PlayerLvlLabelControl.Size =
                    new Size((12 * (roundedSize.Height / 16)),
                             (6 * (roundedSize.Height / 16)));
                this.ExpTrackIconLabel.Size =
                    new Size(roundedSize.Width - PlayerLvlLabelControl.Width,
                             PlayerLvlLabelControl.Height);
                float test = (float)ThereIsServer.GameObjects.MyProfile.GetAdvancingExp();

                this.ExpThumbIconLabel.TheIcon.FixOriginalIcon(new RectangleF(0, 0,
                                                                              (((float)ThereIsServer.GameObjects.MyProfile.GetAdvancingExp()) *
                                                                               ExpTrackIconLabel.IconSizeF.Width),
                                                                              ExpThumbIconLabel.TheIcon.OriginalImage.Height));
                this.ExpThumbIconLabel.SetIconSize();
                this.ExpThumbIconLabel.Size = ExpTrackIconLabel.Size;



                this.TimeIconLabel.Size = this.TimeIconLabel.TheIcon.OriginalImage.Size;
                //Locations:
                this.Profile_NavIconLabel.SetIconLocation(NoInternetConnectionSandBox.from_the_edge,
                                                          NoInternetConnectionSandBox.from_the_edge);
                this.AvatarIconLabel.SetIconLocation(default);