Exemplo n.º 1
0
        void HandleDateSet(object sender, TimePickerDialog.TimeSetEventArgs e)
        {
            var textView = FindViewById<TextView>(Resource.Id.textView);
            time = new DateTime(time.Year, time.Month, time.Day, e.HourOfDay, e.Minute, 0);

            textView.Text = time.ToString("h:mm:ss tt");
        }
 public TimePickerFragment(Context context, int hour, int minute, TimePickerDialog.IOnTimeSetListener listener  )
 {
     this.context = context;
     this.hour = hour;
     this.minute = minute;
     this.listener = listener;
 }
		void OnTimeSet(object sender, TimePickerDialog.TimeSetEventArgs e)
		{
			hour = e.HourOfDay;
			minute = e.Minute;
			UpdateDisplay ();

		}
Exemplo n.º 4
0
        /// <summary>
        /// Shows our new 24 hour dialog
        /// </summary>
        void ShowTimePicker()
        {
            if (_dialog == null)
            {
                _dialog = new Android.App.TimePickerDialog(Context, this, Element.Time.Hours, Element.Time.Minutes, true);                    //this bool is where we set time format, true = 24 hours
            }

            _dialog.Show();
        }
 public override Android.App.Dialog OnCreateDialog(Bundle savedInstanceState)
 {
     Android.App.TimePickerDialog dialog = new Android.App.TimePickerDialog(Activity,
                                                                            this,
                                                                            DateTime.Now.Hour,
                                                                            DateTime.Now.Minute,
                                                                            true);
     return(dialog);
 }
Exemplo n.º 6
0
 public static TimePickerDialog ShowTimePickerDialog(Context ctx, int textView)
 {
     try
     {
         var listener = new OnTimeSetListener(textView);
         var timePicker = new TimePickerDialog(ctx, listener, DateTime.Now.Hour, 0, false);
         timePicker.SetCancelable(false);
         timePicker.Show();
     }
     catch (Exception ex)
     {
         ShowDialog(ctx, "An error occured while showing Time Picker\n\n Error Details:\n" + ex, "Exception");
     }
     return null;
 }
        private void OnTimeSelected (object sender, TimePickerDialog.TimeSetEventArgs e)
        {
            if (model != null) {
                var dt = Toggl.Phoebe.Time.Now;
                if (model.StopTime.HasValue) {
                    dt = model.StopTime.Value.ToLocalTime ();
                }

                model.StopTime = dt.Date
                    .AddHours (e.HourOfDay)
                    .AddMinutes (e.Minute);
            }

            Dismiss ();
        }
        public override Dialog OnCreateDialog (Bundle state)
        {
            var time = Toggl.Phoebe.Time.Now;
            if (model != null && model.StopTime.HasValue) {
                time = model.StopTime.Value.ToLocalTime ();
            }

            var is24h = DateFormat.Is24HourFormat (ServiceContainer.Resolve<Context> ());

            var dia = new TimePickerDialog (
                          Activity, OnTimeSelected,
                          time.Hour, time.Minute, is24h
                      );
            dia.SetTitle (Resource.String.ChangeTimeEntryStopTimeDialogTitle);
            return dia;
        }
 private void TimePickerCallback(object sender, TimePickerDialog.TimeSetEventArgs e)
 {
     hour = e.HourOfDay;
     minute = e.Minute;
     UpdateDisplay();
 }
Exemplo n.º 10
0
 public override Dialog OnCreateDialog(Bundle savedState)
 {
     var dialog = new Android.App.TimePickerDialog (_context, _listener, _hour, _min, _is24hour);
     return dialog;
 }
 public override Dialog OnCreateDialog(Bundle savedState)
 {
     var dialog = new TimePickerDialog(context, listener, hour, minute, false);
     return dialog;
 }
		void OnTimeSet (object sender, TimePickerDialog.TimeSetEventArgs e)
		{
			
			//UpdateDisplay ();
		}
Exemplo n.º 13
0
		public override Dialog OnCreateDialog(Bundle savedState)
		{
			var dialog = new Android.App.TimePickerDialog(_context, _listener, DateTime.Now.Hour, DateTime.Now.Minute, true);
			return dialog;
		}
		void mTimeSetListener (object sender, TimePickerDialog.TimeSetEventArgs e)
		{
			mHour = e.HourOfDay;
			mMinute = e.Minute;
			UpdateDisplay ();
		}
Exemplo n.º 15
0
 public TimePickerFragment(TimePickerDialog.IOnTimeSetListener l)
 {
     timeSetListner = l;
 }
Exemplo n.º 16
0
        // Action time handler
        private void HandleTimeSet(object sender, TimePickerDialog.TimeSetEventArgs e)
        {

            // Si on a cliqué sur l'heure de début
            if (isStartTimeClicked)
            {
                // On réinitialise l'heure du début dans la date de début
                startDateTime = new DateTime(startDateTime.Year, startDateTime.Month,
                    startDateTime.Day, e.HourOfDay, e.Minute, 0);

                var textView = FindViewById<TextView>(Resource.Id.event_startHour_text);
                textView.Text = this.startDateTime.ToString(_timeFormat);
            }

            else
            {
                endDateTime = new DateTime(endDateTime.Year, endDateTime.Month,
                    endDateTime.Day, e.HourOfDay, e.Minute, 0);

                var textView = FindViewById<TextView>(Resource.Id.event_endHour_text);
                textView.Text = this.endDateTime.ToString(_timeFormat);
            }

        }
Exemplo n.º 17
0
        private void UpdateWorkTimeList()
        {
            LinearLayout mainll = FindViewById<LinearLayout> (Resource.Id.lstDD);
            mainll.RemoveAllViewsInLayout ();
            //lstWorkTime.RemoveAllViewsInLayout();

            workTimeItems.Clear();
            if (doctor.wtKind == WorkTime_Kind.Days)
            {
                workTimeItems.Add(new Tuple<String, DateTime, WorkTime_Type, DateTime, WorkTime_Type>("Понедельник", doctor.wtDays.Mon_From, WorkTime_Type.Mon_From, doctor.wtDays.Mon_Till, WorkTime_Type.Mon_Till));
                workTimeItems.Add(new Tuple<String, DateTime, WorkTime_Type, DateTime, WorkTime_Type>("Вторник    ", doctor.wtDays.Tue_From, WorkTime_Type.Tue_From, doctor.wtDays.Tue_Till, WorkTime_Type.Tue_Till));
                workTimeItems.Add(new Tuple<String, DateTime, WorkTime_Type, DateTime, WorkTime_Type>("Среда      ", doctor.wtDays.Wed_From, WorkTime_Type.Wed_From, doctor.wtDays.Wed_Till, WorkTime_Type.Wed_Till));
                workTimeItems.Add(new Tuple<String, DateTime, WorkTime_Type, DateTime, WorkTime_Type>("Четверг    ", doctor.wtDays.Thu_From, WorkTime_Type.Thu_From, doctor.wtDays.Thu_Till, WorkTime_Type.Thu_Till));
                workTimeItems.Add(new Tuple<String, DateTime, WorkTime_Type, DateTime, WorkTime_Type>("Пятница    ", doctor.wtDays.Fri_From, WorkTime_Type.Fri_From, doctor.wtDays.Fri_Till, WorkTime_Type.Fri_Till));
            //				workTimeItems.Add(new Tuple<String, DateTime, WorkTime_Type, DateTime, WorkTime_Type>("Суббота    ", doctor.wtDays.Sut_From, WorkTime_Type.Sut_From, doctor.wtDays.Sut_Till, WorkTime_Type.Sut_Till));
            //				workTimeItems.Add(new Tuple<String, DateTime, WorkTime_Type, DateTime, WorkTime_Type>("Воскресенье", doctor.wtDays.Sun_From, WorkTime_Type.Sun_From, doctor.wtDays.Sun_Till, WorkTime_Type.Sun_Till));
            }
            else
            {
                workTimeItems.Add(new Tuple<String, DateTime, WorkTime_Type, DateTime, WorkTime_Type>("Четная дата  ", doctor.wtOddEven.Even_From, WorkTime_Type.Even_From, doctor.wtOddEven.Even_Till, WorkTime_Type.Even_Till));
                workTimeItems.Add(new Tuple<String, DateTime, WorkTime_Type, DateTime, WorkTime_Type>("Нечетная дата", doctor.wtOddEven.Odd_From, WorkTime_Type.Odd_From, doctor.wtOddEven.Odd_Till, WorkTime_Type.Odd_Till));
            }

            //lstWorkTime.Adapter = new WorkTimeListAdapter(this, workTimeItems, doctor, TimePickerCallback);

            for (int i=0; i<=workTimeItems.Count-1; i++) {
                var view = this.LayoutInflater.Inflate(Resource.Layout.WorkTimeListItem, null);
                var item = workTimeItems[i];

                view.FindViewById<TextView> (Resource.Id.txtDayOrOddEven).Text = item.Item1;

                var btnWorkTimeFromValue = view.FindViewById<Button> (Resource.Id.btnWorkTimeFromValue);
                btnWorkTimeFromValue.Text = item.Item2.ToString("t");
                btnWorkTimeFromValue.Click += (object sender, EventArgs e) => {
                    doctor.chooseNwtType = item.Item3;
                    var timepickDialog = new TimePickerDialog(this, TimePickerCallback, item.Item2.Hour, item.Item2.Minute, true);
                    timepickDialog.SetTitle(item.Item1);
                    timepickDialog.Show();
                };

                var btnWorkTimeTillValue = view.FindViewById<Button> (Resource.Id.btnWorkTimeTillValue);
                btnWorkTimeTillValue.Text = item.Item4.ToString("t");
                btnWorkTimeTillValue.Click += (object sender, EventArgs e) => {
                    doctor.chooseNwtType = item.Item5;
                    var timepickDialog = new TimePickerDialog (this, TimePickerCallback, item.Item4.Hour, item.Item4.Minute, true);
                    timepickDialog.SetTitle (item.Item1);
                    timepickDialog.Show ();
                };

                mainll.AddView (view);
            }
        }
Exemplo n.º 18
0
        public override Dialog OnCreateDialog(Bundle savedState)
        {
            var dialog = new Android.App.TimePickerDialog(_context, _listener, _date.Hour, _date.Minute, true);

            return(dialog);
        }
Exemplo n.º 19
0
        public override Dialog OnCreateDialog(Bundle savedState)
        {
            var dialog = new Android.App.TimePickerDialog(_context, _listener, _hour, _min, _is24hour);

            return(dialog);
        }
Exemplo n.º 20
0
        protected override void OnCreate(Android.OS.Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_settings);
            SetSupportActionBar(FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar));
            this.SupportActionBar.Title = AppResources.PageTitleSettings;
            this.SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            advertisement = FindViewById <LinearLayout>(Resource.Id.advertisement);
            GrabAd();
            SettingsVM vm           = new SettingsVM();
            var        contentPanel = FindViewById <Android.Widget.LinearLayout>(Resource.Id.contentpanel);
            var        binding      = DataContext <SettingsVM> .FromView(contentPanel);

            binding.VM = vm;
            var chkBoxShowTotal = FindViewById <Android.Widget.CheckBox>(Resource.Id.checkbox_showtotal);

            chkBoxShowTotal.Enabled = false;

            if (UserSettings.Current.SelectedProperties.Any())
            {
                chkBoxShowTotal.Enabled = true;
            }

            binding.Add(Resource.Id.checkbox_showtotal, x => x.ShowTotal);
            binding.Add(Resource.Id.spinner, x => x.TotalOptionsVisibility);
            var spinnerAdapter = new Android.Widget.ArrayAdapter <String>(this, Resource.Layout.item_settings_property, Resource.Id.text, vm.TotalOptions);
            var spinner        = FindViewById <Android.Widget.Spinner>(Resource.Id.spinner);

            spinner.Adapter = spinnerAdapter;
            spinner.SetSelection(spinnerAdapter.GetPosition(vm.SelectedTotal));
            spinner.ItemSelected += (sender, e) => { vm.SelectedTotal = spinner.SelectedItem.ToString(); };
            binding.Add(Resource.Id.checkbox_add_time, x => x.ShowMealTime);

            var mealAdapter = new VMListAdapter <MealSettingsVM>(this, vm.Meals, Resource.Layout.item_settings_meal, null, (b, cvm) =>
            {
                b.Add(Resource.Id.text, x => x.Text);
            });

            var mealspanel = FindViewById <Android.Widget.LinearLayout>(Resource.Id.layout_meals);

            for (int i = 0; i < mealAdapter.Count; i++)
            {
                mealspanel.AddView(mealAdapter.GetView(i, null, mealspanel));
            }

            var nutitionAdapter = new VMListAdapter <GoalLineVM>(this, gvm.Goals, Resource.Layout.item_settings_nutrition, null, (b, cvm) =>
            {
                b.Add(Resource.Id.text, x => x.Text);
                b.Add(Resource.Id.image_remove, (a) => { gvm.DeleteGoal(a); });
            });
            var nutitionspanel = FindViewById <Android.Widget.LinearLayout>(Resource.Id.layout_nutirition);

            for (int i = 0; i < nutitionAdapter.Count; i++)
            {
                nutitionspanel.AddView(nutitionAdapter.GetView(i, null, nutitionspanel));
            }

            gvm.Goals.CollectionChanged += (sender, e) =>
            {
                nutitionspanel.RemoveAllViews();
                for (int i = 0; i < nutitionAdapter.Count; i++)
                {
                    nutitionspanel.AddView(nutitionAdapter.GetView(i, null, nutitionspanel));
                }
            };

            var buttonLine1 = FindViewById <Android.Widget.LinearLayout>(Resource.Id.nutrition_button);
            var button2     = buttonLine1.FindViewById <Android.Widget.TextView>(Resource.Id.text_button1);
            var buttonLine  = FindViewById <Android.Widget.LinearLayout>(Resource.Id.meal_button);
            var button      = buttonLine.FindViewById <Android.Widget.TextView>(Resource.Id.text_button);

            button2.Click += (sender, e) =>
            {
                List <String> options = gvm.NewPropertyOptions;
                var           builder = new Android.Support.V7.App.AlertDialog.Builder(this);
                builder.SetTitle(Resource.String.add_target)
                .SetItems(options.ToArray(), (s, e2) =>
                {
                    Property result = StandardProperty.none;
                    String clicked  = options[e2.Which];
                    foreach (var value in Property.All())
                    {
                        if (value.FullCapitalizedText == clicked)
                        {
                            result = value;
                        }
                    }
                    if (result == StandardProperty.none)
                    {
                        return;
                    }
                    gvm.AddGoal(result);
                });
                builder.Create();
                builder.Show();
            };

            button.Click += (sender, e) =>
            {
                vm.MealsExpanded = true;
                mealspanel.RemoveAllViews();
                buttonLine.Visibility = Android.Views.ViewStates.Gone;

                var meala = new VMListAdapter <MealSettingsVM>(this, vm.Meals, Resource.Layout.item_settings_meal_edit, null, (b, cvm) =>
                {
                    b.Add(Resource.Id.checkbox, x => x.MealSelected);
                    b.Add(Resource.Id.checkbox, x => x.CheckboxVisibility);
                    b.Add(Resource.Id.checkbox, x => x.CheckboxEnabled, "Enabled");
                    b.Add(Resource.Id.edit_meal_name, x => x.Text);
                });

                for (int i = 0; i < meala.Count; i++)
                {
                    mealspanel.AddView(meala.GetView(i, null, mealspanel));
                }
            };

            contentPanel.AddView(Android.Views.View.Inflate(this, Resource.Layout.item_settings_reminder_top, null));

            var reminderAdapter = new VMListAdapter <ReminderVM>(this, vm.Reminders, Resource.Layout.item_settings_reminder, null, (b, cvm) =>
            {
                b.Add(Resource.Id.checkbox, x => x.Checked);
                b.Add(Resource.Id.settings_set_time, x => x.Time);
                b.Add(Resource.Id.settings_set_time, (a) =>
                {
                    DateTime current;
                    if (!DateTime.TryParse(a.Time, out current))
                    {
                        current = DateTime.Now;
                    }
                    var tpd = new Android.App.TimePickerDialog(this,
                                                               (s, e) => { a.Time = DateTime.Now.SetTime(e.HourOfDay, e.Minute, 0).ToShortTimeString(); }
                                                               , current.Hour, current.Minute, true);
                    tpd.Show();
                });
                b.Add(Resource.Id.image_remove, (a) => { a.Delete(); });
                b.Add(Resource.Id.image_remove, x => x.DeleteVisibility);
            });

            var reminderspanel = FindViewById <Android.Widget.LinearLayout>(Resource.Id.layout_reminders);

            for (int i = 0; i < reminderAdapter.Count; i++)
            {
                reminderspanel.AddView(reminderAdapter.GetView(i, null, reminderspanel));
            }

            var buttonLine2 = Android.Views.View.Inflate(this, Resource.Layout.item_settings_add_reminder, null);

            button = buttonLine2.FindViewById <Android.Widget.TextView>(Resource.Id.text_button);
            contentPanel.AddView(buttonLine2);

            button.Click += (sender, e) =>
            {
                var tpd = new Android.App.TimePickerDialog(this,
                                                           (s, e2) => { vm.AddReminder(DateTime.Now.SetTime(e2.HourOfDay, e2.Minute, 0)); }
                                                           , DateTime.Now.Hour, 0, true);
                tpd.Show();
            };

            vm.Reminders.CollectionChanged += (sender, e) =>
            {
                reminderspanel.RemoveAllViews();
                for (int i = 0; i < reminderAdapter.Count; i++)
                {
                    reminderspanel.AddView(reminderAdapter.GetView(i, null, reminderspanel));
                }
            };

#if DEBUG
            AndroidDebug.SetViewBorders(contentPanel);
#endif
#if SCREENSHOT
            Navigate.screenshotScreen = this;
#endif
        }
Exemplo n.º 21
0
 // the event received when the user "sets" the date in the dialog
 void OnDateSet(object sender, TimePickerDialog.TimeSetEventArgs e)
 {
     DateTime current = DateValue;
     DateValue = new DateTime(current.Year, current.Month, current.Day, e.HourOfDay, e.Minute, 0);
 }
Exemplo n.º 22
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            SetContentView (Resource.Layout.Pay_Automat_Main_Enter);

            text_time_screen = FindViewById<EditText> (Resource.Id.edit_time_automat);
            btn_save_time = FindViewById<Button> (Resource.Id.btn_save_time);
            btn_change_time = FindViewById<Button> (Resource.Id.btn_change_time);

            listView = FindViewById<ListView> (Resource.Id.List_SMS_Main_History);

            spinnerPayA = FindViewById<Spinner> (Resource.Id.zoneSpinner);
            spinnerList = FillSpinnerWithData ();

            ArrayAdapter<string> spinnerArrayAdapter = new ArrayAdapter<string> (this, Android.Resource.Layout.SimpleSpinnerItem, spinnerList);
            spinnerArrayAdapter.SetDropDownViewResource (Android.Resource.Layout.SimpleSpinnerDropDownItem);
            spinnerPayA.Adapter = spinnerArrayAdapter;

            #region PuniListu
            //Log.Debug ("ON CREATE","DULJINA"+new FileInfo(message_Data).Length+" -- "+Enable_message_update);
            long duljina = 0;
            try {
                duljina = new FileInfo (message_Data).Length;
            } catch (Exception e) {

                Log.Debug ("Pay_SMS_Main", "FILE INFO krivo učitava " + e.ToString ());
            }
            Pay_SMS_Main psm = new Pay_SMS_Main ();

            if (duljina != 0 || Fill_ListView_With_Data.update_inbox_messages == true) {
                List<string> data = new List<string> ();
                String line;

                StreamReader reader = new StreamReader (message_Data);
                while ((line = reader.ReadLine ()) != null) {
                    data.Add (line);
                }
                reader.Close ();
                podaciDialogLista = data;
                try {
                    Fill_ListView_With_Data.FillListWithData (data, this, listView);
                } catch (NullReferenceException e) {
                    Log.Debug ("Fill_ListView_With_Data.FillListWithData",	e.ToString ());
                }
            } else {
                Fill_ListView_With_Data.DeleteHistory ();
            }

            //if user enabled Inbox messages
            if (Fill_ListView_With_Data.Enable_message_update == true) {
                Fill_ListView_With_Data.Fill_With_Inbox_Data (this, listView);
            }

            #endregion

            listView.ItemClick += OnListItemClick;

            UpdateTime ();
            UpdateDisplay ();

            TimePickerDialog time_dialog = new TimePickerDialog (this, TimePickerCallback, hour, minute, true);

            //Prikazuje trenutno vrijeme i nudi odabir promjene ili prekid.
            btn_change_time.Click += delegate {
                UpdateTime ();
                time_dialog = new TimePickerDialog (this, TimePickerCallback, hour, minute, true);
                time_dialog.Show ();
            };

            /*
             * UPALI ALARM I SPREMI VRIJEME PLACANJA U HISTORY
             * */
            btn_save_time.Click += delegate {
                var prefs = Application.Context.GetSharedPreferences ("MySharedPrefs", FileCreationMode.Private);
                var valid_Alarm=prefs.GetBoolean ("MyAlarmValue", true);

                if (valid_Alarm) {
                    Toast.MakeText (this,"Alarm JE upaljen",ToastLength.Short).Show();
                    ActivatedAlarmOnSMS ();
                }else{
                    Toast.MakeText (this,"Alarm NIJE upaljen",ToastLength.Short).Show ();
                    var activity_pay_main=new Intent (this,typeof(Pay_Main));
                    StartActivity (activity_pay_main);
                }
            };
        }
Exemplo n.º 23
0
 void OnTimeSet(object sender, TimePickerDialog.TimeSetEventArgs e)
 {
     selectedDateTime = new DateTime (selectedDateTime.Year, selectedDateTime.Month, selectedDateTime.Day, e.HourOfDay, e.Minute, selectedDateTime.Second);
     UpdateDisplay ();
 }
Exemplo n.º 24
0
        private void TimePickerCallback(object sender, TimePickerDialog.TimeSetEventArgs e)
        {
            var wtD = new WorkTime_Days();
            wtD = doctor.wtDays;
            var wtOE = new WorkTime_OddEven();
            wtOE = doctor.wtOddEven;
            switch(doctor.chooseNwtType)
            {
            case WorkTime_Type.Mon_From: { wtD.Mon_From = new DateTime(1,1,1, e.HourOfDay, e.Minute, 0); break; }
            case WorkTime_Type.Mon_Till: { wtD.Mon_Till = new DateTime(1,1,1, e.HourOfDay, e.Minute, 0); break; }

            case WorkTime_Type.Tue_From: { wtD.Tue_From = new DateTime(1,1,1, e.HourOfDay, e.Minute, 0); break; }
            case WorkTime_Type.Tue_Till: { wtD.Tue_Till = new DateTime(1,1,1, e.HourOfDay, e.Minute, 0); break; }

            case WorkTime_Type.Wed_From: { wtD.Wed_From = new DateTime(1,1,1, e.HourOfDay, e.Minute, 0); break; }
            case WorkTime_Type.Wed_Till: { wtD.Wed_Till = new DateTime(1,1,1, e.HourOfDay, e.Minute, 0); break; }

            case WorkTime_Type.Thu_From: { wtD.Thu_From = new DateTime(1,1,1, e.HourOfDay, e.Minute, 0); break; }
            case WorkTime_Type.Thu_Till: { wtD.Thu_Till = new DateTime(1,1,1, e.HourOfDay, e.Minute, 0); break; }

            case WorkTime_Type.Fri_From: { wtD.Fri_From = new DateTime(1,1,1, e.HourOfDay, e.Minute, 0); break; }
            case WorkTime_Type.Fri_Till: { wtD.Fri_Till = new DateTime(1,1,1, e.HourOfDay, e.Minute, 0); break; }

            case WorkTime_Type.Sut_From: { wtD.Sut_From = new DateTime(1,1,1, e.HourOfDay, e.Minute, 0); break; }
            case WorkTime_Type.Sut_Till: { wtD.Sut_Till = new DateTime(1,1,1, e.HourOfDay, e.Minute, 0); break; }

            case WorkTime_Type.Sun_From: { wtD.Sun_From = new DateTime(1,1,1, e.HourOfDay, e.Minute, 0); break; }
            case WorkTime_Type.Sun_Till: { wtD.Sun_Till = new DateTime(1,1,1, e.HourOfDay, e.Minute, 0); break; }

            case WorkTime_Type.Odd_From: { wtOE.Odd_From = new DateTime(1,1,1, e.HourOfDay, e.Minute, 0); break; }
            case WorkTime_Type.Odd_Till: { wtOE.Odd_Till = new DateTime(1,1,1, e.HourOfDay, e.Minute, 0); break; }

            case WorkTime_Type.Even_From: { wtOE.Even_From = new DateTime(1,1,1, e.HourOfDay, e.Minute, 0); break; }
            case WorkTime_Type.Even_Till: { wtOE.Even_Till = new DateTime(1,1,1, e.HourOfDay, e.Minute, 0); break; }
            }
            doctor.wtOddEven = wtOE;
            doctor.wtDays = wtD;
            UpdateWorkTimeList();
        }
Exemplo n.º 25
0
 private void Dialog_TimeSet(object sender, TimePickerDialog.TimeSetEventArgs e)
 {
     var time = new TimeSpan(hours: e.HourOfDay, minutes: e.Minute, seconds: 0);
     dateTimeSet = new DateTime(Value.Date.Ticks + time.Ticks, Value.Kind);
 }
 public TimePickerDialogFragment(Context context, DateTime time, TimePickerDialog.IOnTimeSetListener listener)
 {
     mContext = context;
     mTime = time;
     mListener = listener;
 }
Exemplo n.º 27
0
 public override Dialog OnCreateDialog(Bundle savedInstanceState)
 {
     DateTime now = DateTime.Now;
     TimePickerDialog tPicker = new TimePickerDialog(Activity, this, now.Hour, now.Minute, true);
     return tPicker;
 }