コード例 #1
0
        public MainPage()
        {
            this.InitializeComponent();
            Library.UI.DashboardButton.AddBorder(Border_Favorites);
            Library.UI.DashboardButton.AddBorder(Border_Geyser);
            Library.UI.DashboardButton.AddBorder(Border_Home);
            Library.UI.DashboardButton.AddBorder(Border_Rooms);
            Library.UI.DashboardButton.AddBorder(Border_Settings);
            Library.UI.DashboardButton.AddBorder(Border_WaterPump);

            Frame_MainFrame.Navigate(_HomePage.GetType());

            // Test_Save();
            Test_Load();

            _MainFrame = Frame_MainFrame;
        }
コード例 #2
0
 private void Border_PointerReleased(object sender, PointerRoutedEventArgs e)
 {
     if (sender.Equals(Border_Favorites))
     {
         Library.UI.DashboardButton.RaiseBorder(Border_Favorites);
     }
     if (sender.Equals(Border_Geyser))
     {
         Library.UI.DashboardButton.RaiseBorder(Border_Geyser);
     }
     if (sender.Equals(Border_Home))
     {
         Library.UI.DashboardButton.RaiseBorder(Border_Home);
         Frame_MainFrame.Navigate(_HomePage.GetType());
     }
     if (sender.Equals(Border_Rooms))
     {
         if (_RoomPage == null)
         {
             _RoomPage = new Pages.Page_Rooms();
         }
         Library.UI.DashboardButton.RaiseBorder(Border_Rooms);
         Frame_MainFrame.Navigate(_RoomPage.GetType());
     }
     if (sender.Equals(Border_Settings))
     {
         if (_Page_Configuration == null)
         {
             _Page_Configuration = new Pages.Page_Configuration();
         }
         Library.UI.DashboardButton.RaiseBorder(Border_Settings);
         Frame_MainFrame.Navigate(_Page_Configuration.GetType());
     }
     if (sender.Equals(Border_WaterPump))
     {
         Library.UI.DashboardButton.RaiseBorder(Border_WaterPump);
     }
 }