public MainPage(IBlogReader BlogReader) { InitializeComponent(); // poor mans IoC BlogReader.IfNullDoThis(() => BlogReader = Infrastructure.BlogReader()); blogReader = BlogReader; panorama.SetBackgroundForTheme(); Loaded += (s, e) => { if (!NetworkInterface.GetIsNetworkAvailable() || NetworkInterface.NetworkInterfaceType == NetworkInterfaceType.None) { MessageBox.Show("This application requires a network connection to function properly. Please fix your internet connection and re-launch the app.", "Network Error", MessageBoxButton.OK); } else { this.DataContext = this; //search section -- progress bar control performanceProgressBar.Visibility = Visibility.Collapsed; //category section -- progress bar control performanceProgressBar2.Visibility = Visibility.Collapsed; //load recent post // UserInfo then RecientFeed then Categories ReadUserinfo(() => GetRecentRssFeed(() => ReadCats(null))); } }; }
public MainPage(IBlogReader BlogReader) { InitializeComponent(); // poor mans IoC BlogReader.IfNullDoThis(() => BlogReader = Infrastructure.BlogReader()); blogReader = BlogReader; panorama.SetBackgroundForTheme(); Loaded += (s, e) => { if (!NetworkInterface.GetIsNetworkAvailable() || NetworkInterface.NetworkInterfaceType == NetworkInterfaceType.None) { MessageBox.Show("This application requires a network connection to function properly. Please fix your internet connection and re-launch the app.", "Network Error", MessageBoxButton.OK); } else { this.DataContext = this; //search section -- progress bar control performanceProgressBar.Visibility = Visibility.Collapsed; //category section -- progress bar control performanceProgressBar2.Visibility = Visibility.Collapsed; //load recent post // UserInfo then RecientFeed then Categories ReadUserinfo(() => GetRecientRssFeed(() => ReadCats(null))); } }; }
public DetailsPage(IBlogReader BlogReader) { // Poor man's DI BlogReader.IfNullDoThis(() => BlogReader = Infrastructure.BlogReader()); blogReader = BlogReader; InitializeComponent(); //hidden progress bar control -- used in add comment section performanceProgressBar3.Visibility = Visibility.Collapsed; app = ((IBlogApp)Application.Current).AppValues; pivot.SetBackgroundForTheme(); }