private void LoadMetaData(ConfigDB db) { DataTable dt = db.LoadMetaData(); foreach (DataRow dr in dt.Rows) { int projectID = Utility.Value(dr["_fk_ProjectID"], -1); string groupName = Utility.Value(dr["GroupName"], "Unknown"); string varName = Utility.Value(dr["VarName"], "Unknown"); int intVal = Utility.Value(dr["IntValue"], -1); double floatVal = Utility.Value(dr["FloatValue"], 0.0); string textVal = Utility.Value(dr["TextValue"], ""); string comment = Utility.Value(dr["Comment"], "No Comment"); if (!_metaData.ContainsKey(projectID)) { _metaData.Add(projectID, new Dictionary <string, Dictionary <string, MetaDataEntry> >(StringComparer.InvariantCultureIgnoreCase)); } Dictionary <string, Dictionary <string, MetaDataEntry> > projectSet = _metaData[projectID]; if (!projectSet.ContainsKey(groupName)) { projectSet.Add(groupName, new Dictionary <string, MetaDataEntry>(StringComparer.InvariantCultureIgnoreCase)); } Dictionary <string, MetaDataEntry> group = projectSet[groupName]; if (group.ContainsKey(varName)) { group.Remove(varName); } group[varName] = new MetaDataEntry(projectID, groupName, varName, floatVal, intVal, textVal); } }