Пример #1
0
        private void TxtShewatchiTarikh_Click(object sender, EventArgs e)
        {
            DatePickerFragment frag = DatePickerFragment.NewInstance(delegate(DateTime time)
            {
                txtShewatchiTarikh.Text = time.ToString("dd-MM-yyyy");
            });

            frag.Show(FragmentManager, DatePickerFragment.TAG);
        }
        private void TxtJamaTarikh_Click(object sender, EventArgs e)
        {
            InputMethodManager inputManager = (InputMethodManager)this.GetSystemService(Context.InputMethodService);

            inputManager.HideSoftInputFromWindow(this.CurrentFocus.WindowToken, HideSoftInputFlags.NotAlways);

            DatePickerFragment frag = DatePickerFragment.NewInstance(delegate(DateTime time)
            {
                txtJamaTarikh.Text = time.ToString("dd-MM-yyyy");
            });

            frag.Show(FragmentManager, DatePickerFragment.TAG);
        }
Пример #3
0
        private void TxtSodawnyachiTarikh_Click(object sender, EventArgs e)
        {
            try
            {
                InputMethodManager inputManager = (InputMethodManager)this.GetSystemService(Context.InputMethodService);
                if (this.CurrentFocus != null)
                {
                    inputManager.HideSoftInputFromWindow(this.CurrentFocus.WindowToken, HideSoftInputFlags.NotAlways);
                }

                DatePickerFragment frag = DatePickerFragment.NewInstance(delegate(DateTime time)
                {
                    txtSodawnyachiTarikh.Text = time.ToString("dd-MM-yyyy");
                });

                frag.Show(FragmentManager, DatePickerFragment.TAG);
            }
            catch (Exception es)
            {
                Console.WriteLine("Exception : " + es, ConsoleColor.DarkRed);
            }
        }