/// <summary> /// Stands for "Get Table name and Key" /// Returns the correct key for the current profile based on the app's equivalent of that key /// </summary> /// <param name="creationType"></param> /// <param name="appKey"></param> /// <param name="specialTableName">For table names that vary based on a setting, replaces %t with this string</param> /// <returns>:0:Table - 1: Sql key</returns> public void gtk(Export.C creationType, string appKey, string specialTableName = "") { // Select correct dictionary to searchfor creation Dictionary <string, Dictionary <string, string> > targetDict = null; switch (creationType) { case Export.C.Creature: targetDict = Profile.Active.Creature; break; case Export.C.Quest: targetDict = Profile.Active.Quest; break; case Export.C.Item: targetDict = Profile.Active.Item; break; case Export.C.Loot: targetDict = Profile.Active.Loot; break; case Export.C.Vendor: targetDict = Profile.Active.Vendor; break; } // Check if the key exists in the profile var table = targetDict.Where(t => // equals in this case is equivalent to null check t.Value.Where(keysDic => keysDic.Key.ToLower() == appKey.ToLower()).FirstOrDefault().Key != null ).FirstOrDefault(); // Key didn't exist in any table, ignore column IsValid = table.Key != null; if (!IsValid) { Logger.Log($"Notice: Export: {creationType.ToString()}.{appKey} not in profile. This isn't always an problem."); return; } // Key exists, generate result SqlTableName = table.Key; // Return table name // Handle unusual table names if (specialTableName != "") { SqlTableName = SqlTableName.Replace("%t", specialTableName); } // Find appkey again and put sqlkey in result SqlKey = table.Value.Where(keys => keys.Key.ToLower() == appKey.ToLower()).First().Value; }
public bool InFilter(string filterText) { return(ModuleName.Contains(filterText) || PageName.Contains(filterText) || PageID.Contains(filterText) || ActionName.Contains(filterText) || ActionTitle.Contains(filterText) || SqlGroupName.Contains(filterText) || SqlTableName.Contains(filterText) || SqlName.Contains(filterText) || SqlDescription.Contains(filterText)); }