/// <summary> /// 將自我介紹的資訊顯示到畫面上 /// </summary> private void loadSaveIntroduction() { IntroductionOBJ introductionOBJ = FileHelper.processRead(); nameTextBox.Text = introductionOBJ.name; homeTownTextBox.Text = introductionOBJ.homeTown; birthdate_YearBox.Text = introductionOBJ.birthDate.Year.ToString(); birthdate_MonthBox.Text = introductionOBJ.birthDate.Month.ToString(); birthdate_DayBox.Text = introductionOBJ.birthDate.Day.ToString(); if (introductionOBJ.photo != null) { photoBox.Image = PhotoHelper.bytesToImage(introductionOBJ.photo); } }
private static void saveImageToFile(byte[] imageByte) { Image newImage = PhotoHelper.bytesToImage(imageByte); newImage.Save(imagePath, ImageFormat.Jpeg); }