Exemplo n.º 1
0
        /// <summary>
        /// Установить обратный вызов получения данных.
        /// </summary>
        /// <param name="callback">Обратный вызов.</param>
        public void SetPokeCallback(PokeCallback callback)
        {
            if (callback == null)
            {
                throw new ArgumentException("PokeCallback cannot be NULL");
            }

            this.pokeCallback = callback;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Invokes the poke callback method
 /// </summary>
 /// <param name="Addr">Memory Address to poke</param>
 /// <param name="value">Value to poke</param>
 private void ThreadPoke(ushort Addr, byte value)
 {
     //invoke through delegate
     if (b32Screen1.InvokeRequired)
     {
         PokeCallback pcb = new PokeCallback(Poke);
         this.Invoke(pcb, new object[] { Addr, value });
     }
     else
     {
         Poke(Addr, value);
     }
 }