private void ClearDataButton_Click(object sender, EventArgs e) { if (MessageBox.Show("This will completely reset all settings and data. \n\rSoftware will restart once reset has completed the process.", "Warning!", MessageBoxButtons.YesNo, MessageBoxIcon.Error) == DialogResult.Yes) { mainForm.settings.ResetSettings(); BinarySave.ResetData(""); Application.Restart(); } }
protected override void Definition() { if (!usePersistantDataPath) { path = ValueInput <string>("path", string.Empty); } fileName = ValueInput <string>(nameof(fileName), string.Empty); complete = ControlOutput("complete"); delete = ControlInput("delete", (flow) => { BinarySave.Delete((usePersistantDataPath) ? Application.persistentDataPath + "/data/" + flow.GetValue <string>(fileName) : flow.GetValue <string>(path) + "/" + flow.GetValue <string>(fileName)); return(complete); }); Requirement(fileName, delete); Succession(delete, complete); }
private void MainForm_Load(object sender, EventArgs e) { settings.LoadSettingsData(); ApplySettings(); DMData tmpData = BinarySave.ReadFromBinaryFile(""); if (tmpData != null) { data = tmpData; #pragma warning disable IDE0059 // Unnecessary assignment of a value tmpData = null; #pragma warning restore IDE0059 // Unnecessary assignment of a value data.BuildCollectionHolderList(this); if (CollectionsHolder.Items.Count > 0) { CollectionsHolder.SelectedIndex = CollectionsHolder.Items.Count - 1; } CollectionsHolder_SelectedIndexChanged(null, EventArgs.Empty); } if (CollectionsHolder.Items.Count <= 0) { MessageBox.Show("No collection was found.\n\rYou will need to create one now.\n\r\n\rInitial setup must be finished.", "Initial setup needed!", MessageBoxButtons.OK, MessageBoxIcon.Warning); AddSeasonMethod(false); } VerifyHelpButton.Visible = false; VerifyAllButton.Visible = false; VerifyButton.Visible = false; FixFFMPEG(); }
private void SaveData() { BinarySave.WriteToBinaryFile("", data); }