Ejemplo n.º 1
0
        /// <summary>
        /// Occurs when the stylus moves on the digitizer surface.
        /// Add new packet data into the packet array for this stylus.
        /// </summary>
        /// <param name="sender">The real time stylus associated with the notification</param>
        /// <param name="data">The notification data</param>
        void IStylusAsyncPlugin.Packets(RealTimeStylus sender, PacketsData data)
        {
            int        stylusId = data.Stylus.Id;
            List <int> collected;

            if (!this.m_PacketsTable.TryGetValue(stylusId, out collected))
            {
                // If ink collection was disabled on StylusDown or if the user is erasing,
                // then ignore these packets.
                return;
            }

            int strokeId = this.m_StrokeIdTable[stylusId];

            int[] packets = data.GetData();

            // Use the stylus id as a key to retrieve the packet array for the
            // stylus.  Insert the new packet data into this array.
            collected.AddRange(packets);

            using (Synchronizer.Lock(this)) {
                if (this.RealTimeInkSheetModel != null)
                {
                    // Send the packets to anybody who's listening to the RealTimeInk.
                    this.RealTimeInkSheetModel.OnPackets(stylusId, strokeId, packets);
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Occurs when the stylus moves on the digitizer surface.
        /// </summary>
        /// <param name="sender">The real time stylus associated with the notification</param>
        /// <param name="data">The notification data</param>
        void IStylusSyncPlugin.Packets(RealTimeStylus sender, PacketsData data)
        {
            int stylusId = data.Stylus.Id;

            // Add the packets to the stroke
            if (this.collectedPacketsTable.ContainsKey(stylusId))
            {
                List <int> collected = new List <int>(data.GetData());
                this.collectedPacketsTable[stylusId].AddRange(collected);
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Occurs when the stylus moves on the digitizer surface.
 /// Add new packet data into the packet array for this stylus.
 /// </summary>
 /// <param name="sender">The real time stylus associated with the notification</param>
 /// <param name="data">The notification data</param>
 public void Packets(RealTimeStylus sender, PacketsData data)
 {
     // Use the stylus id as a key to retrieve the packet array for the
     // stylus.  Insert the new packet data into this array.
     ((ArrayList)(myPackets[data.Stylus.Id])).AddRange(data.GetData());
 }
 /// <summary>
 /// Occurs when the stylus moves on the digitizer surface.
 /// </summary>
 /// <param name="sender">The real time stylus associated with the notification</param>
 /// <param name="data">The notification data</param>
 void IStylusSyncPlugin.Packets(RealTimeStylus sender, PacketsData data)
 {
     this.m_Core.Packets(data.Stylus.Id, 0, data.GetData());
 }
        /// <summary>
        /// Occurs when the stylus moves on the digitizer surface.
        /// Add new packet data into the packet array for this stylus.
        /// </summary>
        /// <param name="sender">The real time stylus associated with the notification</param>
        /// <param name="data">The notification data</param>
        void IStylusAsyncPlugin.Packets(RealTimeStylus sender, PacketsData data)
        {
            int stylusId = data.Stylus.Id;
            List<int> collected;
            if (!this.m_PacketsTable.TryGetValue(stylusId, out collected)) {
                // If ink collection was disabled on StylusDown or if the user is erasing,
                // then ignore these packets.
                return;
            }

            int strokeId = this.m_StrokeIdTable[stylusId];
            int[] packets = data.GetData();

            // Use the stylus id as a key to retrieve the packet array for the
            // stylus.  Insert the new packet data into this array.
            collected.AddRange(packets);

            using(Synchronizer.Lock(this)) {
                if(this.RealTimeInkSheetModel != null) {
                    // Send the packets to anybody who's listening to the RealTimeInk.
                    this.RealTimeInkSheetModel.OnPackets(stylusId, strokeId, packets);
                }
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Occurs when the stylus moves on the digitizer surface.
        /// </summary>
        /// <param name="sender">The real time stylus associated with the notification</param>
        /// <param name="data">The notification data</param>
        void IStylusSyncPlugin.Packets(RealTimeStylus sender, PacketsData data)
        {
            int stylusId = data.Stylus.Id;

            // Add the packets to the stroke
            if (this.collectedPacketsTable.ContainsKey(stylusId)) {
                List<int> collected = new List<int>(data.GetData());
                this.collectedPacketsTable[stylusId].AddRange(collected);
            }
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Occurs when the stylus moves on the digitizer surface.
 /// </summary>
 /// <param name="sender">The real time stylus associated with the notification</param>
 /// <param name="data">The notification data</param>
 void IStylusSyncPlugin.Packets(RealTimeStylus sender, PacketsData data)
 {
     this.m_Core.Packets(data.Stylus.Id, 0, data.GetData());
 }
 /// <summary>
 /// Occurs when the stylus moves on the digitizer surface.
 /// Add new packet data into the packet array for this stylus.
 /// </summary>
 /// <param name="sender">The real time stylus associated with the notification</param>
 /// <param name="data">The notification data</param>
 public void Packets(RealTimeStylus sender, PacketsData data)
 {
     // Use the stylus id as a key to retrieve the packet array for the
     // stylus.  Insert the new packet data into this array.
     ((ArrayList)(myPackets[data.Stylus.Id])).AddRange(data.GetData());
 }