public MainWindow() { WindowContext.Window = this; JsonHandler.DeserializeRecipes(); PriceStorage.LoadAll(); FavoriteStorage.LoadAll(); InitializeComponent(); _context = DataContext as WindowContext; }
public static void AddPrice(Item item, int value) { if (value >= 0) { var p = new Price(value, DateTime.Now); item.AddPrice(p); PriceStorage.Save(p); } Queue.Remove(item); }
private void SetMainStorages() { upload = new UploadStorage(ref connection, ref locker); category = new CategoryStorage(ref connection, ref locker); price = new PriceStorage(ref connection, ref locker); product = new ProductStorage(ref connection, ref locker); log = new LogStorage(ref connection, ref locker); storages.Add(log); storages.Add(product); storages.Add(upload); storages.Add(price); storages.Add(category); CheckTableExists(files_Create); }