private void intializeControls(C4H_Webservice.CharityProfile Profile) { //Profile this.regnumber_label.Text = Profile.RegNumber; this.fullname_label.Text = Profile.FullName; //Category this.type_label.Text = Profile.Category.Name; this.description_label.Text = Profile.Category.Description; this.designation_label.Text = Profile.Designation.Description; //Contact Information this.email_label.Text = Profile.Email; this.phone_label.Text = Profile.Phone; this.website_label.Text = Profile.Website; //Address this.province_label.Text = Profile.Province; this.city_label.Text = Profile.City; this.address1_label.Text = Profile.Address1; this.address2_label.Text = Profile.Address2; this.postalcode_label.Text = Profile.PostalCode; //Check if followed if (FollowedCharities.CheckIfAddedToCart(Profile.UserID)) { Follow_Button.IsEnabled = false; Follow_Button.Content = "Followed"; } }
private async void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e) { //Load locally saved authentication information if exists await SecurityManager.LoadLocalAuthenticaionInformation(); await FollowedCharities.LoadLocalWatchlistInformation(); //Wait 2 seconds then navigate to the home page Thread.Sleep(2000); NavigationService.Navigate(new Uri("/Pages/MainPage.xaml", UriKind.Relative)); }
private void Follow_Button_Click(object sender, RoutedEventArgs e) { if (!SecurityManager.CheckIfSignedIn()) { MessageBox.Show("Please sign in first."); } else { FollowedCharities.AddToCart(SearchManager.curretnSearchItem); intializeControls(SearchManager.curretnSearchItem); } }
//Welcome private void initializeWelcomeMenu() { List <MenuListItem> menu = new List <MenuListItem>(); menu.Add(new MenuListItem { ID = 1, Text = "followed charities " + (FollowedCharities.GetFollowedCharitiesCount() == 0 ? "" : "(" + FollowedCharities.GetFollowedCharitiesCount().ToString("N0") + ")"), Image = "/Assets/Menu/cart.png" }); menu.Add(new MenuListItem { ID = 2, Text = "notifications", Image = "/Assets/Menu/notifications.png" }); menu.Add(new MenuListItem { ID = 3, Text = "your account", Image = "/Assets/Menu/account.png" }); this.menu_listselector.ItemsSource = menu; }