public EncyclopediaDB()
        {
            string currentDirectory = AppDomain.CurrentDomain.BaseDirectory;

            afwDC            = new AllForWakfuDBDataContext(string.Format(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename={0}Database\AllForWakfuDB.mdf;Integrated Security=True;Connect Timeout=30", currentDirectory));
            NbItemsDisplayed = ITEMS_TO_LOAD;
        }
        private void AddStatItems(int idItem, int idStats, int value)
        {
            Items_Have_Stats statsItem = new Items_Have_Stats {
                IdItem  = idItem,
                IdStats = idStats,
                value   = value
            };

            AfwDC.Items_Have_Stats.InsertOnSubmit(statsItem);
            try {
                AfwDC.SubmitChanges();
            } catch (Exception e) {
                Console.WriteLine(String.Format("Impossible d'ajouter la stat {0} de valeur {1} pour l'item {2}. Erreur : {3}", idStats, value, idItem, e.Message));
                AfwDC = new AllForWakfuDBDataContext();
            }
        }
 public EncyclopediaUpdater(MainWindow frm)
 {
     AfwDC = new AllForWakfuDBDataContext();
     Start = DateTime.Now;
     Frm   = frm;
 }