private void frmMain_Load(object sender, EventArgs e) { //DxCtlHelper.SetFormWindowStateMax(this); InitSkin(); string Path = FileHelper.GetFilePath("config", "SystemSetting.xml"); barStaticItem1.Caption = "欢迎您:" + UserInfoHelper.CreateName; barStaticItem2.Caption = LinqToXmlHelper.GetXmlNodeValue(Path, "appsetting", "Company"); barStaticItem3.Caption = LinqToXmlHelper.GetXmlNodeValue(Path, "appsetting", "Telephone"); barStaticItem4.Caption = LinqToXmlHelper.GetXmlNodeValue(Path, "appsetting", "QQ"); DataSet ds = new DataSet(); CreateMenu(this.NavBarCtrlMenu, ds); //NotifyIcon notifyicon = new NotifyIcon(); //ContextMenu notifyContextMenu = new System.Windows.Forms.ContextMenu(); //string value = ConfigHelper.GetConfigKeyValue("image"); //string iconname = ConfigHelper.GetConfigKeyValue("iconname"); //string startimg = ConfigHelper.GetConfigKeyValue("startimg"); //string stopimg = ConfigHelper.GetConfigKeyValue("stopimg"); //string exitimg = ConfigHelper.GetConfigKeyValue("exitimg"); //string path = FileHelper.GetFilePath(value, iconname); //string path1 = FileHelper.GetFilePath(value, startimg); //string path2 = FileHelper.GetFilePath(value, stopimg); //string path3 = FileHelper.GetFilePath(value, exitimg); //this.NavBarCtrlMenu.Groups.Clear(); //Bll_Bse_BarMgrMenu TopMenu = FactoryBLL.Create_Bse_BarMgrMenu(); //Bll_Bse_Menu Menu = FactoryBLL.Create_Bse_Menu(); //ds = Menu.Get_Menu(Convert.ToInt32(MyUserInfoHelper.CreateUserId)); //dsTop = TopMenu.Get_TopMenu(); //InitTopMenu(dsTop); //this.Text = MyUserInfoHelper.systemName + "--" + this.Text; //DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle(MyUserInfoHelper.skin); //int i = this.NavBarCtrlMenu.Groups.Count; string DefaultExpandedGroup = ConfigHelper.GetConfigKeyValue("DefaultExpandedGroup"); this.NavBarCtrlMenu.Groups[int.Parse(DefaultExpandedGroup)].Expanded = true; //this.panelControl1.ContentImage = Image.FromFile(MyFilePathHelper.GetFilePath("Images", MyUserInfoHelper.mainLogo)); //panelControl1.Visible = false; dtShortcut = ds.Tables[2]; if (ConfigHelper.GetConfigKeyValue("NeedShortcut") == "true")//是否需要显示快捷方式 { gridControl1.DataSource = GetBindShortcut(dtShortcut); } else { gridControl1.Visible = false; } }
private void frmRibbonMain_Load(object sender, EventArgs e) { string Path = FileHelper.GetFilePath("config", "SystemSetting.xml"); barStaticItem1.Caption = "欢迎您:" + UserInfoHelper.CreateName; barStaticItem2.Caption = LinqToXmlHelper.GetXmlNodeValue(Path, "appsetting", "Company"); barStaticItem3.Caption = LinqToXmlHelper.GetXmlNodeValue(Path, "appsetting", "Telephone"); barStaticItem4.Caption = LinqToXmlHelper.GetXmlNodeValue(Path, "appsetting", "QQ"); GetMenuBind(); this.ribbon.SelectedPage = ribbon.Pages[1]; }
/// <summary>窗体加载 /// 窗体加载 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void frmRibbonMain_Load(object sender, EventArgs e) { //SplashScreenManager.ShowForm(typeof(SplashScreen1)); StaticInfoHelper.IsOpen = 0; string path = FileHelper.GetFilePath("config", "SystemSetting.xml"); barStaticItem1.Caption = @"欢迎您:" + UserInfoHelper.CreateName; barStaticItem2.Caption = LinqToXmlHelper.GetXmlNodeValue(path, "appsetting", "Company"); barStaticItem3.Caption = LinqToXmlHelper.GetXmlNodeValue(path, "appsetting", "Telephone"); barStaticItem4.Caption = LinqToXmlHelper.GetXmlNodeValue(path, "appsetting", "QQ"); GetMenuBind(); ribbon.SelectedPage = ribbon.Pages["LimitPage"]; //if (ConfigHelper.GetConfigKeyValue("AutoRunFrm") != string.Empty) //{ // string[] strFrm = ConfigHelper.GetConfigKeyValue("AutoRunFrm").Split('|'); // foreach (string t in strFrm) // { // OpenForm(this, t.Split('*')[0], t.Split('*')[1], ""); // } //} //SplashScreenManager.CloseForm(); }