示例#1
0
        private void CmdBindPasteTimeExecuted(object sender, ExecutedRoutedEventArgs e)
        {
            int Hour, Minute, Second;

            if (TimeCtrlExtensions.IsValidTime((string)System.Windows.Clipboard.GetData("Text"), TimePattern, out Hour, out Minute, out Second))
            {
                Value = new DateTime(Value.Year, Value.Month, Value.Day, Hour, Minute, Second, Value.Millisecond, Value.Kind);
            }
        }
示例#2
0
        void CmdBindPasteTimeCanExecute(object sender, CanExecuteRoutedEventArgs e)
        {
            int Hour, Minute, Second;

            e.CanExecute = TimeCtrlExtensions.IsValidTime((string)System.Windows.Clipboard.GetData("Text"), TimePattern, out Hour, out Minute, out Second);
        }