public static bool ParseModFile(string modFileData) { if (SystemsContainer.Get <ModSystem>().ModControl == ModControlMode.Disabled) { return(true); } SystemsContainer.Get <ModSystem>().LastModFileData = modFileData; //Save mod file so we can recheck it. StringBuilder = new StringBuilder(); ParseRequired.Clear(); ParseOptional.Clear(); WhiteList.Clear(); BlackList.Clear(); PartsList.Clear(); SaveCurrentModConfigurationFile(); ReadModConfigurationFile(modFileData); CheckFiles(); if (!ModCheckOk) { SystemsContainer.Get <ModSystem>().FailText = StringBuilder.ToString(); WindowsContainer.Get <ModWindow>().Display = true; return(false); } SystemsContainer.Get <ModSystem>().AllowedParts = PartsList; LunaLog.Log("[LMP]: Mod check passed!"); return(true); }
public static bool ParseModFile(string modFileData) { if (ModSystem.Singleton.ModControl == ModControlMode.DISABLED) { return(true); } ModSystem.Singleton.LastModFileData = modFileData; //Save mod file so we can recheck it. StringBuilder = new StringBuilder(); ParseRequired.Clear(); ParseOptional.Clear(); WhiteList.Clear(); BlackList.Clear(); PartsList.Clear(); SaveCurrentModConfigurationFile(); ReadModConfigurationFile(modFileData); CheckFiles(); if (!ModCheckOk) { ModSystem.Singleton.FailText = StringBuilder.ToString(); ModWindow.Singleton.Display = true; return(false); } ModSystem.Singleton.AllowedParts = PartsList; Debug.Log("[LMP]: Mod check passed!"); return(true); }
public DataEditViewModel(IPartsListRipository partsListRipository, IBomRepository bomRepository) { _partsListRipository = partsListRipository; _bomRepository = bomRepository; PartsList.Clear(); foreach (var partslist in _partsListRipository.GetPartsList(1)) { PartsList.Add(new PartsListEtity(partslist.Id, partslist.SqkId, partslist.PartsNumber, partslist.PartsName, partslist.PartsQuantity)); } BomList.Clear(); foreach (var bomlist in _bomRepository.GetBoms("test")) { BomList.Add(new BomEntity(bomlist.Id, bomlist.AircraftNumber, bomlist.AssyNo, bomlist.PartsNo, bomlist.NeedQuantity, bomlist.ReceivedQuantity, bomlist.Memo)); OriginalQuantityText += bomlist.ReceivedQuantity; } UpdateButton = new DelegateCommand(UpdateButtonExecute); DivideQuantityText = 10; RemainingQuantityText = DivideQuantityText; }
private void PartsListUpDate() { PartsList.Clear(); foreach (var partslist in _partsListRipository.GetPartsList(Convert.ToInt32(SqkIdText))) { PartsList.Add(new PartsListEtity(partslist.Id, partslist.SqkId, partslist.PartsNumber, partslist.PartsName, partslist.PartsQuantity)); } }
private void Reset() { PartsList.Clear(); SelectedPartsList = null; SelectedSqk = null; SqkIdText = string.Empty; PartsNumberText = string.Empty; PartsQuantityText = string.Empty; }
public void Clear() { PartsList.Clear(); }