예제 #1
0
 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);
 }
예제 #2
0
 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);
 }
예제 #3
0
        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));
                    }
                }
            }
        }
예제 #4
0
        private void AddSectionItem(ConfigurationSectionGroup group, string index, ExtentProgramData data)
        {
            ExtentProgramInfo info = ToExtentProgramInfo(data);

            group.Sections.Add(index.ToString(), info);
        }