コード例 #1
0
        public static AppLocation Default()
        {
            AppLocation appLocation = new AppLocation();

            appLocation.Add(new HiApplication("/", "Common", ApplicationType.Common));
            return(appLocation);
        }
コード例 #2
0
        internal void LoadValuesFromConfigurationXml()
        {
            XmlNode configSection             = this.GetConfigSection("Hishop/Core");
            XmlAttributeCollection attributes = configSection.Attributes;

            this.GetAttributes(attributes);
            foreach (XmlNode xmlNode in configSection.ChildNodes)
            {
                if (xmlNode.Name == "Languages")
                {
                    this.GetLanguages(xmlNode);
                }
                if (xmlNode.Name == "appLocation")
                {
                    this.GetAppLocation(xmlNode);
                }
                if (xmlNode.Name == "IntegratedApplications")
                {
                    this.GetIntegratedApplications(xmlNode);
                }
            }
            if (this.appLocation_0 == null)
            {
                this.appLocation_0 = AppLocation.Default();
            }
            if (this.roleConfiguration == null)
            {
                this.roleConfiguration = new RolesConfiguration();
            }
        }
コード例 #3
0
        public static AppLocation Create(XmlNode node)
        {
            AppLocation result;

            if (node == null)
            {
                result = null;
            }
            else
            {
                AppLocation            appLocation = new AppLocation();
                XmlAttributeCollection attributes  = node.Attributes;
                if (attributes != null)
                {
                    foreach (XmlAttribute xmlAttribute in attributes)
                    {
                        if (xmlAttribute.Name == "pattern")
                        {
                            appLocation.Pattern = Globals.ApplicationPath + xmlAttribute.Value;
                        }
                        else
                        {
                            if (xmlAttribute.Name == "defaultName")
                            {
                                appLocation.DefaultName = xmlAttribute.Value;
                            }
                        }
                    }
                    for (int i = 0; i < node.ChildNodes.Count; i++)
                    {
                        XmlNode xmlNode = node.ChildNodes[i];
                        if (xmlNode.Name == "add")
                        {
                            XmlAttributeCollection attributes2 = xmlNode.Attributes;
                            if (attributes2 != null)
                            {
                                string          text    = Globals.ApplicationPath + attributes2["pattern"].Value;
                                string          value   = attributes2["name"].Value;
                                ApplicationType appType = (ApplicationType)Enum.Parse(typeof(ApplicationType), attributes2["type"].Value, true);
                                appLocation.Add(new HiApplication(text, value, appType));
                            }
                        }
                    }
                }
                result = appLocation;
            }
            return(result);
        }
コード例 #4
0
        public static AppLocation Create(XmlNode node)
        {
            if (node == null)
            {
                return(null);
            }
            AppLocation            location   = new AppLocation();
            XmlAttributeCollection attributes = node.Attributes;

            if (attributes != null)
            {
                foreach (XmlAttribute attribute in attributes)
                {
                    if (attribute.Name == "pattern")
                    {
                        location.Pattern = Globals.ApplicationPath + attribute.Value;
                    }
                    else if (attribute.Name == "defaultName")
                    {
                        location.DefaultName = attribute.Value;
                    }
                }
                for (int i = 0; i < node.ChildNodes.Count; i++)
                {
                    XmlNode node2 = node.ChildNodes[i];
                    if (node2.Name == "add")
                    {
                        XmlAttributeCollection attributes2 = node2.Attributes;
                        if (attributes2 != null)
                        {
                            string          pattern = Globals.ApplicationPath + attributes2["pattern"].Value;
                            string          name    = attributes2["name"].Value;
                            ApplicationType appType = (ApplicationType)Enum.Parse(typeof(ApplicationType), attributes2["type"].Value, true);
                            location.Add(new HiApplication(pattern, name, appType));
                        }
                    }
                }
            }
            return(location);
        }
コード例 #5
0
ファイル: AppLocation.cs プロジェクト: davinx/himedi
 public static AppLocation Create(XmlNode node)
 {
     if (node == null)
     {
         return null;
     }
     AppLocation location = new AppLocation();
     XmlAttributeCollection attributes = node.Attributes;
     if (attributes != null)
     {
         foreach (XmlAttribute attribute in attributes)
         {
             if (attribute.Name == "pattern")
             {
                 location.Pattern = Globals.ApplicationPath + attribute.Value;
             }
             else if (attribute.Name == "defaultName")
             {
                 location.DefaultName = attribute.Value;
             }
         }
         for (int i = 0; i < node.ChildNodes.Count; i++)
         {
             XmlNode node2 = node.ChildNodes[i];
             if (node2.Name == "add")
             {
                 XmlAttributeCollection attributes2 = node2.Attributes;
                 if (attributes2 != null)
                 {
                     string pattern = Globals.ApplicationPath + attributes2["pattern"].Value;
                     string name = attributes2["name"].Value;
                     ApplicationType appType = (ApplicationType) Enum.Parse(typeof(ApplicationType), attributes2["type"].Value, true);
                     location.Add(new HiApplication(pattern, name, appType));
                 }
             }
         }
     }
     return location;
 }
コード例 #6
0
ファイル: AppLocation.cs プロジェクト: davinx/himedi
 public static AppLocation Default()
 {
     AppLocation location = new AppLocation();
     location.Add(new HiApplication("/", "Common", ApplicationType.Common));
     return location;
 }
コード例 #7
0
 internal void GetAppLocation(XmlNode node)
 {
     this.appLocation_0 = AppLocation.Create(node);
 }