public void addConfigClick() { if (Category.SelectedIndex == 2) { configStatus = tempConfigs.SetFractionsConfig(); if (configStatus == null || tempConfigs.fractions.Count != mapObjects.castles.imagesList.Count + bitmap.Width / bitmap.Height) { configAdded = false; } else { configAdded = true; } } else { configStatus = tempConfigs.SetRuinsConfig(); if (configStatus == null || tempConfigs.ruinsData.Count != mapObjects.ruins.Count + 1 || tempConfigs.ruinsData[tempConfigs.ruinsData.Count - 1].sprites.Count != bitmap.Width / bitmap.Height) { configAdded = false; } else { SetName.Text = tempConfigs.ruinsData[tempConfigs.ruinsData.Count - 1].name; configAdded = true; } } if (!configAdded) { configStatus = "Error, please retry"; } }
public void changeConfigs() { configs.SetFractionsConfig(); configs.SetRuinsConfig(); }