Exemplo n.º 1
0
        private void OnFormLoad(object sender, EventArgs e)
        {
            lblTitle.Text = $"Editing the gear:\r\n{_variationName}";
            cboGearClasses.DisplayMember = "Value";
            cboGearClasses.ValueMember   = "Key";
            foreach (var item in Gears.GetGearClassDictionary())
            {
                KeyValuePair <string, string> gearClass = new KeyValuePair <string, string>(item.Key, item.Value.gearClassName);
                cboGearClasses.Items.Add(gearClass);
            }

            _parsedVariationName = _variationName.Substring(_variationName.IndexOf('-') + 1).Trim().ToLower();
            cboGearClasses.Text  = _variationName.Split('-')[0].Trim();
        }