Exemplo n.º 1
0
        private void Game_Load(object sender, EventArgs e)
        {
            if (Properties.Settings.Default.silder_trasparenza == false)
            {
                track_trasparenza.Visible = false;
            }
            if (Owner.Text == "Create")
            {
                Create create = (Create)this.Owner;
                Path = create.pathOrIP;
                dim  = create.trackBar1.Value;
                host = true;
            }
            else
            {
                Join join = (Join)this.Owner;
                Path         = join.IP;
                dim          = join.dim;
                opponentname = join.opponentName;
                host         = false;
                File.Delete(@"\Users\Public\Videos\host_gamedata.BS");
                File.Delete(@"\Users\Public\Videos\client_gamedata.BS");
            }

            Path                 += @"\Users\Public\Videos\";
            FileColpoHost         = Path + "host_colpo.BS";
            FileColpoClient       = Path + "client_colpo.BS";
            player                = new Bitmap(Properties.Resources.board2);
            playerBox.BackColor   = Properties.Settings.Default.color4;
            opponentBox.BackColor = Properties.Settings.Default.color4;
            playerBox.Height      = (dim + 1) * 32;
            playerBox.Width       = (dim + 1) * 32;
            opponentBox.Height    = (dim + 1) * 32;
            opponentBox.Width     = (dim + 1) * 32;
            opponent              = new Bitmap(player);

            playerBox.Image   = player;
            opponentBox.Image = opponent;

            playertemp   = new Bitmap(player);
            opponenttemp = new Bitmap(opponent);
        }