Beispiel #1
0
 public static void Clear(InfoPhotos inf)
 {
     inf.Photo                  = null;
     inf.PhotoPassport          = null;
     inf.PhotoSchoolCertificate = null;
     inf.PhotoBirthCertificate  = null;
     inf.NumberSelectedPhoto    = 1;
 }
Beispiel #2
0
        public static BitmapImage GetBitmapNumber(InfoPhotos inf)
        {
            switch (inf.NumberSelectedPhoto)
            {
            case 1:
                return(inf.Photo);

            case 2:
                return(inf.PhotoPassport);

            case 3:
                return(inf.PhotoSchoolCertificate);

            case 4:
                return(inf.PhotoBirthCertificate);
            }
            return(null);
        }
Beispiel #3
0
        public static string GetNameSelectedPhoto(InfoPhotos inf)
        {
            switch (inf.NumberSelectedPhoto)
            {
            case 1:
                return("Фотография");

            case 2:
                return("Паспорт");

            case 3:
                return("Аттестат");

            case 4:
                return("Свидетельство о рождении");
            }
            return(null);
        }
Beispiel #4
0
        public static BitmapImage SelectPhoto(bool next, bool student, InfoPhotos inf)
        {
            if (next)
            {
                if (student)
                {
                    if (inf.NumberSelectedPhoto == 4)
                    {
                        inf.NumberSelectedPhoto = 1;
                    }
                    else
                    {
                        inf.NumberSelectedPhoto += 1;
                    }
                }
                else
                {
                    if (inf.NumberSelectedPhoto == 2)
                    {
                        inf.NumberSelectedPhoto = 1;
                    }
                    else
                    {
                        inf.NumberSelectedPhoto += 1;
                    }
                }
            }
            else
            {
                if (student)
                {
                    if (inf.NumberSelectedPhoto == 1)
                    {
                        inf.NumberSelectedPhoto = 4;
                    }
                    else
                    {
                        inf.NumberSelectedPhoto -= 1;
                    }
                }
                else
                {
                    if (inf.NumberSelectedPhoto == 1)
                    {
                        inf.NumberSelectedPhoto = 2;
                    }
                    else
                    {
                        inf.NumberSelectedPhoto -= 1;
                    }
                }
            }

            switch (inf.NumberSelectedPhoto)
            {
            case 1:
                return(inf.Photo);

            case 2:
                return(inf.PhotoPassport);

            case 3:
                return(inf.PhotoSchoolCertificate);

            case 4:
                return(inf.PhotoBirthCertificate);
            }
            return(null);
        }
Beispiel #5
0
 public static BitmapImage Default(InfoPhotos inf)
 {
     inf.NumberSelectedPhoto = 1;
     return(inf.Photo);
 }