private void ClearFormControls(bool _initial) { this.SuspendLayout(); //Profile //Level FormUpdatePlayerLevel(); //Skills foreach (CheckBox temp in ADRbuttonArray) { temp.Checked = false; } foreach (CheckBox temp in SkillButtonArray) { temp.Checked = false; } //User Colors UserColorsList.Clear(); for (int i = 0; i < 8; i++) { UserColorsList.Add(Color.FromArgb(0, 0, 0, 0)); } UpdateUserColorsButtons(); UserColorsList.Clear(); //Company pictureBoxCompanyLogo.Image = null; textBoxUserCompanyCompanyName.Text = ""; textBoxUserCompanyMoneyAccount.Text = ""; comboBoxUserCompanyHQcity.DataSource = null; listBoxVisitedCities.Items.Clear(); listBoxGarages.Items.Clear(); //Truck //Trailer //FreightMarket comboBoxFreightMarketCountries.DataSource = null; comboBoxFreightMarketCompanies.DataSource = null; comboBoxFreightMarketSourceCity.DataSource = null; comboBoxFreightMarketSourceCompany.DataSource = null; comboBoxFreightMarketDestinationCity.DataSource = null; comboBoxFreightMarketDestinationCompany.DataSource = null; comboBoxFreightMarketCargoList.DataSource = null; comboBoxFreightMarketUrgency.DataSource = null; comboBoxFreightMarketTrailerDef.DataSource = null; comboBoxFreightMarketTrailerVariant.DataSource = null; listBoxFreightMarketAddedJobs.Items.Clear(); // this.ResumeLayout(); }
internal void AddUserColor4slot() { Color userColor = Color.FromArgb(0, 0, 0, 0); for (int i = 0; i < 4; i++) { UserColorsList.Add(userColor); } //Scroll panel to the top to properly add buttons panelProfileUserColors.AutoScrollPosition = new Point(0, 0); UpdateUserColorsButtons(); //Return to top position int location = panelProfileUserColors.VerticalScroll.Maximum - panelProfileUserColors.Height; if (location > 0) { panelProfileUserColors.AutoScrollPosition = new Point(0, location); panelProfileUserColors.VerticalScroll.Value = location; } }