private Boolean _WallHasBeenAdded; // Boolean which indicates if a wall has spawn or not. #endregion Fields #region Constructors /* * Constructor of the Game: * - Initialize some objects for the game / variables / label. * */ public Game() { InitializeComponent(); InitializeFont(); _Time = new SystemTime(); _Render = new Render(this.gameBoardPictureBox, this.miniGameBoardPictureBox); _CommandDispatcherDel = new processOnMainThread(NetworkProcessOnMainThread); _PlayGameDel = new processOnMainThread(PlayGame); _EndGameDel = new processOnMainThread2(EndGame); _Nickname = ""; _Multiplayer = false; _InGame = false; timeLabel.Text = _Time.Get_Time(); LoadMenu(); }
private KryptonForm _WaitScreenForm; // Form hosting the WaitingScreen UC. #endregion Fields #region Constructors public Main() { InitializeComponent(); _FileBrowser = new FileBrowser(InitializePath()); if (Directory.Exists(Properties.Settings.Default.local_path)) _LocalFileBrowser = new FileBrowser(Properties.Settings.Default.local_path); else _LocalFileBrowser = new FileBrowser(@"D:\\"); _ClearProgressBarDel = new ProcessOnMainThread6(ClearAllProgressBars); _Navigator = new Navigator(ProcessHelperButton, _ClearProgressBarDel); _SpecificCountries = new SpecificCountries(); _SpecificTools = new SpecificTools(); _Session = new Authentication("user"); _Session.CheckSavedPUC(System.Environment.MachineName); _Administration = new Administration(); _Settings = new Settings(); _Chronicles = new History(); _ConfigSummary = new ConfigSummary(); _FtpManager = new FTPManager.FTPManager(); _Batch = new BatchUC(_FtpManager.Get_RegionsList()); LoadBatchs(); // Load batch objects from saved instance. _Batch.LoadBatchs(); // Load them graphically (rows in DGV). _WaitingScreen = new WaitingScreen(); InitializeInterface(); _ConfigsList = new List<Config>(); _InputFiles = new List<String>(); _PoolThreads = new List<Thread>(); _LaunchersList = new List<Launcher>(); _ProgressBarsList = new List<ProgressBar>(); _LogsList = new List<Log>(); _IsCopy = false; _SourcePath = null; _TargetPath = null; _PreviousNodeName = null; _LogsPath = null; _UpdateProgressBarDel = new processOnMainThread(UpdateProgressBar); _UpdateRichTextBoxDel = new processOnMainThread2(UpdateRichTextBox); _AddLogsGridViewDel = new processOnMainThread3(AddLogsGridView); _DisplayConfigProcessTimeDel = new ProcessOnMainThread4(DisplayConfigProcessTime); _AbortThreadDel = new ProcessOnMainThread5(AbortThread); _FTPWorker = new BackgroundWorker(); _FTPWorker.WorkerReportsProgress = true; _FTPWorker.WorkerSupportsCancellation = true; _FTPWorker.DoWork += _FTPWorker_DoWork; _FTPWorker.RunWorkerCompleted += _FTPWorker_RunWorkerCompleted; _FTPWorker.ProgressChanged += _FTPWorker_ProgressChanged; _FtpDLCounter = 1; _BatchTargetPathsTmp = new List<string>(); _RegionsToDownload = new List<FTPManager.Region>(); _LaunchedBatchType = String.Empty; _LaunchedBatch = new Batch(); }