private void ButtonMenuAllPeople_Click(object sender, RoutedEventArgs e) { AllPeoplePageView apin = new AllPeoplePageView(); MenuPage.Content = apin; lblTitle.Content = "ALL PEOPLE"; }
public AddNewRef(string id, string name, string description, ImageSource imageSource, DetectedPerson detectedPerson, AllPeoplePageView allPeoplePageView, bool isNew) { InitializeComponent(); this.isNew = isNew; if (!isNew) { lblTitle.Content = "UPDATE PERSON"; buttonSubmit.Content = "UPDATE"; this.detectedPerson = detectedPerson; this.id = id; this.name = name; this.description = description; this.imageSource = imageSource; txtId.Text = id.Split('.')[0]; txtId.IsEnabled = false; txtName.Text = name; txtDescription.Text = description; imgUploadImage.Source = imageSource; } else { this.allPeoplePageView = allPeoplePageView; lblTitle.Content = "NEW PERSON"; buttonSubmit.Content = "SUBMIT"; } }
private void InitUserControls() { home = new HomePageView(this); peopleInPageView = new PeopleInPageView(); allPeoplePageView = new AllPeoplePageView(this); readers = new ReadersPage(); cameraView = new CameraView(this); admins = new AdminsPage(adminId, this); adminProfile = new AdminProfile(adminId, this, admins); }
public async void DeleteRefPerson(string id, AllPeoplePageView allPeoplePageView) { ProgressDialogController controller = await this.ShowProgressAsync("Please wait...", ""); controller.SetIndeterminate(); controller.SetCancelable(false); controller.SetMessage("Deleting database record"); await Task.Run(() => Models.Dynamodb.DeleteItem(id, Models.MyAWSConfigs.RefPersonsDBTableName)); controller.SetMessage("Deleting image"); await Task.Run(() => Models.S3Bucket.DeleteFile(id, Models.MyAWSConfigs.RefImagesBucketName)); await controller.CloseAsync(); allPeoplePageView.LoadPersonsData().ConfigureAwait(false); notifyIcon.Visible = true; notifyIcon.ShowBalloonTip(1000, "Deleted", "Person deleted Successfully", System.Windows.Forms.ToolTipIcon.Info); }