Ejemplo n.º 1
0
        public static DatePickerFragment NewInstance(Action <DateTime> onDateSelected)
        {
            DatePickerFragment frag = new DatePickerFragment();

            frag._dateSelectedHandler = onDateSelected;
            return(frag);
        }
Ejemplo n.º 2
0
        //on project start click
        private void ProjectStart_Click(object sender, EventArgs e)
        {
            DatePickerFragment dpf = new DatePickerFragment(DateTime.Now);

            DatePickerFragment frag = DatePickerFragment.NewInstance(delegate(DateTime time)
            {
                projectStart.Text = time.ToShortDateString();
            });

            frag.Show(FragmentManager, DatePickerFragment.TAG);
        }
Ejemplo n.º 3
0
        //picker goal deadline
        private void DteGoalDeadline_Click(object sender, EventArgs e)
        {
            DatePickerFragment dpf = new DatePickerFragment(DateTime.Parse(dteGoalDeadline.Text));

            DatePickerFragment frag = DatePickerFragment.NewInstance(delegate(DateTime time)
            {
                dteGoalDeadline.Text = time.ToShortDateString();
            });

            frag.Show(FragmentManager, DatePickerFragment.TAG);
        }
        //shopping date click
        private void ShoppingDate_Click(object sender, EventArgs e)
        {
            DBHelper dbh = new DBHelper();

            string[] values = dbh.ReadShoppingList(SelListId);

            DatePickerFragment dpf = new DatePickerFragment(DateTime.Parse(values[3]));

            DatePickerFragment frag = DatePickerFragment.NewInstance(delegate(DateTime time)
            {
                shoppingDate.Text = time.ToShortDateString();
            });

            frag.Show(FragmentManager, DatePickerFragment.TAG);
        }