public void Move(ContactInfo info) { if (disposed) { throw new ObjectDisposedException("Contact is already up"); } double distance = (info.Rectangle.Location - Location).Length; if (distance > 1) { CloseTimerCursor(); if (!hasMoved) { if (timerFired) { ContactActionHelper.RightDown(Location); } else { ContactActionHelper.LeftDown(Location); } } hasMoved = true; Location = info.Rectangle.Location; ContactActionHelper.Drag(Location); } }
private void timer_Elapsed(object sender, ElapsedEventArgs e) { if (!hasMoved && !disposed) { timerFired = true; timerFiredCount++; if (timerFiredCount < 2) { timer.Start(); } else if (timerFiredCount == 2) { CloseTimerCursor(); ContactActionHelper.LeftDown(Location); } } }