private void ReferencesTimer_Tick(object sender, EventArgs e) { // if the panel is NOT droped to become larger with 10 pixels if (!droped) { ReferenceDropPanel.Height += 10; // if the size of the panes is eaqual to its maximum size to stop the timer and report it as "Droped" if (ReferenceDropPanel.Size == ReferenceDropPanel.MaximumSize) { ReferencesTimer.Stop(); droped = true; } } // if the panel is droped to become smaller with 10 pixels else { ReferenceDropPanel.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 (ReferenceDropPanel.Size == ReferenceDropPanel.MinimumSize) { ReferencesTimer.Stop(); droped = false; } } }
private void ReferencesButton_Click(object sender, EventArgs e) { ReferencesTimer.Start(); }