Пример #1
0
        private void RBClick(object sender, EventArgs e)
        {
            RadioButton rb = (RadioButton)sender;

            gtype = (GameTypeEnum.GameType)Int32.Parse(rb.Name.Substring(rb.Name.Length - 1, 1));
            if (gtype == GameTypeEnum.GameType.PvAIX)
            {
                SetVisibility();
                pnlPvAI.Visible = true;
            }
            else if (gtype == GameTypeEnum.GameType.Client)
            {
                SetVisibility();
                pnlIpAddress.Visible = true;
            }
            else if (gtype == GameTypeEnum.GameType.PvP)
            {
                SetVisibility();
                cboxTimed.Visible = true;
            }
            else
            {
                SetVisibility();
            }
            //MessageBox.Show(""+gtype); enum string'i
        }
Пример #2
0
 public PvP(GameTypeEnum.GameType gtype)
 {
     InitializeComponent();
     this.gtype         = gtype;
     this.Width         = 468;
     this.Height        = 750;
     this.StartPosition = FormStartPosition.Manual;
     this.Left          = 200;
     this.Top           = 10;
     BuildGameField();
 }
Пример #3
0
 private void rbX_Click(object sender, EventArgs e)
 {
     gtype = GameTypeEnum.GameType.PvAIX;
 }
Пример #4
0
 private void cboxTimed_Click(object sender, EventArgs e)
 {
     gtype = cboxTimed.Checked? GameTypeEnum.GameType.PvPTimed:GameTypeEnum.GameType.PvP;
 }