Example #1
0
        public Time?PickCaretUnit()
        {
            if (Enabled)
            {
                var args =
                    new CaretUnitPickerEventArgs();

                Delegate_CaretUnitPicking(args);

                if (args.Handled)
                {
                    return(args.Length);
                }
            }

            return(null);
        }
Example #2
0
        public void Delegate_CaretUnitPicking(CaretUnitPickerEventArgs args) =>
        Do(() => {
            if (WhenUnitPicking == null)
            {
                return;
            }

            foreach (CaretUnitPickerDelegate invoc in WhenUnitPicking.GetInvocationList())
            {
                invoc(args);

                if (args.Handled)
                {
                    return;
                }
            }
        });
Example #3
0
 private void CommandCenter_WhenUnitPicking(CaretUnitPickerEventArgs args)
 {
     args.Length  = Cursor.Caret.Unit.Value;
     args.Handled = true;
 }