Exemple #1
0
        private static void OnSelectedTimeChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            UTimePicker ctrl = obj as UTimePicker;

            updateGui((DateTime)e.NewValue, ctrl);
            ctrl.txtChanged = false;
        }
Exemple #2
0
        private static void updateGui(DateTime t, UTimePicker ctrl)
        {
            if (t == null)
            {
                ctrl.txtHH.Text = "";
                ctrl.txtMM.Text = "";
            }
            else
            {
                String dtm = CUtil.DateTimeToDateStringInternal(t);
                //YYYY/MM/DD HH:MM:SS

                ctrl.txtHH.Text = dtm.Substring(11, 2);
                ctrl.txtMM.Text = dtm.Substring(14, 2);
            }
        }