コード例 #1
0
        private void SetupLayout(IBSharpContext context)
        {
            var layoutClasses = context.ResolveAll("ui-layout").ToArray();

            foreach (var layoutClass in layoutClasses)
            {
                var layout = new AppLayout().Setup(layoutClass.Compiled, null, this);
                Layouts[layout.Code] = layout;
            }
        }
コード例 #2
0
ファイル: AppWidget.cs プロジェクト: Qorpent/qorpent.sys
 /// <summary>
 ///
 /// </summary>
 /// <param name="el"></param>
 /// <param name="parent"></param>
 /// <returns></returns>
 public AppWidget Setup(XElement el, AppLayout parent = null)
 {
     ApplyAttributes(el);
     this.Views = new Dictionary <string, AppView>();
     if (null != parent)
     {
         this.Layout = parent;
     }
     if (el.HasElements)
     {
         foreach (var v in el.Elements("view"))
         {
             var view = new AppView().Setup(v);
             Views.Add(view.Code, view);
         }
     }
     return(this);
 }