public void saveDetailEntry(HeroDetailsEntry DetailEntry)
        {
            try
            {
                using (SQLiteConnection conn = new SQLiteConnection(@"Data Source=" + dbPath + @"\gv.db;Version=3;New=False;Compress=True;"))
                {
                    conn.Open();
                    using (SQLiteCommand cmd = conn.CreateCommand())
                    {
                        string commandText = "insert into Detail (HeroName, Updated, Enemy, TopMessage, BottomMessage, Progress) values (@HeroName, @Updated, @Enemy, @TopMessage, @BottomMessage, @Progress)";
                        cmd.Parameters.AddWithValue("@HeroName", this.Name);
                        cmd.Parameters.AddWithValue("@Updated", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
                        cmd.Parameters.AddWithValue("@Enemy", (DetailEntry.Enemy ?? ""));
                        cmd.Parameters.AddWithValue("@TopMessage", (DetailEntry.TopMessage ?? ""));
                        cmd.Parameters.AddWithValue("@BottomMessage", (DetailEntry.BottomMessage ?? ""));
                        cmd.Parameters.AddWithValue("@Progress", DetailEntry.Progress.ToString());

                        cmd.CommandText = commandText;
                        cmd.CommandType = CommandType.Text;
                        cmd.ExecuteNonQuery();
                    }
                }
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(ex.ToString());
                throw;
            }
        }
        public void saveDetailEntry(HeroDetailsEntry DetailEntry)
        {
            try
            {
                using (SQLiteConnection conn = new SQLiteConnection(@"Data Source=" + dbPath + @"\gv.db;Version=3;New=False;Compress=True;"))
                {
                    conn.Open();
                    using (SQLiteCommand cmd = conn.CreateCommand())
                    {
                        string commandText = "insert into Detail (HeroName, Updated, Enemy, TopMessage, BottomMessage, Progress) values (@HeroName, @Updated, @Enemy, @TopMessage, @BottomMessage, @Progress)";
                        cmd.Parameters.AddWithValue("@HeroName", this.Name);
                        cmd.Parameters.AddWithValue("@Updated", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
                        cmd.Parameters.AddWithValue("@Enemy", (DetailEntry.Enemy ?? ""));
                        cmd.Parameters.AddWithValue("@TopMessage", (DetailEntry.TopMessage ?? ""));
                        cmd.Parameters.AddWithValue("@BottomMessage", (DetailEntry.BottomMessage ?? ""));
                        cmd.Parameters.AddWithValue("@Progress", DetailEntry.Progress.ToString());

                        cmd.CommandText = commandText;
                        cmd.CommandType = CommandType.Text;
                        cmd.ExecuteNonQuery();
                    }
                }

            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(ex.ToString());
                throw;
            }
        }
        private bool earthlyNews()
        {
            // Parse the rotating Earthly News section
            try
            {
                HtmlElement elem = webBrowser1.Document.GetElementById("news");
                if (elem != null)
                {
                    if (elem.Children.Count > 1)
                    {
                        bool itemAdded = false;
                        HtmlElementCollection items = elem.Children[1].Children[0].Children;

                        HeroDetailsEntry details = new HeroDetailsEntry();
                        details.TopMessage = items[0].Children[0].InnerText;
                        details.Enemy = items[0].Children[1].InnerText;
                        string progress = items[0].Children[2].Title().Replace("%", "").Replace("NaN", "0");
                        details.Progress = int.Parse(progress);
                        details.BottomMessage = items[1].InnerText;

                        progress = items[2].Title().Replace("%", "").Replace("NaN", "0");
                        details.Progress2 = int.Parse(progress);
                        itemAdded = true;

                        if (itemAdded)
                        {
                            if (!hero.DetailsEntries.Contains(details))
                            {
                                hero.DetailsEntries.Add(details);
                                hero.saveDetailEntry(details);
                            }
                        }

                        if (hero.DetailsEntries.Count > 0)
                            tbxNews.Text = String.Format("{0}\r\n{1}",
                                String.IsNullOrEmpty(hero.DetailsEntries[hero.DetailsEntries.Count - 1].Enemy) ?
                                    hero.DetailsEntries[hero.DetailsEntries.Count - 1].TopMessage :
                                    hero.DetailsEntries[hero.DetailsEntries.Count - 1].Enemy,
                                hero.DetailsEntries[hero.DetailsEntries.Count - 1].BottomMessage);
                    }
                }
                return true;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                throw;
            }
        }