Exemplo n.º 1
0
        public static Date GetExifDateTime(string filepath)
        {
            ExifInterface exif;

            try
            {
                exif = NewInstance(filepath);
            }
            catch //(IOException var5)
            {
                return(null);
            }

            string date = exif.GetAttribute("DateTime");

            if (TextUtils.IsEmpty(date))
            {
                return(null);
            }
            else
            {
                try
                {
                    var e = new SimpleDateFormat("yyyy:MM:dd HH:mm:ss")
                    {
                        TimeZone = TimeZone.GetTimeZone("UTC")
                    };
                    return(e.Parse(date));
                }
                catch// (ParseException var4)
                {
                    return(null);
                }
            }
        }
Exemplo n.º 2
0
        protected override BaseDialogFragment.Builder Build(BaseDialogFragment.Builder builder)
        {
            builder     = base.Build(builder);
            mTimePicker = (TimePicker)LayoutInflater.From(Activity).Inflate(Resource.Layout.sdl_timepicker, null);
            mTimePicker.SetIs24HourView((Java.Lang.Boolean)Arguments.GetBoolean(ARG_24H));
            builder.SetView(mTimePicker);

            TimeZone zone = TimeZone.GetTimeZone(Arguments.GetString(ARG_ZONE));

            mCalendar = Calendar.GetInstance(zone);
            mCalendar.TimeInMillis = Arguments.GetLong(ARG_DATE, JavaSystem.CurrentTimeMillis());

            mTimePicker.CurrentHour   = (Java.Lang.Integer)mCalendar.Get(CalendarField.HourOfDay);
            mTimePicker.CurrentMinute = (Java.Lang.Integer)mCalendar.Get(CalendarField.Minute);
            return(builder);
        }