Beispiel #1
0
 private void cmdOK_Click(object sender, EventArgs e)
 {
     mod = new Mod();
     mod.Author = txtAuthor.Text.Trim();
     mod.Description = txtDescription.Text.Trim().Replace("\n", "");
     mod.Installed = true;
     mod.KSPVersion = new VersionMatcher(txtKSPVersion.Text.Trim());
     mod.Name = txtModName.Text.Trim();
     mod.Thread = txtThread.Text.Trim();
     mod.URL = "";
     mod.Version = txtVersion.Text.Trim();
     this.DialogResult = DialogResult.OK;
     Close();
 }
Beispiel #2
0
 public dlgEditMod(Mod mod)
 {
     InitializeComponent();
     this.mod = mod;
 }
 protected bool processCacheNode(XmlNode node)
 {
     switch (node.Name)
     {
         case "repo":
             this.Website = node.Attributes["website"].Value;
             this.LastUpdate = DateTime.Parse(node.Attributes["updated"].Value);
             this.Name = node.Attributes["name"].Value;
             this.Maintainer = node.Attributes["maintainer"].Value;
             this.URL = node.Attributes["url"].Value;
             return true;
         case "mod":
             Mod mod = new Mod(node);
             this.mods.Add(mod.Name, mod);
             return true;
     }
     return false;
 }