public InterfaceManager(MainWindow window, MotherboardData motherboardWindow, DataManager dataManager) { _window = window; _motherboardWindow = motherboardWindow; _dataManager = dataManager; IsRunning = false; _config = dataManager.Config; }
/// <summary> /// Generates a random Motherboard item. /// </summary> /// <returns></returns> public Motherboard LoadSingleItem() { CommonData commonData = new CommonData(); MotherboardData motherboardData = new MotherboardData(); int brandIndex = Faker.Number.RandomNumber(0, motherboardData.Brands.Count); int platformIndex = Faker.Number.RandomNumber(0, motherboardData.Platforms.Count); Motherboard motherboard = new Motherboard(); motherboard.Brand = motherboardData.Brands[brandIndex]; motherboard.Platform = motherboardData.Platforms[platformIndex]; motherboard.Name = motherboardData.Names[brandIndex][platformIndex][Faker.Number.RandomNumber(0, motherboardData.Names[brandIndex][platformIndex].Count)]; motherboard.Description = "Some motherboard description"; motherboard.Condition = commonData.Conditions[Faker.Number.RandomNumber(0, commonData.Conditions.Length)]; motherboard.Stock = Faker.Number.RandomNumber(0, 51); motherboard.Price = Faker.Number.RandomNumber(50, 650); motherboard.Chipset = motherboardData.Chipsets[platformIndex][Faker.Number.RandomNumber(0, motherboardData.Chipsets[platformIndex].Count)]; motherboard.CPUSocket = motherboardData.CPUSockets[platformIndex][Faker.Number.RandomNumber(0, motherboardData.CPUSockets[platformIndex].Count)]; motherboard.Usage = motherboardData.Uses[Faker.Number.RandomNumber(0, motherboardData.Uses.Length)]; return(motherboard); }