예제 #1
0
        private void ButtonMenuAllPeople_Click(object sender, RoutedEventArgs e)
        {
            AllPeoplePageView apin = new AllPeoplePageView();

            MenuPage.Content = apin;
            lblTitle.Content = "ALL PEOPLE";
        }
예제 #2
0
        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";
            }
        }
예제 #3
0
 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);
 }
예제 #4
0
        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);
        }