public BMainForm() { InitializeComponent(); PropertiesHandler.CreateDefaultDirectory(); populateBuilds(); }
public EMainForm() { InitializeComponent(); PropertiesHandler.CreateDefaultDirectory(); foreach (ToolStrip item in this.menuStripMain.Items) { item.Visible = false; } this.createBuildsPathLabel(); this.populateBuilds(); }
void Update() { if (existingProperties != null) //Checks if the data has been downloaded { PropertiesHandler.SaveProperties(existingProperties); //Saves the downloaded data } if (existingCards != null) { PropertiesHandler.SaveCards(existingCards); //Saves the downloaded data } if (PropertiesHandler.CheckPropertyExists() && PropertiesHandler.CheckCardExists()) { PlayButton.interactable = true; //Enables the play button enabled = false; //Stops the update loop } }
void Start() { PlayButton.onClick.AddListener(OpenPlayMenu); Debug.Log("User ID: " + UserManager.userID); Debug.Log("Username: " + UserManager.username); if (!PropertiesHandler.CheckPropertyExists()) //Checks if the properties file doesn't exist. { StartCoroutine(GetProperties()); //Downloads the properties json. } else if (!PropertiesHandler.CheckCardExists()) { StartCoroutine(GetCards()); //Downloads the cards json. } else { enabled = false; //Stops the update function. PlayButton.interactable = true; //Enables the play button } }
private void populateOptions() { try { buildOptions = PropertiesHandler.LoadOptions(); } catch (System.Xml.XmlException ex) { Dialogs.ErrorMessage(ex.Message); return; } optionsToControl = new Dictionary <string, UserControl>() { { "General", new GeneralControl(buildOptions) } }; foreach (string option in buildOptions.options) { listViewOptions.Items.Add(option); } }