/// <summary> /// 初始化子系统 /// </summary> /// <returns>子系统自动打开的菜单代码</returns> private string InitSubSystem() { DisplayHelper.Show("获取子系统相关数据", "正在装载系统,请等待..."); BDictSystem system = EmpInfo.CanUseSystemList.Find(sys => sys.Code == EnvInfo.SystemCode); this.Text = this.Title + " --- " + EnvInfo.SystemName; Image img = BmpHelper.GetBmp(system.Ico); if (img != null) { Bitmap map = new Bitmap(img); Icon icon = Icon.FromHandle(map.GetHicon()); if (icon != null) { this.Icon = icon; } } // 获取参数(ParamHelper) 根据系统和人员获取默认菜单 String pname = "DEF_MENU_" + EnvInfo.SystemCode; var parmList = new List <KeyValuePair <string, string> > { new KeyValuePair <string, string>("empId", EmpInfo.Id.ToString()), new KeyValuePair <string, string>("parmName", pname) }; CustomException ce = null; String menuCode = HttpDataHelper.GetStringWithInfo("BASE", "/sys/parameteremp", out ce, parmList); return(menuCode); }
public FrmMenuDefault() { InitializeComponent(); // 设置默认菜单 var parmList = new List <KeyValuePair <string, string> > { new KeyValuePair <string, string>("systemId", EnvInfo.SystemId.ToString()), new KeyValuePair <string, string>("empId", EmpInfo.Id.ToString()), new KeyValuePair <string, string>("roles", EmpInfo.Roles), }; CustomException ce = null; List <DataMenu> menulist = HttpDataHelper.GetWithInfo <List <DataMenu> >( "BASE", "/sys/menu", out ce, parmList); parmList = new List <KeyValuePair <string, string> > { new KeyValuePair <string, string>("empId", EmpInfo.Id.ToString()), new KeyValuePair <string, string>("parmName", "DEF_MENU_" + EnvInfo.SystemCode) }; String defmenu = HttpDataHelper.GetStringWithInfo("BASE", "/sys/parameteremp", out ce, parmList); tlSysMenu.BeginUpdate(); CreateTreeView(menulist, defmenu); tlSysMenu.EndUpdate(); }
/// <summary> /// 构造方法 /// </summary> public FrmMainRibbon() { // // Windows 窗体设计器支持所必需的 // InitializeComponent(); this.ribbon.Manager.UseAltKeyForMenu = false; if (!DesignMode) { #region 加载皮肤 DisplayHelper.SetCaption("加载换肤信息"); SkinHelper.InitSkinGallery(rgbiSkins, true); this.bsiSkin.Visibility = BarItemVisibility.Never; // 获取默认皮肤 string default_skin = DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName; var parmList = new List <KeyValuePair <string, string> > { new KeyValuePair <string, string>("empId", EmpInfo.Id.ToString()), new KeyValuePair <string, string>("parmName", "DEF_SKIN") }; CustomException ce = null; string skinname = HttpDataHelper.GetStringWithInfo("BASE", "/sys/parameteremp", out ce, parmList); if (!String.IsNullOrEmpty(skinname) && default_skin != skinname) { DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle(skinname); } #endregion customTabbedMdiManager1.MdParBackImage = Properties.Resources.Main; // 启动定时器 this.timer1 = new Timer(); this.timer1.Interval = 1000; this.timer1.Tick += (ts, te) => { this.barItemServerTimeLable.Caption = DateTime.Now.ToString("MM/dd HH:mm:ss "); }; } this.fixedItemCount = this.ribbon.Items.Count; switch (LogHelper._logLevel) { case 0: this.bciLogNone.Checked = true; break; case 1: this.bciLogError.Checked = true; break; case 2: this.bciLogWarn.Checked = true; break; case 3: this.bciLogDebug.Checked = true; break; case 4: this.bciLogInfo.Checked = true; break; } }