示例#1
0
        private unsafe void __InitLeftMenu()
        {
            FuncTree[]    treeArray;
            Hashtable     hashtable;
            StringBuilder builder;
            int           num;
            FuncTree      tree;
            bool          flag;
            int           num2;

            this.navTree.Visible = 0;
            treeArray            = FuncTree.GetAllFuncs(-1);
            if (((treeArray == null) ? 0 : ((((int)treeArray.Length) < 1) == 0)) != null)
            {
                goto Label_0030;
            }
            goto Label_0158;
Label_0030:
            hashtable = FuncTree.GetAllFuncsHash(this.Page);
            builder   = new StringBuilder();
            builder.Append("<ul id=\"menu_tree\">");
            num = 0;
            goto Label_011E;
Label_0055:
            tree = treeArray[num];
            num2 = 1;
            if (((tree.Overdue == &num2.ToString()) == 0) != null)
            {
                goto Label_007F;
            }
            goto Label_011A;
Label_007F:
            if ((((tree.Name == "平台管理") == null) ? 1 : FunUtil.IsHost()) == null)
            {
                goto Label_011A;
            }
            if (FunUtil.CanExecFunc(this.nUserId, tree.Id) == null)
            {
                goto Label_011A;
            }
            this.__OutputFuncInfo(tree);
            builder.Append("<li>");
            builder.Append(string.Format("<label><a href=\"javascript:;\" funcid=\"{0}\" onclick=\"navigate('{0}');return false;\" hidefocus=\"hidefocus\" style=\"background:url(../../../img/{1}.png) no-repeat left center;font-size:14px\" align=\"absmiddle\" border=\"0\" />&nbsp;{2}</a></label>", (int)tree.Id, tree.Icon, tree.LocalName));
            builder.Append(this.__AppendChildFuncs(hashtable, tree));
            builder.Append("</li>");
Label_011A:
            num += 1;
Label_011E:
            if ((num < ((int)treeArray.Length)) != null)
            {
                goto Label_0055;
            }
            builder.Append("</ul>");
            this.ltlNavTreeFunctions.Text = builder.ToString();
            this.navTree.Visible          = 1;
Label_0158:
            return;
        }
示例#2
0
        private void __OutputFuncInfo(FuncTree __func)
        {
            object obj2;

            object[] objArray;
            __func.TargetUrl    = FuncTree.GetURLOfFirstValidEntity(this.Page, __func);
            obj2                = this.FuncsArrayInfo;
            this.FuncsArrayInfo = string.Concat(new object[] { obj2, "funcs_array[\"", (int)__func.Id, "\"] = {Id:", (int)__func.Id, ",LocalName:\"", __func.LocalName, "\",Icon:\"", __func.Icon, "\",TargetUrl:\"", __func.TargetUrl, "\"}\n" });
            return;
        }
示例#3
0
        private unsafe string __AppendChildFuncs(Hashtable __htFuncTree, FuncTree __parentFunc)
        {
            List <FuncTree> list;
            StringBuilder   builder;
            int             num;
            string          str;
            bool            flag;
            int             num2;

            list = (List <FuncTree>)__htFuncTree[(int)__parentFunc.Id];
            if (((null == list) == 0) != null)
            {
                goto Label_0030;
            }
            str = "";
            goto Label_015F;
Label_0030:
            builder = new StringBuilder();
            if (((__parentFunc.DisplayMode == 2) == 0) != null)
            {
                goto Label_0056;
            }
            builder.Append("<ul class=\"two\" style=\"display:block;\">");
            goto Label_0062;
Label_0056:
            builder.Append("<ul class=\"two\">");
Label_0062:
            num = 0;
            goto Label_0138;
Label_0069:
            num2 = 1;
            if (((list[num].Overdue == &num2.ToString()) == 0) != null)
            {
                goto Label_0093;
            }
            goto Label_0134;
Label_0093:
            this.__OutputFuncInfo(list[num]);
            builder.Append(string.Format("<li{0}>", (__htFuncTree[(int)list[num].Id] == null) ? " class=\"lonely\"" : ""));
            builder.Append(string.Format("<label><a href=\"javascript:;\" funcid=\"{0}\" onclick=\"navigate('{0}');return false;\" hidefocus=\"hidefocus\" style=\"background:url(../../../img/{1}.png) no-repeat left center;\">{2}</a></label>", (int)list[num].Id, list[num].Icon, list[num].LocalName));
            builder.Append(this.__AppendChildFuncs(__htFuncTree, list[num]));
            builder.Append("</li>");
Label_0134:
            num += 1;
Label_0138:
            if ((num < list.Count) != null)
            {
                goto Label_0069;
            }
            builder.Append("</ul>");
            str = builder.ToString();
Label_015F:
            return(str);
        }
        private void GetFunC(IList <FuncTree> listAll, FuncTree func)
        {
            var entList = listAll.Where(e => e.PID == func.ID);

            if (entList.Count() == 0)
            {
                return;
            }
            foreach (var item in entList)
            {
                GetFunC(listAll, item);
            }
            func.CHILDREN.AddRange(entList);
        }
        private void GetFunC(IList <FuncTree> listAll, FuncTree func)
        {
            var entList   = listAll.Where(e => e.PID == func.ID);
            var funcTrees = entList as FuncTree[] ?? entList.ToArray();

            if (!funcTrees.Any())
            {
                return;
            }
            foreach (var item in funcTrees)
            {
                GetFunC(listAll, item);
            }
            func.CHILDREN.AddRange(funcTrees);
        }
示例#6
0
        private void __InirTopMenu()
        {
            FuncTree[]      treeArray;
            List <FuncTree> list;
            int             num;
            int             num2;
            FuncTree        tree;
            string          str;
            string          str2;
            string          str3;
            string          str4;
            string          str5;
            bool            flag;

            object[] objArray;
            this.ltTopMenu.Text = "<ul id='index-nav'>";
            if ((FunUtil.IsAdmin() == 0) != null)
            {
                goto Label_003E;
            }
            this.ltTopMenu.Text = this.ltTopMenu.Text + "<li><a class='runoob-pop' href='../../../Default.aspx' data-id='index' title='首页'><span class='spanTM current'>首页</span></a></li>";
Label_003E:
            treeArray = FuncTree.GetAllFuncs(-1);
            list      = new List <FuncTree>();
            if ((treeArray == null) != null)
            {
                goto Label_005D;
            }
            list.AddRange(treeArray);
Label_005D:
            num  = 0;
            num2 = 0;
            goto Label_01D6;
Label_0066:
            tree = list[num2];
            if (FunUtil.IsAdmin() != null)
            {
                goto Label_00D9;
            }
            if ((((((tree.Name != "单人模拟") == null) || ((tree.Name != "多人模拟") == null)) || ((tree.Name != "智能Agent仿真") == null)) ? 1 : ((tree.Name != "大数据分析") == 0)) != null)
            {
                goto Label_00D8;
            }
            goto Label_01D2;
            Label_00D8 :;
            Label_00D9 :
            str  = tree.Name;
            str2 = tree.LocalName;
            if ((string.IsNullOrEmpty(FuncTree.GetURLOfFirstValidEntity(this.Page, tree)) == 0) != null)
            {
                goto Label_010F;
            }
            goto Label_01D2;
Label_010F:
            if (((tree.Overdue == "1") == 0) != null)
            {
                goto Label_012E;
            }
            goto Label_01D2;
Label_012E:
            if (FunUtil.CanExecFunc(this.nUserId, tree.Id) != null)
            {
                goto Label_014B;
            }
            goto Label_01D2;
Label_014B:
            if (((num < 10) ? 1 : ((str != "系统维护") == 0)) == null)
            {
                goto Label_01D2;
            }
            num += 1;
            str4 = "runoob-pop";
            str5 = string.Format("<li><a href=\"javascript:;\" funcid=\"{0}\" onclick=\"navigate('{0}');return false;\" hidefocus=\"hidefocus\" align=\"absmiddle\" border=\"0\" class='{3}' /><span class='spanTM'>{2}</span></a></label>", new object[] { (int)tree.Id, tree.Icon, tree.LocalName, str4 });
            this.ltTopMenu.Text = this.ltTopMenu.Text + str5;
Label_01D2:
            num2 += 1;
Label_01D6:
            if ((num2 < list.Count) != null)
            {
                goto Label_0066;
            }
            this.ltTopMenu.Text = this.ltTopMenu.Text + "<li><a class='runoob-pop' href='../../../Default.aspx?act=logout' class='runoob-pop'><span class='spanTM'>退出登录</span></a></li>";
            this.ltTopMenu.Text = this.ltTopMenu.Text + "</ul>";
            return;
        }
示例#7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            FuncTree tree;

            FuncTree[] treeArray;
            FuncTree   tree2;
            string     str;
            int        num;
            bool       flag;

            FuncTree[] treeArray2;
            int        num2;

            this.nSelFuncId = Util.GetInt(base.Request, "p", 0);
            if (((this.nSelFuncId < 1) == 0) != null)
            {
                goto Label_0031;
            }
            this.nSelFuncId = -1;
Label_0031:
            if (((this.nSelFuncId > 0) == 0) != null)
            {
                goto Label_010F;
            }
            tree = FuncTree.Get(this.nSelFuncId);
            if ((tree == null) != null)
            {
                goto Label_010E;
            }
            this.strDesktopName = tree.LocalName;
            this.strDesktopURL  = FuncTree.GetURLOfFirstValidEntity(this.Page, tree);
            if ((string.IsNullOrEmpty(this.strDesktopURL) == 0) != null)
            {
                goto Label_010D;
            }
            treeArray = FuncTree.GetAllFuncs(tree.Id);
            if (((treeArray == null) ? 1 : ((((int)treeArray.Length) > 0) == 0)) != null)
            {
                goto Label_010C;
            }
            treeArray2 = treeArray;
            num2       = 0;
            goto Label_00FD;
Label_00C0:
            tree2 = treeArray2[num2];
            str   = FuncTree.GetURLOfFirstValidEntity(this.Page, tree2);
            if (string.IsNullOrEmpty(str) != null)
            {
                goto Label_00F6;
            }
            this.strDesktopName = tree2.LocalName;
            this.strDesktopURL  = str;
            goto Label_010B;
Label_00F6:
            num2 += 1;
Label_00FD:
            if ((num2 < ((int)treeArray2.Length)) != null)
            {
                goto Label_00C0;
            }
            Label_010B :;
            Label_010C :;
            Label_010D :;
            Label_010E :;
Label_010F:
            if (base.IsPostBack != null)
            {
                goto Label_0162;
            }
            SkinUtil.AdhereStyleSheet(this.Page, "content.css");
            if (((PortalSettings.get_DefaultTypeSub() == 2) == 0) != null)
            {
                goto Label_015A;
            }
            this.m_strFuncBarBgStyle = "style='display:none;'";
            this.m_strWorkAreaStyle  = "style='top:0px;'";
Label_015A:
            this.__InitTabs();
Label_0162:
            return;
        }