private AssetID GetAssetID(string assetName) { if (AssetIDTypeConverter.Legacy) { return(Convert.ToUInt32(assetName, 16)); } return(AssetIDTypeConverter.AssetIDFromString(assetName)); }
private void textBoxFindAsset_TextChanged(object sender, EventArgs e) { uint assetID = 0; try { textBoxFindAsset.BackColor = defaultColor; assetID = AssetIDTypeConverter.AssetIDFromString(textBoxFindAsset.Text); } catch { textBoxFindAsset.BackColor = System.Drawing.Color.Red; } if (assetID != 0 && archive.ContainsAsset(assetID)) { SetSelectedIndices(new List <uint>() { assetID }, false); } else { foreach (Asset a in archive.GetAllAssets()) { if (a.AHDR.ADBG.assetName.ToLower().Contains(textBoxFindAsset.Text.ToLower()) && !a.isSelected) { SetSelectedIndices(new List <uint>() { a.AHDR.assetID }, false); return; } } } }