/// <summary> /// 메뉴, 기본 초기화 /// </summary> private void MenuDataInit(object obj) { try { mainwin = obj as MainWin; Button btnUser = mainwin.FindName("btnUser") as Button; StackPanel spMenuArea = mainwin.FindName("spMenuArea") as StackPanel; btnUser.Content = Logs.strLogin_ID; htconditions.Clear(); htconditions.Add("SYS_CD", FmsUtil.sysCd); dtMenuList = work.Select_MNU_LIST(htconditions); foreach (DataRow r in dtMenuList.Select("MNU_STEP = '1'", "ORD")) { try { if (!Logs.htPermission[r["MNU_CD"].ToString()].ToString().Equals("N")) { Button btnMenu = new Button { Name = "MN_" + r["MNU_CD"].ToString(), Content = r["MNU_NM"].ToString(), Style = Application.Current.Resources["MainMNUButton"] as Style, //Tag = "/Resources/Images/MNUImage/" + r["MNU_IMG"].ToString() }; if (ThemeApply.strThemeName.Equals("GTINavyTheme")) { btnMenu.Tag = "/Resources/Navy/Images/MNUImage/" + r["MNU_IMG"].ToString(); } else { btnMenu.Tag = "/Resources/Blue/Images/MNUImage/" + r["MNU_IMG"].ToString(); } btnMenu.Click += btnMenu_Click; mainwin.RegisterName(btnMenu.Name, btnMenu); spMenuArea.Children.Add(btnMenu); } } catch (Exception ex) { Messages.ErrLog(ex); } } Logs.configChange(Logs.WNMSConfig); } catch (Exception ex) { Messages.ErrLog(ex); } }
/// <summary> /// Loaded 이벤트 /// </summary> /// <param name="obj"></param> private void OnLoaded(object obj) { if (obj == null) { return; } try { mainwin = obj as MainWin; borderTop = mainwin.FindName("mainwin") as Border; // 0.컨텐트 이벤트핸들러 적용 - 화면 ContentRendered 이벤트발생시 mainwin.ContentRendered += Mainwin_ContentRendered; // 1.메뉴로딩 MenuDataInit(obj); // 2.테마일괄적용... ThemeApply.Themeapply(mainwin); // 3.즐겨찾기 stQuickMenu = mainwin.FindName("stQuickMenu") as StackPanel; QuickMnuBinding(); // 4.기타기능처리 Logs.progressunlimit = mainwin.FindName("progressunlimit") as ProgressBar; //로딩바설정 Messages.AppNotificationService = mainwin.FindName("AppNotificationService") as DevExpress.Mvvm.UI.NotificationService; //알림토스트 /* ArcGis 2D-MapView 로딩 */ //regionManager.Regions["ContentRegion"].RemoveAll(); //regionManager.RequestNavigate("ContentRegion", new Uri("Map4View", UriKind.Relative)); //regionManager.RequestNavigate("ContentRegion", new Uri("SketchOnMap", UriKind.Relative)); //regionManager.RequestNavigate("ContentRegion", new Uri("OfflineBasemapByReference", UriKind.Relative)); //regionManager.RequestNavigate("ContentRegion", new Uri("Map3View", UriKind.Relative)); //regionManager.RequestNavigate("ContentRegion", new Uri("Map2View", UriKind.Relative)); //regionManager.RequestNavigate("ContentRegion", new Uri("MapMainView", UriKind.Relative)); //메인화면 렌더링후 수행 ContentRendered //regionManager.RequestNavigate("ContentRegion", new Uri("MapArcObjView", UriKind.Relative)); //regionManager.RequestNavigate("ContentRegion", new Uri("MainWindow", UriKind.Relative)); //Messages.NotificationBox("InfoFMS", "InfoFMS에 접속하셨습니다.", "InfoFMS에 접속하셨습니다."); } catch (Exception ex) { Messages.ErrLog(ex); } }