public static GetInstance ( ) : |
||
return |
public OOBENetwork() { this.InitializeComponent(); OOBENetworkPageDispatcher = Window.Current.Dispatcher; NetworkInformation.NetworkStatusChanged += NetworkInformation_NetworkStatusChanged; NetworkControl.NetworkConnected += NetworkGrid_NetworkConnected; this.NavigationCacheMode = Windows.UI.Xaml.Navigation.NavigationCacheMode.Enabled; this.DataContext = LanguageManager.GetInstance(); this.Loaded += async(sender, e) => { await OOBENetworkPageDispatcher.RunAsync(CoreDispatcherPriority.Low, async() => { NetworkControl.SetupDirectConnection(); await NetworkControl.RefreshWifiListViewItemsAsync(true); }); }; }
public Settings() { this.InitializeComponent(); PreferencesListView.IsSelected = true; this.NavigationCacheMode = Windows.UI.Xaml.Navigation.NavigationCacheMode.Enabled; this.DataContext = LanguageManager.GetInstance(); this.Loaded += async(sender, e) => { await Dispatcher.RunAsync(CoreDispatcherPriority.Low, () => { SetupLanguages(); screensaverToggleSwitch.IsOn = Screensaver.IsScreensaverEnabled; }); }; Window.Current.Activated += Window_Activated; }
public TutorialContentPage() { this.InitializeComponent(); var rootFrame = Window.Current.Content as Frame; rootFrame.Navigated += RootFrame_Navigated; this.NavigationCacheMode = NavigationCacheMode.Enabled; var languageManager = LanguageManager.GetInstance(); this.DataContext = languageManager; languageManager.PropertyChanged += (sender, e) => { // If the language manager updates the // language, the current content needs to // be reloaded. if (e.PropertyName == "Item[]") { Dispatcher.RunAsync(CoreDispatcherPriority.Low, () => { LoadDocument(docName); }); } }; this.Loaded += (sender, e) => { UpdateDateTime(); timer = new DispatcherTimer(); timer.Tick += timer_Tick; timer.Interval = TimeSpan.FromSeconds(30); timer.Start(); }; this.Unloaded += (sender, e) => { timer.Stop(); timer = null; }; }
public MainPage() { this.InitializeComponent(); // This is a static public property that allows downstream pages to get a handle to the MainPage instance // in order to call methods that are in this class. Current = this; MainPageDispatcher = Window.Current.Dispatcher; NetworkInformation.NetworkStatusChanged += NetworkInformation_NetworkStatusChanged; this.NavigationCacheMode = NavigationCacheMode.Enabled; this.DataContext = LanguageManager.GetInstance(); timerInt = ThreadPoolTimer.CreatePeriodicTimer(GetStatTime, TimeSpan.FromSeconds(60)); timer = new DispatcherTimer(); timer.Tick += timer_Tick; timer.Interval = TimeSpan.FromSeconds(20); this.Loaded += async(sender, e) => { await MainPageDispatcher.RunAsync(CoreDispatcherPriority.Low, () => { UpdateBoardInfo(); UpdateNetworkInfo(); UpdateDateTime(); UpdateConnectedDevices(); timer.Start(); }); }; this.Unloaded += (sender, e) => { timer.Stop(); }; }
public TutorialMainPage() { this.InitializeComponent(); this.NavigationCacheMode = NavigationCacheMode.Enabled; this.DataContext = LanguageManager.GetInstance(); this.Loaded += (sender, e) => { UpdateDateTime(); timer = new DispatcherTimer(); timer.Tick += timer_Tick; timer.Interval = TimeSpan.FromSeconds(30); timer.Start(); }; this.Unloaded += (sender, e) => { timer.Stop(); timer = null; }; }
public MainPage() { this.InitializeComponent(); // This is a static public property that allows downstream pages to get a handle to the MainPage instance // in order to call methods that are in this class. Current = this; MainPageDispatcher = Window.Current.Dispatcher; NetworkInformation.NetworkStatusChanged += NetworkInformation_NetworkStatusChanged; OnboardingService = new OnboardingService(); this.NavigationCacheMode = NavigationCacheMode.Enabled; this.DataContext = LanguageManager.GetInstance(); this.Loaded += (sender, e) => { UpdateBoardInfo(); UpdateNetworkInfo(); UpdateDateTime(); UpdateConnectedDevices(); timer = new DispatcherTimer(); timer.Tick += timer_Tick; timer.Interval = TimeSpan.FromSeconds(30); timer.Start(); }; this.Unloaded += (sender, e) => { timer.Stop(); timer = null; }; }
public CommandLinePage() { this.InitializeComponent(); this.DataContext = LanguageManager.GetInstance(); CommandLine.PlaceholderText = String.Format(resourceLoader.GetString("CommandLinePlaceholderText"), currentDirectory); }
public TutorialHelloBlinkyPage() { this.InitializeComponent(); switch (DeviceTypeInformation.Type) { case DeviceTypes.RPI2: LED_PIN = 47; // onboard LED break; case DeviceTypes.RPI3: LED_PIN = 5; break; case DeviceTypes.DB410: LED_PIN = 115; break; case DeviceTypes.PINE64: LED_PIN = 5; break; } var rootFrame = Window.Current.Content as Frame; rootFrame.Navigated += RootFrame_Navigated; Unloaded += MainPage_Unloaded; this.NavigationCacheMode = NavigationCacheMode.Enabled; this.DataContext = LanguageManager.GetInstance(); this.Loaded += (sender, e) => { UpdateDateTime(); timer = new DispatcherTimer(); timer.Tick += timer_Tick; timer.Interval = TimeSpan.FromSeconds(30); timer.Start(); blinkyTimer = new DispatcherTimer(); blinkyTimer.Interval = TimeSpan.FromMilliseconds(500); blinkyTimer.Tick += Timer_Tick; loader = new Windows.ApplicationModel.Resources.ResourceLoader(); BlinkyStartStop.Content = loader.GetString("BlinkyStart"); switch (DeviceTypeInformation.Type) { case DeviceTypes.RPI2: GpioPinInstructions.Text = ""; break; case DeviceTypes.RPI3: GpioPinInstructions.Text = loader.GetString("TutorialBlinkyBody6Text_Rpi3"); break; case DeviceTypes.DB410: GpioPinInstructions.Text = loader.GetString("TutorialBlinkyBody6Text_Dragonboard"); break; case DeviceTypes.PINE64: GpioPinInstructions.Text = loader.GetString("TutorialBlinkBody6Text_PINE64"); blinkyBody3.Text = loader.GetString("TutorialBlinkBody6Text_PINE64"); gpioGuide.Visibility = Visibility.Visible; break; } }; }
public NetworkListControl() { this.InitializeComponent(); this.DataContext = LanguageManager.GetInstance(); }