protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); try { if (e.NavigationMode == NavigationMode.New) { dues = new DuesPortableModel(); //(App.Current as App).SecondPageObject = null; progressIndicator = SystemTray.ProgressIndicator; progressIndicator = new ProgressIndicator(); SystemTray.SetProgressIndicator(this, progressIndicator); progressIndicator.IsIndeterminate = true; progressIndicator.Text = "Pulling Dues Settings..."; duesId = new Guid(this.NavigationContext.QueryString["dmid"]); if (SettingsMobile.Instance.User == null) { SqlFactory fact = new SqlFactory(); SettingsMobile.Instance.User = fact.GetProfile(); } PullTopic(); } } catch (Exception exception) { ErrorHandler.Save(exception, MobileTypeEnum.WP8); } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); try { ev = new CalendarEventPortable(); var ob = (App.Current as App).SecondPageObject; if (ob != null) ev = (CalendarEventPortable)ob; (App.Current as App).SecondPageObject = null; progressIndicator = SystemTray.ProgressIndicator; progressIndicator = new ProgressIndicator(); SystemTray.SetProgressIndicator(this, progressIndicator); progressIndicator.IsIndeterminate = true; progressIndicator.Text = "Saving Checkin..."; if (SettingsMobile.Instance.User == null) { SqlFactory fact = new SqlFactory(); SettingsMobile.Instance.User = fact.GetProfile(); } CheckInTypeSelect.ItemsSource = CalendarEventPointTypeEnumHelper.CalendarEventPointTypes; ev.CalendarItemId = new Guid(this.NavigationContext.QueryString["evId"]); ev.CalendarId = new Guid(this.NavigationContext.QueryString["calId"]); ev.Name = this.NavigationContext.QueryString["name"]; if (!String.IsNullOrEmpty(ev.Name)) EventName.Text = ev.Name; } catch (Exception exception) { ErrorHandler.Save(exception, MobileTypeEnum.WP8); } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); try { conversation = new ConversationModel(); //(App.Current as App).SecondPageObject = null; progressIndicator = SystemTray.ProgressIndicator; progressIndicator = new ProgressIndicator(); SystemTray.SetProgressIndicator(this, progressIndicator); progressIndicator.IsIndeterminate = true; progressIndicator.Text = "Pulling Messages..."; if (SettingsMobile.Instance.User == null) { SqlFactory fact = new SqlFactory(); SettingsMobile.Instance.User = fact.GetProfile(); } conversation.GroupMessageId = Convert.ToInt64(this.NavigationContext.QueryString["mid"]); PullTopic(); _timer = new DispatcherTimer(); _timer.Interval = TimeSpan.FromSeconds(20); _timer.Tick += (s, eee) => Tick(); _timer.Start(); } catch (Exception exception) { ErrorHandler.Save(exception, MobileTypeEnum.WP8); } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); try { duesModel = new DuesPortableModel(); //(App.Current as App).SecondPageObject = null; progressIndicator = SystemTray.ProgressIndicator; progressIndicator = new ProgressIndicator(); SystemTray.SetProgressIndicator(this, progressIndicator); progressIndicator.IsIndeterminate = true; progressIndicator.Text = "Pulling Dues..."; if (SettingsMobile.Instance.User == null) { SqlFactory fact = new SqlFactory(); SettingsMobile.Instance.User = fact.GetProfile(); } if (SettingsMobile.Instance.AccountSettings.IsTreasurer) { ApplicationBar.IsVisible = true; } } catch (Exception exception) { ErrorHandler.Save(exception, MobileTypeEnum.WP8); } PullDues(); }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); try { members = new ObservableCollection<MemberDisplayAPI>(); //(App.Current as App).SecondPageObject = null; progressIndicator = SystemTray.ProgressIndicator; progressIndicator = new ProgressIndicator(); SystemTray.SetProgressIndicator(this, progressIndicator); progressIndicator.IsIndeterminate = true; progressIndicator.Text = "Pulling Members..."; if (SettingsMobile.Instance.User == null) { SqlFactory fact = new SqlFactory(); SettingsMobile.Instance.User = fact.GetProfile(); } } catch (Exception exception) { ErrorHandler.Save(exception, MobileTypeEnum.WP8); } PullMembers(); }
public Login() { InitializeComponent(); try { progressIndicator = SystemTray.ProgressIndicator; progressIndicator = new ProgressIndicator(); SystemTray.SetProgressIndicator(this, progressIndicator); progressIndicator.IsIndeterminate = true; progressIndicator.Text = "Logging In..."; SqlFactory fact = new SqlFactory(); var user = fact.GetProfile(); if (user != null) { EmailAddress.Text = user.UserName; } } catch (Exception exception) { ErrorHandler.Save(exception, MobileTypeEnum.WP8); } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); try { Voting = new VotingClass(); //(App.Current as App).SecondPageObject = null; progressIndicator = SystemTray.ProgressIndicator; progressIndicator = new ProgressIndicator(); SystemTray.SetProgressIndicator(this, progressIndicator); progressIndicator.IsIndeterminate = true; progressIndicator.Text = "Pulling Poll..."; if (SettingsMobile.Instance.User == null) { SqlFactory fact = new SqlFactory(); SettingsMobile.Instance.User = fact.GetProfile(); } Voting.VotingId = Convert.ToInt64(this.NavigationContext.QueryString["pid"]); PullTopic(); } catch (Exception exception) { ErrorHandler.Save(exception, MobileTypeEnum.WP8); } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); try { if (e.NavigationMode == NavigationMode.New) { calendarModel = new CalendarEventPortable(); //(App.Current as App).SecondPageObject = null; progressIndicator = SystemTray.ProgressIndicator; progressIndicator = new ProgressIndicator(); SystemTray.SetProgressIndicator(this, progressIndicator); progressIndicator.IsIndeterminate = true; progressIndicator.Text = "Pulling Info..."; if (SettingsMobile.Instance.User == null) { SqlFactory fact = new SqlFactory(); SettingsMobile.Instance.User = fact.GetProfile(); } StartTime.Value = new DateTime(DateTime.UtcNow.Year, DateTime.UtcNow.Month, DateTime.UtcNow.Day, DateTime.UtcNow.Hour, 0, 0); EndTime.Value = new DateTime(DateTime.UtcNow.Year, DateTime.UtcNow.Month, DateTime.UtcNow.Day, DateTime.UtcNow.Hour, 0, 0); calendarModel.CalendarId = SettingsMobile.Instance.AccountSettings.CalendarId; calendarModel.MemberId = SettingsMobile.Instance.User.MemberId; calendarModel.UserId = SettingsMobile.Instance.User.LoginId; LoadInitialData(); } } catch (Exception exception) { ErrorHandler.Save(exception, MobileTypeEnum.WP8); } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); try { dues = new Portable.Classes.Controls.Dues.DuesReceipt(); progressIndicator = SystemTray.ProgressIndicator; progressIndicator = new ProgressIndicator(); SystemTray.SetProgressIndicator(this, progressIndicator); progressIndicator.IsIndeterminate = true; progressIndicator.Text = "Getting Receipt..."; if (SettingsMobile.Instance.User == null) { SqlFactory fact = new SqlFactory(); SettingsMobile.Instance.User = fact.GetProfile(); } invoiceId = new Guid(this.NavigationContext.QueryString["ivId"]); PullTopic(); } catch (Exception exception) { ErrorHandler.Save(exception, MobileTypeEnum.WP8); } }
public MainPage() { InitializeComponent(); loadFeedButton_Click(); SqlFactory fact = new SqlFactory(); SettingsMobile.Instance.User = fact.GetProfile(); LoadPushNotifications(); }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); try { SelectedIds = new ObservableCollection<NameIdModel>(); Members = new List<MemberDisplayModel>(); Groups = new List<LeagueGroupModel>(); //(App.Current as App).SecondPageObject = null; progressIndicator = SystemTray.ProgressIndicator; progressIndicator = new ProgressIndicator(); SystemTray.SetProgressIndicator(this, progressIndicator); progressIndicator.IsIndeterminate = true; progressIndicator.Text = "Pulling Members..."; if (SettingsMobile.Instance.User == null) { SqlFactory fact = new SqlFactory(); SettingsMobile.Instance.User = fact.GetProfile(); } var check = this.NavigationContext.QueryString.Where(x => x.Key == "g").FirstOrDefault(); if (check.Value == "off") { areGroupsOff = true; Pivot.Items.Remove(Pivot.Items.Single(p => ((PivotItem)p).Name == "groupPivotItem")); } if ((App.Current as App).SecondPageObject != null) SelectedIds = (ObservableCollection<NameIdModel>)(App.Current as App).SecondPageObject; PullGroups(); } catch (Exception exception) { ErrorHandler.Save(exception, MobileTypeEnum.WP8); } }
public Signup() { InitializeComponent(); try { progressIndicator = SystemTray.ProgressIndicator; progressIndicator = new ProgressIndicator(); SystemTray.SetProgressIndicator(this, progressIndicator); progressIndicator.IsIndeterminate = true; progressIndicator.Text = "Signing Up..."; SqlFactory fact = new SqlFactory(); var user = fact.GetProfile(); GenderSelect.ItemsSource = GenderHelper.GenderTypes; PositionSelect.ItemsSource = PositionHelper.PositionTypes; } catch (Exception exception) { ErrorHandler.Save(exception, MobileTypeEnum.WP8); } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); try { if (e.NavigationMode == NavigationMode.New) { calendarModel = new CalendarEventPortable(); //(App.Current as App).SecondPageObject = null; progressIndicator = SystemTray.ProgressIndicator; progressIndicator = new ProgressIndicator(); SystemTray.SetProgressIndicator(this, progressIndicator); progressIndicator.IsIndeterminate = true; progressIndicator.Text = "Pulling Event..."; if (SettingsMobile.Instance.User == null) { SqlFactory fact = new SqlFactory(); SettingsMobile.Instance.User = fact.GetProfile(); } //if (SettingsMobile.Instance.AccountSettings.IsEventsCoordinatorOrBetter) //{ // ApplicationBar.IsVisible = true; //} calendarModel.CalendarItemId = new Guid(this.NavigationContext.QueryString["evId"]); PullDues(); } } catch (Exception exception) { ErrorHandler.Save(exception, MobileTypeEnum.WP8); } }
private void MyLeague_Click(object sender, RoutedEventArgs e) { try { SqlFactory fact = new SqlFactory(); var profile = fact.GetProfile(); if (profile == null || profile.LastMobileLoginDate < DateTime.UtcNow.AddDays(-30)) NavigationService.Navigate(new Uri("/View/Account/Login.xaml", UriKind.Relative)); else NavigationService.Navigate(new Uri("/View/MyLeague/MyLeague.xaml", UriKind.Relative)); } catch (Exception exception) { ErrorHandler.Save(exception, MobileTypeEnum.WP8); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedFrom(e); try { var currentObject = (App.Current as App).SecondPageObject; if (currentObject != null) { if (currentObject.GetType() == typeof(VotingQuestionClass)) { var quest = ((VotingQuestionClass)currentObject); var tempQuest = Questions.Where(x => x.QuestionId == quest.QuestionId).FirstOrDefault(); if (tempQuest == null) { Voting.Questions.Add(quest); Questions.Add(quest); } else { if (quest.IsDeleted) { Questions.Remove(tempQuest); } else { int index = Questions.IndexOf(tempQuest); Questions.Remove(tempQuest); Questions.Insert(index, quest); QuestionList.ItemsSource = null; QuestionList.ItemsSource = Questions; } } } else if (currentObject.GetType() == typeof(ObservableCollection<NameIdModel>)) Names = ((ObservableCollection<NameIdModel>)currentObject); } else { Voting = new VotingClass(); Questions = new TrulyObservableCollection<VotingQuestionClass>(); QuestionList.ItemsSource = Questions; RecipientsList.ItemsSource = Names; progressIndicator = SystemTray.ProgressIndicator; progressIndicator = new ProgressIndicator(); SystemTray.SetProgressIndicator(this, progressIndicator); progressIndicator.IsIndeterminate = true; progressIndicator.Text = "Pulling Poll..."; if (SettingsMobile.Instance.User == null) { SqlFactory fact = new SqlFactory(); SettingsMobile.Instance.User = fact.GetProfile(); } Voting.VotingId = Convert.ToInt64(this.NavigationContext.QueryString["pid"]); PullTopic(); } (App.Current as App).SecondPageObject = null; } catch (Exception exception) { ErrorHandler.Save(exception, MobileTypeEnum.WP8); } }