Ejemplo n.º 1
0
 private void PriceProduct(string buy)
 {
     label44.Text = Calculation.Price(Convert.ToUInt16(buy), Convert.ToUInt16(label17.Text), Village.GetMoney());
 }
Ejemplo n.º 2
0
        public ChoseKonung()
        {
            InitializeComponent();
            ToolTip t = new ToolTip();

            for (byte i = 0; i < 3; i++)
            {
                arrHealthKonung[i]     = Convert.ToByte(rnd.Next(4, 9));
                arrVillageManagment[i] = Convert.ToByte(rnd.Next(4, 9));
                arrReligionKonung[i]   = Convert.ToByte(rnd.Next(0, 1));
                arrRepressionKonung[i] = Convert.ToByte(rnd.Next(4, 9));
            }
            t.SetToolTip(pictureBox1, "Здоровье конунга: " + arrHealthKonung[0].ToString() + "\n Управленчиские навыки: " + arrVillageManagment[0].ToString() + "\n Уровень репрессии: " + arrRepressionKonung[0].ToString() + "\n Религия: " + Calculation.ReligionChoose(arrReligionKonung[0]));
            t.SetToolTip(pictureBox2, "Здоровье конунга: " + arrHealthKonung[1].ToString() + "\n Управленчиские навыки: " + arrVillageManagment[1].ToString() + "\n Уровень репрессии: " + arrRepressionKonung[1].ToString() + "\n Религия: " + Calculation.ReligionChoose(arrReligionKonung[1]));
            t.SetToolTip(pictureBox3, "Здоровье конунга: " + arrHealthKonung[2].ToString() + "\n Управленчиские навыки: " + arrVillageManagment[2].ToString() + "\n Уровень репрессии: " + arrRepressionKonung[2].ToString() + "\n Религия: " + Calculation.ReligionChoose(arrReligionKonung[2]));
            using (StreamReader sr = new StreamReader("NameKonung.txt", System.Text.Encoding.Default))
            {
                var list = new List <string>();
                while (!sr.EndOfStream)
                {
                    string line = sr.ReadLine();
                    list.Add(line);
                }
                var    arrTheoria = list.ToArray();
                Random rnd        = new Random();
                byte   value      = Convert.ToByte(rnd.Next(0, 94));
                byte   value1     = Convert.ToByte(rnd.Next(0, 94));
                byte   value2     = Convert.ToByte(rnd.Next(0, 94));
                label1.Text = arrTheoria[value];
                label2.Text = arrTheoria[value1];
                label3.Text = arrTheoria[value2];
            }

            using (StreamReader sr = new StreamReader("NameSecondKonung.txt", System.Text.Encoding.Default))
            {
                var list = new List <string>();
                while (!sr.EndOfStream)
                {
                    string line = sr.ReadLine();
                    list.Add(line);
                }
                var    arrTheoria = list.ToArray();
                Random rnd        = new Random();
                byte   value      = Convert.ToByte(rnd.Next(0, 94));
                byte   value1     = Convert.ToByte(rnd.Next(0, 94));
                byte   value2     = Convert.ToByte(rnd.Next(0, 94));
                label1.Text += "\n";
                label2.Text += "\n";
                label3.Text += "\n";
                label1.Text += arrTheoria[value];
                label2.Text += arrTheoria[value1];
                label3.Text += arrTheoria[value2];
            }
        }
Ejemplo n.º 3
0
 private void PriceProduct()
 {
     label43.Text = Calculation.Price(Convert.ToUInt16(label16.Text), Convert.ToUInt16(label17.Text), Convert.ToUInt16(label18.Text), Village.GetMoney());
 }
Ejemplo n.º 4
0
 private void pictureBox6_Click(object sender, EventArgs e)
 {
     Village.SetCoef(Calculation.CoeffCalcul(Convert.ToSByte(label42.Text)));
     ShowMarket();
 }