public App(AppSetup setup) { InitializeComponent(); // AppDomain.CurrentDomain.UnhandledException += (sender, args) => { // System.Exception ex = (System.Exception)args.ExceptionObject; // Console.WriteLine(ex); // }; AppContainer.Container = setup.CreateContainer(); //MainPage = new MainPage(); //MainPage = new NavigationPage(new ItemsPage()); //MainPage = new ValidationPage(); //MainPage = new NavigationPage (new FirstPage()); //MainPage = new AppShell(); MainPage = new TemperaturePage(); }
private void tvwMenu_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs <object> e) { PermissionNode tag = (PermissionNode)tvwMenu.SelectedItem; if (tag == null) { return; } if ((tag != this.lastSelectdChildNode) && (this.lastSelectdChildNode != null)) { //this.lastSelectdChildNode.Button.Background = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)); } this.lastSelectdChildNode = tag; //tag.Button.Background = new ImageBrush(new BitmapImage(new Uri("pack://application:,,,/TengDa.UI;component/image/menu_child_button_bg.png", UriKind.Absolute)));//state_abnormal.png switch (tag.Code) { case "Situation.Standby": MainMonitorPage MonitorPage = new MainMonitorPage(); NavigatePage(tag.Text, MonitorPage); break; //case "Situation.Standby": // this.mainPage.Navigate(new Uri("BakingPage.xaml", UriKind.Relative)); // break; case "UserManager.Personal": PersonalInfoPage page = new PersonalInfoPage(); NavigatePage(tag.Text, page); //this.mainPage.Navigate(new Uri("Views/PersonalInfoPage.xaml", UriKind.Relative)); break; case "UserManager.User": UserManagerPage userPage = new UserManagerPage(); NavigatePage(tag.Text, userPage); //this.mainPage.Navigate(new Uri("Views/UserManagerPage.xaml", UriKind.Relative)); break; case "UserManager.Role": RoleManagerPage RolePage = new RoleManagerPage(); NavigatePage(tag.Text, RolePage); break; case "ChuckingManager.ChuckingInfoPage": ChuckingInfoPage ChuckingPage = new ChuckingInfoPage(); NavigatePage(tag.Text, ChuckingPage); break; case "MESManager.MESInfoPage": MESInfoPage MESPage = new MESInfoPage(); NavigatePage(tag.Text, MESPage); break; case "MonitorView.TemperaturePage": TemperaturePage Tempe = new TemperaturePage(); NavigatePage(tag.Text, Tempe); break; case "MonitorView.RunLogPage": RunLogPage log = new RunLogPage(); NavigatePage(tag.Text, log); break; case "MonitorView.HistoryTemPage": HistoryTemPage htp = new HistoryTemPage(); NavigatePage(tag.Text, htp); break; case "MonitorView.HistoryErrorPage": HistoryErrorPage hep = new HistoryErrorPage(); NavigatePage(tag.Text, hep); break; case "MonitorView.MANUDebugging": MANUDebuggingPage manud = new MANUDebuggingPage(); NavigatePage(tag.Text, manud); break; } popusBottom.IsOpen = false; }