void bEditMutatorSettings_Click(object sender, EventArgs e) { var md = new ModuleSettingsDisplay<IMutator>(State.Mutator); if (md.ShowDialog() == DialogResult.OK) { State.Mutator = md.Module; State.HasChangedSinceSave = true; } }
void bProjectOptions_Click(object sender, EventArgs e) { if (State == null) return; var md = new ModuleSettingsDisplay<ProjectOptions>(State.ProjectOptions); if (md.ShowDialog() != DialogResult.OK) { return; } State.HasChangedSinceSave = true; bool oldStopped = stopped; if (!oldStopped) Stop(); bool updateEvaluator = (State.ProjectOptions.Matte != md.Module.Matte && oldStopped); State.ProjectOptions = md.Module; BackColor = State.ProjectOptions.BackColor; if (BackColor.R*0.2126 + BackColor.G*0.7152 + BackColor.B*0.0722 > 128) { panel1.ForeColor = Color.Black; } else { panel1.ForeColor = Color.White; } if (State.OriginalImage != null) { SetImage(State.OriginalImage); } if (updateEvaluator) { State.SetEvaluator(State.Evaluator); } picBestMatch.Invalidate(); graphWindow1.Invalidate(); if (!oldStopped) Start(false); }
void bEditEvaluatorSettings_Click(object sender, EventArgs e) { var md = new ModuleSettingsDisplay<IEvaluator>(State.Evaluator); if (md.ShowDialog() == DialogResult.OK) { State.SetEvaluator(md.Module); graphWindow1.Invalidate(); State.HasChangedSinceSave = true; } }