Пример #1
0
        void DeleteImage()
        {
            string pathDirection = "";
            string ImageName     = "";

            pathDirection = SystemProperties.ReadInstructorImage();

            ImageName = string.Format("{0}{1}-{2}", txtEmployeeLastName.Text, txtEmployeeFirstName.Text, txtEmployeeID.Text);
            //picStudent.Image.d(@"" + pathDirection + ImageName + ".png");
            File.Delete(string.Format("{0}{1}", pathDirection, ImageName));
        }
Пример #2
0
        void SaveImage(bool IsSave)
        {
            string pathDirection = "";
            string ImageName     = "";

            pathDirection = SystemProperties.ReadInstructorImage();

            ImageName = string.Format("{0}{1}-{2}", txtEmployeeLastName.Text, txtEmployeeFirstName.Text, txtEmployeeID.Text);
            if (IsSave)
            {
                picInstructor.Image.Save(@"" + pathDirection + ImageName + ".png");
            }
            else
            {
                picInstructor.Image = Image.FromFile(pathDirection + ImageName + ".png");
            }
        }