public MainPage() { this.InitializeComponent(); NavigationCacheMode = NavigationCacheMode.Enabled; // Register for the window resize event Window.Current.SizeChanged += WindowSizeChanged; // Source for WebControl || XAML songInformation.Source = new Uri("ms-appx-web:///HTML code/SongInformation.html"); previousSongInformation.Source = new Uri("ms-appx-web:///HTML code/PreviousSongs_Larger.html"); MenuWebView.Navigate(new Uri("http://vocaloidradio.com/")); currentPage.Text = "Vocaloid Radio"; // Hook up app to system transport controls. mediaControl = SystemMediaTransportControls.GetForCurrentView(); mediaControl.ButtonPressed += medialControl_ButtonPressed; // Register to handle the following system transpot control buttons. mediaControl.IsPlayEnabled = true; mediaControl.IsPauseEnabled = true; mediaControl.IsFastForwardEnabled = false; mediaControl.IsNextEnabled = false; mediaControl.IsPreviousEnabled = false; mediaControl.IsRewindEnabled = false; mediaControl.IsChannelDownEnabled = false; mediaControl.IsChannelUpEnabled = false; mediaControl.IsRecordEnabled = false; }
// Vocaloid Website Control private void WebsiteButton_Click(object sender, RoutedEventArgs e) { try { MenuWebView.Navigate(new Uri("http://vocaloidradio.com/?m=1")); currentPage.Text = "Vocaloid Radio"; } catch (Exception) { currentPage.Text = "Fatal Web View Error"; } }
// Developer Blog Control private void AppBlogButton_Click(object sender, RoutedEventArgs e) { try { MenuWebView.Navigate(new Uri("http://vocaloidradioapp.blogspot.com/p/windows-version.html?m=1")); currentPage.Text = "App Blog"; } catch (Exception) { currentPage.Text = "Fatal Web View Error"; } }
// Featured Control private void FeaturedPageButton_Click(object sender, RoutedEventArgs e) { try { MenuWebView.Navigate(new Uri("http://vocaloidradioapp.blogspot.com/2014/06/vocaloid-radio-featured-pages.html?m=1")); currentPage.Text = "Featured Pages"; } catch (Exception) { currentPage.Text = "Fatal Web View Error"; } }
// Technical Control private void technicalButton_Click(object sender, RoutedEventArgs e) { try { MenuWebView.Navigate(new Uri("http://vocaloidradioapp.blogspot.com/2014/06/vocaloid-radio-windows-app-technical.html?m=1")); currentPage.Text = "Technical Info"; } catch (Exception) { currentPage.Text = "Fatal Web View Error"; } }
// Privacy Control private void privacyButton_Click(object sender, RoutedEventArgs e) { try { MenuWebView.Navigate(new Uri("http://vocaloidradioapp.blogspot.com/2014/05/all-data-collected-in-this-app-is.html?m=1")); currentPage.Text = "Privacy Info"; } catch (Exception) { currentPage.Text = "Fatal Web View Error"; } }
// Network Control private void networkButton_Click(object sender, RoutedEventArgs e) { try { MenuWebView.Navigate(new Uri("http://vocaloidradioapp.blogspot.com/2014/05/vocaloid-radio-network-information.html?m=1")); currentPage.Text = "Network Info"; } catch (Exception) { currentPage.Text = "Fatal Web View Error"; } }
///All code Below controls the Left SubGrid/// #region LeftColumnControl // License Control private void rssButton_Click(object sender, RoutedEventArgs e) { try { MenuWebView.Navigate(new Uri("ms-appx-web:///HTML code/RSSFeed.html")); currentPage.Text = "RSS Feed"; } catch (Exception) { currentPage.Text = "Fatal Web View Error"; } }