コード例 #1
0
        private void OnConfirmChangePictureCommand(object obj)
        {
            if (ProfilePictureSource == null && PicturePath == null)
            {
                warningAudio.SpeakAsync("You have not selected a picture yet. Click browse to select one..");
                return;
            }

            UserImage data        = new UserImage();
            var       ImagePath   = PicturePath;
            var       ImageToByte = File.ReadAllBytes(PicturePath);

            ST.AddNewUserImage(ImagePath, ImageToByte, Students[0].StudentID);
            ST.SaveChanges();

            warningAudio.SpeakAsync("Change successfully..");
        }