public SekiroForm() { InitializeComponent(); // One-time initialization for errors and things if (!MiscSetup.CheckRequiredSekiroFiles(out string req)) { SetError(req, true); } else { SetWarning(); } SetStatus(null); presetL.Text = ""; enemyseed.GotFocus += enemyseed_TextChanged; enemyseed.LostFocus += enemyseed_TextChanged; // The rest of initialization RandomizerOptions initialOpts = new RandomizerOptions(true); SetControlFlags(this, initialOpts); defaultOpts = initialOpts.FullString(); string existingOpts = Settings.Default.Options; if (string.IsNullOrWhiteSpace(existingOpts)) { options.Difficulty = difficulty.Value; SetControlFlags(this); // Seed and checkboxes will be updated in UpdateEnabled } else { SetOptionsString(existingOpts); if (options.Seed != 0) { defaultReroll.Enabled = true; defaultReroll.Checked = false; } // Enemy seed and checkboxes will be updated in UpdateEnabled } SetStatus(null); UpdateEnabled(); UpdateLabels(); void parentImage(PictureBox child) { child.Location = new Point(child.Location.X - title.Location.X, child.Location.Y - title.Location.Y); child.Parent = title; } parentImage(mascot); parentImage(itemPic); parentImage(catPic); RefreshImage(); }
public MainForm() { InitializeComponent(); initialColor = BackColor; if (!MiscSetup.CheckRequiredDS3Files(out string req)) { SetError(req, true); } else { SetWarning(); } SetStatus(null); // The rest of initialization RandomizerOptions initialOpts = new RandomizerOptions(false); SetControlFlags(this, initialOpts); defaultOpts = initialOpts.FullString(); string existingOpts = Settings.Default.Options; if (string.IsNullOrWhiteSpace(existingOpts)) { options.Difficulty = difficulty.Value; SetControlFlags(this); } else { SetOptionsString(existingOpts); if (options.Seed != 0) { defaultReroll.Enabled = true; defaultReroll.Checked = false; } } SetStatus(null); UpdateEnabled(); UpdateLabels(); }
private void SaveOptions() { Settings.Default.Options = options.FullString(); Settings.Default.Save(); }