Exemple #1
0
        private static void HookInkImpl(IInkHooks subject, Control control)
        {
            HookAdapter adapter = new HookAdapter(subject);

            control.CreateControl();
            StylusReader.HookStylus(adapter, control);
        }
Exemple #2
0
        /// <summary>
        /// Hooks Ink support in to a control.
        /// </summary>
        /// <param name="subject"></param>
        /// <param name="control"></param>
        /// <exception cref="NotSupportedException">IsAvailable() returned false</exception>
        /// <remarks>Ink support will be automatically unhooked when the control's Disposed event is raised.</remarks>
        public static void HookInk(IInkHooks subject, Control control)
        {
            if (!IsAvailable())
            {
                throw new NotSupportedException("Ink is not available");
            }

            HookInkImpl(subject, control);
        }
Exemple #3
0
        /// <summary>
        /// Hooks Ink support in to a control.
        /// </summary>
        /// <param name="subject"></param>
        /// <param name="control"></param>
        /// <exception cref="NotSupportedException">IsAvailable() returned false</exception>
        /// <remarks>Ink support will be automatically unhooked when the control's Disposed event is raised.</remarks>
        public static void HookInk(IInkHooks subject, Control control)
        {
            if (!IsAvailable())
            {
                throw new NotSupportedException("Ink is not available");
            }

            HookInkImpl(subject, control);
        }
Exemple #4
0
 public HookAdapter(IInkHooks subject)
 {
     this.subject = subject;
 }
Exemple #5
0
 private static void HookInkImpl(IInkHooks subject, Control control)
 {
     HookAdapter adapter = new HookAdapter(subject);
     control.CreateControl();
     StylusReader.HookStylus(adapter, control);
 }
Exemple #6
0
 public HookAdapter(IInkHooks subject)
 {
     this.subject = subject;
 }