Example #1
0
        public NewUNODlg()
        {
            InitializeComponent();

            textBox            = new TextBox();
            textBox.Font       = new Font("Times New Roman", 18f);
            textBox.Location   = new Point(0, 0);
            textBox.Size       = new Size(this.ClientRectangle.Width / 2, playerH);
            textBox.Visible    = false;
            textBox.TextAlign  = HorizontalAlignment.Center;
            textBox.KeyUp     += new KeyEventHandler(textBox_KeyUp);
            textBox.LostFocus += new EventHandler(textBox_LostFocus);
            this.Controls.Add(textBox);

            this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
            sf.Alignment     = StringAlignment.Center;
            sf.LineAlignment = StringAlignment.Center;

            for (int i = 0; i < maxPlayers; i++)
            {
                playerPosData[i] =
                    new UNOMenu2ColumnsItem(string.Format("Игрок №{0}:", i + 1), "Player" + (i + 1).ToString(), new Rectangle(0, numY + numH1 + numH2 + playerH * i, this.ClientRectangle.Width, playerH), Color.Blue);
            }

            buttonOk = new UNOMenuItem("Ok", new Rectangle(this.ClientRectangle.Width / 2 - 40, this.ClientRectangle.Height - 40, 80, 40), Color.Blue);

            labBMP = Properties.Resources.New_Game;
            labBMP.MakeTransparent();
        }
Example #2
0
        public GameTittlesDlg()
        {
            InitializeComponent();

            stageName = new UNOMenu2ColumnsItem("Название этапа:", "Новый UNO-этап", new Rectangle(0, spaceH, this.ClientRectangle.Width, nameH), Color.Blue);
            stageDate = new UNOMenu2ColumnsItem("Дата:", GetDateString(DateTime.Now), new Rectangle(0, spaceH + nameH, this.ClientRectangle.Width, dateH), Color.Blue);

            textBox            = new TextBox();
            textBox.Font       = new Font("Times New Roman", 16f);
            textBox.Location   = stageName.ValueRectArea.Location;
            textBox.Size       = stageName.ValueRectArea.Size;
            textBox.Visible    = false;
            textBox.TextAlign  = HorizontalAlignment.Center;
            textBox.KeyUp     += new KeyEventHandler(textBox_KeyUp);
            textBox.LostFocus += new EventHandler(textBox_LostFocus);
            this.Controls.Add(textBox);

            sf.Alignment     = StringAlignment.Center;
            sf.LineAlignment = StringAlignment.Center;

            buttonOk = new UNOMenuItem("Ok", new Rectangle(this.ClientRectangle.Width / 2 - 40, this.ClientRectangle.Height - 40, 80, 40), Color.Blue);

            labBMP = Properties.Resources.New_Stage;
            labBMP.MakeTransparent(Color.White);
        }