示例#1
0
        /// <summary>
        /// Method that is called when a new date picker dialog fragment is being opened
        /// </summary>
        /// <param name="onDateSelected"></param>
        /// <returns></returns>
        public static DialogDate NewInstance(Action <DateTime> onDateSelected)
        {
            DialogDate frag = new DialogDate();

            frag.dateSelectedHandler = onDateSelected;
            return(frag);
        }
示例#2
0
        /// <summary>
        /// Event called when the set date button is clicked. Opens up a date picker dialog
        /// fragment for user to input their date of birth.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDate_Click(object sender, EventArgs e)
        {
            DialogDate dialogfrag = DialogDate.NewInstance(delegate(DateTime date)
            {
                birthday         = date.ToString("dd/MM/yyyy");
                displayDate.Text = birthday;
                day   = date.Day;
                month = date.Month;
                year  = date.Year;
            });

            dialogfrag.Show(FragmentManager, DialogDate.tag);
        }