예제 #1
0
파일: WidgetData.cs 프로젝트: tforsberg/z
		public List<WidgetEntity> GetFavoriteWidgets()
		{
			List<WidgetEntity> widgets = new List<WidgetEntity>();
			WidgetEntity widget;
			var res = GetAllWidgetData().Where(p => p.Attribute("isFavorite") != null && p.Attribute("isFavorite").Value == "true");
			foreach (var obj in res) {
				widget = new WidgetEntity();
				widget.WidgetName = obj.Attribute("name").Value;
				widget.WidgetHref = "~/" + widget.WidgetName + "/Overview.aspx";
				widget.Title = obj.Attribute("text") != null ? obj.Attribute("text").Value : widget.WidgetName;
                widget.Icon = "~/explore/css/images/icons/widget/" + widget.WidgetName + ".png";
				//widget.Icon = "explore/css/images/icons/widget/accordion.png";
				widgets.Add(GetWidgetEntity(obj,true));
			}
			return widgets;
		}
예제 #2
0
        public List <WidgetEntity> GetAllWidgets()
        {
            List <WidgetEntity> widgets = new List <WidgetEntity>();
            WidgetEntity        widget;
            var res = GetAllWidgetData();

            foreach (var obj in res)
            {
                widget            = new WidgetEntity();
                widget.WidgetName = obj.Attribute("name").Value;
                widget.WidgetHref = "~/" + widget.WidgetName + "/Overview.aspx";
                widget.Title      = obj.Attribute("text") != null?obj.Attribute("text").Value : widget.WidgetName;

                widget.Icon = "~/explore/css/images/icons/widget/" + widget.WidgetName + ".png";
                //widget.Icon = "explore/css/images/icons/widget/accordion.png";
                widgets.Add(GetWidgetEntity(obj, false));
            }
            return(widgets);
        }
예제 #3
0
파일: WidgetData.cs 프로젝트: tforsberg/z
		public WidgetEntity GetWidgetEntity(XElement obj, bool bigIcon){
			var widget = new WidgetEntity();
			widget.WidgetName = obj.Attribute("name").Value;
			widget.WidgetHref = "~/" + widget.WidgetName + "/Overview.aspx";
			widget.Title = obj.Attribute("text") != null ? obj.Attribute("text").Value : widget.WidgetName;
			widget.Icon = "~/explore/css/images/icons/widget/" + widget.WidgetName + ".png";
			if (bigIcon)
			{
                //widget.Icon = "explore/css/images/icons/widget/accordion.png";
                widget.Icon = "~/explore/css/images/icons/widget/" + widget.WidgetName + ".png";
			}
			else
			{
				//widget.Icon = "explore/css/images/icons/widget/accordion.png";
                widget.Icon = "~/explore/css/images/icons/widget/" + widget.WidgetName + ".png";
			}
			
			return 	widget;
	}
예제 #4
0
        public WidgetEntity GetWidgetEntity(XElement obj, bool bigIcon)
        {
            var widget = new WidgetEntity();

            widget.WidgetName = obj.Attribute("name").Value;
            widget.WidgetHref = "~/" + widget.WidgetName + "/Overview.aspx";
            widget.Title      = obj.Attribute("text") != null?obj.Attribute("text").Value : widget.WidgetName;

            widget.Icon = "~/explore/css/images/icons/widget/" + widget.WidgetName + ".png";
            if (bigIcon)
            {
                //widget.Icon = "explore/css/images/icons/widget/accordion.png";
                widget.Icon = "~/explore/css/images/icons/widget/" + widget.WidgetName + ".png";
            }
            else
            {
                //widget.Icon = "explore/css/images/icons/widget/accordion.png";
                widget.Icon = "~/explore/css/images/icons/widget/" + widget.WidgetName + ".png";
            }

            return(widget);
        }