private void BtnAddSkin_Click(object sender, EventArgs e) { AddSkinForm asf = new AddSkinForm(TbxModName.Text); if (asf.ShowDialog() != DialogResult.OK) { return; } LbxSkins.Items.Add(asf.Result); LbxSkins.SelectedIndex = LbxSkins.Items.Count - 1; }
private void BtnChangeSkin_Click(object sender, EventArgs e) { Skin s = LbxSkins.SelectedItem as Skin; if (s != null) { AddSkinForm asf = new AddSkinForm(s); asf.ShowDialog(); LbxSkins.Refresh(); UpdatePreview(s.Colors); LbxSkins.Items[LbxSkins.SelectedIndex] = LbxSkins.Items[LbxSkins.SelectedIndex]; // Why ;-; (Refreshes text) } }