示例#1
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 protected void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(IntelliMouseControl));
     this.tmrFeedback    = new Puzzle.Windows.Forms.CoreLib.WeakTimer(this.components);
     this.picImage       = new System.Windows.Forms.PictureBox();
     this.regionHandler1 = new Puzzle.Windows.Forms.CoreLib.RegionHandler(this.components);
     //
     // tmrFeedback
     //
     this.tmrFeedback.Enabled  = true;
     this.tmrFeedback.Interval = 10;
     this.tmrFeedback.Tick    += new System.EventHandler(this.tmrFeedback_Tick);
     //
     // picImage
     //
     this.picImage.Image    = ((System.Drawing.Bitmap)(resources.GetObject("picImage.Image")));
     this.picImage.Location = new System.Drawing.Point(17, 17);
     this.picImage.Name     = "picImage";
     this.picImage.TabIndex = 0;
     this.picImage.TabStop  = false;
     //
     // regionHandler1
     //
     this.regionHandler1.Control         = null;
     this.regionHandler1.MaskImage       = null;
     this.regionHandler1.TransparencyKey = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(0)), ((System.Byte)(255)));
     //
     // IntelliMouseControl
     //
     this.ParentChanged += new System.EventHandler(this.IntelliMouseControl_ParentChanged);
 }
示例#2
0
 public static void Detach(WeakTimer t)
 {
     for (int i = _listeners.Count - 1; i >= 0; i--)
     {
         WeakReference wr = (WeakReference)_listeners[i];
         try
         {
             if (wr.Target == t)
             {
                 _listeners.RemoveAt(i);
             }
         }
         catch
         {
         }
     }
 }
示例#3
0
        public static void Attach(WeakTimer t)
        {
            WeakReference wr = new WeakReference(t);

            _listeners.Add(wr);
        }