private void DuplicateTimer_Tick(object sender, EventArgs e) { // if the panel is not droped to become larger with 10 pixels if (notDroped) { DuplicateDropPanel.Height += 10; // if the size of the panes is eaqual to its maximum size to stop the timer and report it as "Droped" if (DuplicateDropPanel.Size == DuplicateDropPanel.MaximumSize) { DuplicateTimer.Stop(); notDroped = false; } } // if the panel is droped to become smaller with 10 pixels else { DuplicateDropPanel.Height -= 10; // if the size of the panes is eaqual to its minimum size to stop the timer and report it as "Not droped" if (DuplicateDropPanel.Size == DuplicateDropPanel.MinimumSize) { DuplicateTimer.Stop(); notDroped = true; } } }
private void DuplicatesButton_Click(object sender, EventArgs e) { DuplicateTimer.Start(); }