コード例 #1
0
ファイル: Program.cs プロジェクト: Bohis/Simulation_Life
        static void Main()
        {
            Present.ConsoleDebugging ConsoleControl = new Present.ConsoleDebugging();
            ConsoleControl.ClouseWindow();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //Экран загрузки с таймером
            StartScreen TimerPage = new StartScreen();
            DateTime    Time      = DateTime.Now + TimeSpan.FromSeconds(3);

            while (Time > DateTime.Now)
            {
                Application.DoEvents();
            }
            TimerPage.Close();
            TimerPage.Dispose();
            //Меню
            OutFirstForm ForFirtsApp = new OutFirstForm {
                DinamicChoiseBool = false,
                FileNameBrain     = null,
                LearningFactor    = 3,
                NumberBotInt      = 50
            };
            MenuForm FirstApp = new MenuForm(ForFirtsApp);

            Application.Run(FirstApp);
            ForFirtsApp = FirstApp.OUT_DATA;
            FirstApp.Dispose();
            //Главная форма
            MainForm SecondApp = new MainForm(ForFirtsApp, ConsoleControl);

            Application.Run(SecondApp);
            SecondApp.Dispose();
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: Bohis/Simulation_Life
 /// <summary>
 /// Конструктор с полученным параметром начального выбора
 /// </summary>
 /// <param name="PacComponets"></param>
 public MainForm(OutFirstForm PacComponets, Present.ConsoleDebugging ConsoleDebugging)
 {
     this.DoubleBuffered = true;
     InitializeComponent();
     MainBloc          = new WebCenter(PacComponets.FileNameBrain, PacComponets.NumberBotInt, PacComponets.DinamicChoiseBool, PacComponets.LearningFactor);
     DinamicChoiseBool = PacComponets.DinamicChoiseBool;
     FirstBmp          = new Bitmap(Field_One.Width, Field_One.Height);
     SecondBmp         = new Bitmap(Field_Two.Width, Field_Two.Height);
     TherdBmp          = new Bitmap(Field_Therd.Width, Field_Therd.Height);
     LineOne           = Graphics.FromImage(FirstBmp);
     LineTwo           = Graphics.FromImage(SecondBmp);
     LinesTherd        = Graphics.FromImage(TherdBmp);
     BluePen           = new Pen(Color.Blue);
     NetLinesBig();
     NetLinesSmallTwo();
     NetLinesSmallThred();
     GreenBrush = Brushes.Green;
     OldLace    = Brushes.OldLace;
     DrawFieldOne();
     CountFor.Text = "100";
     CountFor.Refresh();
     CountIter.ReadOnly         = true;
     SimplisticStyle            = false;
     HelpMessage.Visible        = false;
     StatistChoiseBool          = false;
     ConsoleBox.CheckedChanged += ConsoleBox_AppearanceChanged;
     Debugging = ConsoleDebugging;
 }