Beispiel #1
0
        private void btnSelect_Click(object sender, EventArgs e)
        {
            SaveLoad load = new SaveLoad();

            List <string> savedData = load.LoadThis(cmbFarms.SelectedText, farmerWorkingWith);

            Farm farmToSend = new Farm(savedData[0], int.Parse(savedData[1]));

            DisplayFarm theForm = new DisplayFarm(farmToSend, farmerWorkingWith);

            theForm.Width  = farmToSend.Size + 17;
            theForm.Height = farmToSend.Size + 40;
            theForm.Show();
            theForm.Activate();
        }
Beispiel #2
0
        private void btnSelect_Click(object sender, EventArgs e)
        {
            SaveLoad load = new SaveLoad();

            List <string> savedData = load.LoadThis(cmbFarms.Text, farmerWorkingWith);

            Farm farmToSend = new Farm(savedData[0], int.Parse(savedData[1]));

            DisplayFarm theForm = new DisplayFarm(farmToSend, farmerWorkingWith);

            theForm.FormBorderStyle = FormBorderStyle.FixedSingle;
            theForm.MaximizeBox     = false;
            theForm.Width           = farmToSend.Size + 17;
            theForm.Height          = farmToSend.Size + 40;
            theForm.Show();
            theForm.Paint();
            //theForm.Activate();
        }