private Widget WgtFormat(Widget rc) { formatComboBox = new SimpleOptionMenu(); var format = new List <string>(); int i = 0; int v = 0; foreach (SeedTable.SeedYamlFormat f in Enum.GetValues(typeof(SeedTable.SeedYamlFormat))) { format.Add(f.ToString()); if (Options.format == f) { v = i; } i++; } formatComboBox.ButtonSet = v; formatComboBox.ButtonCount = format.Count; formatComboBox.Buttons = format.ToArray(); formatComboBox.SimpleEvent += (x, y) => { Options.format = (SeedTable.SeedYamlFormat)y.SelectedIndex; }; return(formatComboBox); }
private Widget WgtEngine(Widget rc) { engineComboBox = new SimpleOptionMenu(); var engine = new List <string>(); int i = 0; int v = 0; foreach (SeedTable.CommonOptions.Engine e in Enum.GetValues(typeof(SeedTable.CommonOptions.Engine))) { engine.Add(e.ToString()); if (Options.engine == e) { v = i; } i++; } engineComboBox.ButtonSet = v; engineComboBox.ButtonCount = engine.Count; engineComboBox.Buttons = engine.ToArray(); engineComboBox.SimpleEvent += (x, y) => { Options.engine = (SeedTable.CommonOptions.Engine)y.SelectedIndex; }; return(engineComboBox); }