/// <summary> /// View Model for TextureView /// </summary> /// <param name="item">The currently selected item</param> /// <param name="category">The category of the selected item</param> public TextureViewModel(ItemData item, string category) { selectedItem = item; selectedCategory = category; var imcData = IMC.GetVersion(selectedCategory, selectedItem, false); imcVersion = imcData.Item1; VFXVersion = imcData.Item2; RaceComboBox = MTRL.GetMTRLRaces(selectedItem, selectedCategory, imcVersion); if (RaceComboBox.Count > 1) { RaceEnabled = true; } else { RaceEnabled = false; } }
/// <summary> /// View Model for TextureView /// </summary> /// <param name="item">The currently selected item</param> /// <param name="category">The category of the selected item</param> public void UpdateTexture(ItemData item, string category) { selectedItem = item; selectedCategory = category; if (!category.Equals("UI")) { var imcData = IMC.GetVersion(selectedCategory, selectedItem, false); imcVersion = imcData.Item1; VFXVersion = imcData.Item2; RaceComboBox = MTRL.GetMTRLRaces(selectedItem, selectedCategory, imcVersion); } else { RaceComboBox = new ObservableCollection <ComboBoxInfo>() { new ComboBoxInfo() { Name = "-", ID = "-", IsNum = false } }; } if (RaceComboBox.Count > 1) { RaceEnabled = true; } else { RaceEnabled = false; } RaceIndex = 0; }
/// <summary> /// View Model for TextureView from ID /// </summary> /// <param name="item">The currently selected item</param> /// <param name="category">The category of the selected item</param> public void UpdateTextureFromID(ItemData item, string raceID, string category, string part, string variant) { selectedItem = item; selectedCategory = category; imcVersion = variant; VFXVersion = "0000"; RaceComboBox = MTRL.GetMTRLRaces(selectedItem, selectedCategory, imcVersion); if (RaceComboBox.Count > 1) { RaceEnabled = true; } else { RaceEnabled = false; } RaceIndex = 0; //var info = MTRL.GetMTRLData(item, raceID, category, part, variant, "", "", "0000"); //MapComboBox = info.Item2; //MapIndex = 0; }