Ejemplo n.º 1
0
 private void Form1_MouseMove_1(object sender, MouseEventArgs e)
 {
     if (mouseDown)
     {
         if (ActiveForm != null)
         {
             ActiveForm.Location = new Point((ActiveForm.Location.X - lastLocation.X) + e.X, (ActiveForm.Location.Y - lastLocation.Y) + e.Y);
             ActiveForm.Update();
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Do something useful with the Mic Spikes
 /// </summary>
 /// <param name="sample32">A useable mic level value</param>
 void ProcessSample(float sample32)
 {
     if (MicValue_Debug != null)
     {
         if (sample32 > 0.9)
         {
             MicValue_Debug.Text = sample32.ToString();
             ActiveForm.Update();
         }
     }
 }
Ejemplo n.º 3
0
 private void btn_hod_Click(object sender, EventArgs e) // ход
 {
     if (H_all > cf.Max_time)
     {
         MessageBox.Show("Вы слишком много часов выделили на проект, уменьшите количество часов!", "Ошибка");
     }
     else
     {
         cf.Moves--; // Редукция часов которые идут на выполнение проекта
         if (cf.nastroen < 50)
         {
             cf.Time_H = cf.Time_H - (H_all / 4 * 3);
         }
         if (cf.nastroen < 0)
         {
             cf.Time_H = cf.Time_H - (H_all / 2);
         }
         if (cf.nastroen < -75)
         {
             cf.Time_H = cf.Time_H - (H_all / 4 * 1);
         }
         if (cf.nastroen > 50)
         {
             cf.Time_H = cf.Time_H - H_all;
         }
         cf.nastroen--;
         for (Int32 i = H_all; i > 4; i--)
         {
             cf.nastroen--;
         }
         nastr_lb.Text   = Convert.ToString(cf.nastroen);
         data_znach.Text = Convert.ToString(cf.day++); // 1 ход - 1 день
         Indicator1.Text = Convert.ToString(H_all);
         // Рандомный случай------------------------------------------
         rnd_case2 = Convert.ToInt32(rnd_case.Next(0, 31)); // рнд от 1 до 12
         if (rnd_case2 == 4)                                // Гопники
         {
             cf.nastroen = cf.nastroen - 20;
             cf.HP       = cf.HP - 30;
             cf.money    = cf.money - 50;
             MessageBox.Show("По пути домой вас гопнули. -20 к Настроению, -30 к НР, -50$", "Опа!");
         }
         if (rnd_case2 == 2) // Ваша 2D тян бросила вас
         {
             cf.nastroen = cf.nastroen - 40;
             MessageBox.Show("Ваша 2D тян с двача вас бросила. -40 к Настроению", "Плак-плак...");
         }
         if (rnd_case2 == 8)
         {
             cf.money    = cf.money + 100;
             cf.nastroen = cf.nastroen + 10;
             MessageBox.Show("По пути в универ, на остановке 410-ого автобуса, вы нашли 100$! +10 к Настроению, +100$", "Юху!");
         }
         if (rnd_case2 == 20) // Эвент с типом
         {
             Event1 e1 = new Event1();
             e1.Owner = cf;
             e1.Show();
         }
         if (rnd_case2 == 15) // Эвент с бомжом
         {
             Event2 e2 = new Event2();
             e2.Owner = cf;
             e2.Show();
         }
         if (rnd_case2 == 25) // Эвент с дождиком
         {
             Event3 e3 = new Event3();
             e3.Owner = cf;
             e3.Show();
         }
         if (cf.skill_boost_cap != 0) // Останавливет фарм скилов
         {
             cf.skill_boost_cap--;
             cf.Max_time = 0;
         }
         if (cf.skill_boost_cap == 0)
         {
             cf.Max_time = 24;
         }
         // Вызов всех нужных функций
         Game_core(ref cf.Time_H, ref cf.Moves, ref cf.Proj_Name, ref cf.money, ref cf.N_of_Proj_compl, ref cf.Proj_set, ref cf.HP, ref cf.nastroen, ref cf.Nagrada_project, ref cf.BOG, ref cf.Abramovich, ref cf.Gorets, ref cf.OslikSuslik, ref cf.ALG, ref cf.CNS, ref cf.GUI, ref cf.LNG, ref cf.day);
         form_update(cf.N_of_Proj_compl, cf.ALG, cf.LNG, cf.GUI, cf.CNS, cf.nastroen, cf.money, cf.HP, cf.skill_boost_cap, ref alg_label, ref zn_yazika, ref zn_GUI, ref zn_CNS, ref nastr_lb, ref money_znach, ref hp_z, ref proj_comp, ref Pov_navikov_info);
         Proj_parameters(ref textbox_projekti, cf.Proj_Name, cf.Time_H, cf.Moves);
         ActiveForm.Update();
     }
 }