//Refresh the form private void TmrTickTick(object sender, EventArgs e) { try { #region PlayerInfo Intro //Catch the Playeramount, call the method with 0 players _pInfor = new PlayerInfo(0); //Create new pInfo and fill it with data (to call it only once) _pInfoPlayer = new List<PlayerInfo>(); //Fill with Data for (var i = 0; i < _pInfor.PlayerAmount; i++) _pInfoPlayer.Add(new PlayerInfo(i)); #endregion #region UnitInfo Intro if (pnlMaphack.Enabled || pnlProduction.Enabled) { //Catch the Unitamount _uInfor = new UnitInfo(0); //Create new uInfo and fill the Data _uInfoUnit = new List<UnitInfo>(); //Fill with Data for (var r = 0; r < _uInfor.TotalUnits; r++) _uInfoUnit.Add(new UnitInfo(r)); } #endregion _pvView = new ProcessView("SC2"); if (!_pvView.ProcessAviable()) Application.Exit(); if (_pvView.ProcessInForeground()) TopMost = true; //Proof for the panels (to safe ressources) if (pnlWorkers.Enabled) pnlWorkers.Invalidate(); if (pnlRessources.Enabled) pnlRessources.Invalidate(); if (pnlIncome.Enabled) pnlIncome.Invalidate(); if (pnlStates.Enabled) pnlStates.Invalidate(); if (pnlMaphack.Enabled) pnlMaphack.Invalidate(); if (pnlAPM.Enabled) pnlAPM.Invalidate(); if (pnlArmy.Enabled) pnlArmy.Invalidate(); if (pnlNotification.Enabled) pnlNotification.Invalidate(); AdjustPanelHeight(); //Adjust the height of the Panels //AutoInject(); //Calls the Autoinject- method //AutoCreepGroup(); } catch { new Exception(); } }