Ejemplo n.º 1
0
        public MainPage()
        {
            this.InitializeComponent();

            FrameLeft.Navigate(typeof(WatchFacesPage));
            FrameRight.Navigate(typeof(ConnectPage));

            /*if (IsMobile)
             * {
             *  MySplitView.CompactPaneLength = 0;
             *  FrameRight.Visibility = Visibility.Collapsed;
             *  MainGrid.ColumnDefinitions.RemoveAt(1);
             *  btnConnect.Visibility = Visibility.Visible;
             * }
             * else
             * {
             *  FrameRight.Navigate(typeof(ConnectPage));
             *  //FrameRight.Navigate(typeof(JavascriptPage));
             *  btnConnect.Visibility = Visibility.Collapsed;
             * }*/

            _vmBinder = vmBinder.GetInstance();
            // _vmBinder.PageWatchApp = true;

            Connector.PebbleConnector _pc = Connector.PebbleConnector.GetInstance();
            _pc.WatchItems.WatchItemListChanged += _vmBinder.WatchFaces.WatchItemListChanged;
            _pc.WatchItems.WatchItemListChanged += _vmBinder.WatchApps.WatchItemListChanged;
            _pc.WatchItems.Load();

            DataContext = _vmBinder;

            InitialiseStore();
        }
Ejemplo n.º 2
0
 private void ScreenSize_CurrentStateChanged(object sender, VisualStateChangedEventArgs e)
 {
     if (e.NewState.Name == "Small")
     {
         FrameRight.Content = null;
     }
     if (e.NewState.Name == "Wide")
     {
         FrameRight.Navigate(typeof(ConnectPage));
     }
 }