private ExtentProgramData ToExtentProgramData(ExtentProgramInfo info) { if (info != null) { ExtentProgramData data = new ExtentProgramData(); data.Name = info.Name; data.Path = info.Path; data.IconURL = info.IconURL; return(data); } return(null); }
private ExtentProgramInfo ToExtentProgramInfo(ExtentProgramData info) { if (info != null) { ExtentProgramInfo data = new ExtentProgramInfo(); data.Name = info.Name; data.Path = info.Path; data.IconURL = info.IconURL; if (string.IsNullOrEmpty(data.IconURL)) { data.IconURL = "/CO_IA.UI.Screen;component/Images/defaultprogram.png"; } return(data); } return(null); }
private void LoadConfig() { ProgramInfo.Clear(); ConfigurationSectionGroup group = GetSectionGroup(); if (group == null) { IniSectionGroup(); return; } if (group.Sections.Count > 0) { foreach (var item in group.Sections) { ExtentProgramInfo info = item as ExtentProgramInfo; if (info != null) { ProgramInfo.Add(ToExtentProgramData(info)); } } } }
private void AddSectionItem(ConfigurationSectionGroup group, string index, ExtentProgramData data) { ExtentProgramInfo info = ToExtentProgramInfo(data); group.Sections.Add(index.ToString(), info); }