private void bEditScript_Click(object sender, EventArgs e)
        {
            if (lvModList.SelectedItems.Count != 1)
            {
                return;
            }
            var mod       = (fomod)lvModList.SelectedItems[0].Tag;
            var esfEditor = new EditScriptForm();

            esfEditor.Script = !mod.HasInstallScript
        ? new FomodScript(FomodScriptType.CSharp, Program.GameMode.DefaultCSharpScript)
        : mod.GetInstallScript();
            if (esfEditor.ShowDialog(this) == DialogResult.OK)
            {
                mod.SetScript(esfEditor.Script);
            }
            UpdateModStateText();
        }
Exemple #2
0
 private void bEditScript_Click(object sender, EventArgs e)
 {
     if (lvModList.SelectedItems.Count != 1)
         return;
     fomod mod = (fomod)lvModList.SelectedItems[0].Tag;
     EditScriptForm esfEditor = new EditScriptForm();
     if (!mod.HasInstallScript)
         esfEditor.Script = new FomodScript(FomodScriptType.CSharp, Program.GameMode.DefaultCSharpScript);
     else
         esfEditor.Script = mod.GetInstallScript();
     if (esfEditor.ShowDialog(this) == DialogResult.OK)
         mod.SetScript(esfEditor.Script);
     UpdateModStateText();
 }