Exemple #1
0
        //public void FundEventHandler()
        //{
        //    int viewId = 0;

        //    var obs = Wlst.Cr.Core.CoreServices.RegionManage.GetViewById(viewId);

        //    if (obs != null)
        //        View = obs;
        //}



        public void NavOnLoad(params object[] parsObjects)
        {
            ShowView.Items.Clear();
            ShowView.BackGroundView  = "#ffffff";
            ShowView.BackGroundOther = "#f0f0f1";

            var userProperty = UserInfo.UserLoginInfo;

            //this.ChildTreeItems.Clear();
            foreach (var t in SettingComponentHolding.GetAllComponentIDs)
            {
                var tmp = SettingComponentHolding.GetMenuItemById(t);
                if (tmp == null)
                {
                    continue;
                }
                if (string.IsNullOrEmpty(tmp.Describle) == false && tmp.Describle.Contains("admin") &&
                    userProperty.D == false)
                {
                    continue;
                }
                //this.AddNode(tmp);
                var obs = Wlst.Cr.Core.CoreServices.RegionManage.GetViewById(tmp.ViewId);
                var vis = obs as ContentControl;
                if (vis == null)
                {
                    continue;
                }

                if (tmp.Key.Contains("Setting"))
                {
                    ShowView.AddItem(tmp.PathSetting, vis);
                }
            }
        }
Exemple #2
0
        public void NavOnLoad(params object[] parsObjects)
        {
            var userProperty = UserInfo.UserLoginInfo;

            this.ChildTreeItems.Clear();
            foreach (var t in SettingComponentHolding.GetAllComponentIDs)
            {
                var tmp = SettingComponentHolding.GetMenuItemById(t);
                if (tmp == null)
                {
                    continue;
                }
                if (string.IsNullOrEmpty(tmp.Describle) == false && tmp.Describle.Contains("admin") && userProperty.D == false)
                {
                    continue;
                }
                this.AddNode(tmp);
            }
        }