コード例 #1
0
        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;
        }
コード例 #2
0
        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)
            }
        }