Example #1
0
        private void steamButton_Click(object sender, EventArgs e)
        {
            KeyValue kv = getVal(currAddon.Name, "workshop_link");
            string val = null;
            if (kv != null && kv.HasChildren) {
                val = kv.Children.ElementAt(0).Key;
            }
            if (val != null) {
                Process.Start(val);
                return;
            }

            EnterLinkForm elf = new EnterLinkForm(currAddon.Name, "steam");
            DialogResult res = elf.ShowDialog();
            if (res == DialogResult.Cancel) {
                return;
            }
            string link = elf.Textbox.Text;
            string workshop_id = link.Substring(link.LastIndexOf('=') + 1);
            addKV(currAddon.Name, "workshop_link", link);
            addKV(currAddon.Name, "workshop_id", workshop_id);
            //text_notification("Restart ModKit for changes to take effect.", Color.Goldenrod, 2500);
        }
Example #2
0
        private void gdsButton_Click(object sender, EventArgs e)
        {
            KeyValue kv = getVal(currAddon.Name, "gds_link");
            string val = null;
            if (kv != null && kv.HasChildren) {
                val = kv.Children.ElementAt(0).Key;
            }
            if (val != null) {
                Process.Start(val);
                return;
            }

            EnterLinkForm elf = new EnterLinkForm(currAddon.Name, "gds");
            DialogResult res = elf.ShowDialog();
            if (res == DialogResult.Cancel)
            {
                return;
            }
            string link = elf.Textbox.Text;
            string modID = link.Substring(link.LastIndexOf('=')+1);
            addKV(currAddon.Name, "gds_link", link);
            addKV(currAddon.Name, "gds_modID", modID);
            text_notification("Restart ModKit to see GDS rank.", Color.Goldenrod, 2500);
        }