示例#1
0
 protected virtual bool SpecificAddTo(ListViewItem lvi, bool log, HtmlData htmlData)
 {
     throw new NotImplementedException();
 }
 protected override bool SpecificAddTo(ListViewItem lvi, bool log, HtmlData htmlData)
 {
     if (lvi.SubItems[2].Text.ToLower() == "no role" && lvi.SubItems[3].Text.ToLower() != "minion")
     {
         //  MessageBox.Show(String.Format("Creature {0} has No role, and is not a Minion !", lvi.Text), "Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
         ImportResult.WarningOn.Add(String.Format("{0} : no Role and is not a minion => will be saved as level 0 minion",
                                                  lvi.Text));
     }
     int id = Convert.ToInt32((lvi.Tag as SearchResult).ID);
     HtmlAgilityPack.HtmlDocument doc = htmlData.GetHtmlDocument(id);
     Creature c = Converter.GetMasterPlanObjectFromDoc(doc, ImportResult.WarningOn);
     CurrentLib.Creatures.Add(c);
     return true;
 }