using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace top_hareket
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
int adim = 160;
private void
button8_Click(object sender, EventArgs e)
{
timer1.Start();
}
private void
button9_Click(object sender, EventArgs e)
{
timer1.Stop();
}
private void
timer1_Tick(object sender, EventArgs e)
{
for (adim = 160; adim >= 20;adim-- )
{
if (adim == 160)
{
button1.Visible = false;
button2.Visible = false;
button3.Visible = false;
button4.Visible = false;
button5.Visible = false;
button6.Visible = false;
button7.Visible = false;
button10.Visible = false;
button11.Visible = false;
button12.Visible = false;
button13.Visible = false;
button14.Visible = false;
button15.Visible = false;
button16.Visible = false;
}
if (adim == 150)
{
button1.Visible = true;
button2.Visible = false;
button3.Visible = false;
button4.Visible = false;
button5.Visible = false;
button6.Visible = false;
button7.Visible = false;
button10.Visible = false;
button11.Visible = false;
button12.Visible = false;
button13.Visible = false;
button14.Visible = false;
button15.Visible = false;
button16.Visible = false;
}
if (adim == 140)
{
button1.Visible = true;
button2.Visible = true;
button3.Visible = false;
button4.Visible = false;
button5.Visible = false;
button6.Visible = false;
button7.Visible = false;
button10.Visible = false;
button11.Visible = false;
button12.Visible = false;
button13.Visible = false;
button14.Visible = false;
button15.Visible = false;
button16.Visible = false;
}
if (adim == 130)
{
button1.Visible = true;
button2.Visible = true;
button3.Visible = true;
button4.Visible = false;
button5.Visible = false;
button6.Visible = false;
button7.Visible = false;
button10.Visible = false;
button11.Visible = false;
button12.Visible = false;
button13.Visible = false;
button14.Visible = false;
button15.Visible = false;
button16.Visible = false;
}
if (adim == 120)
{
button1.Visible = true;
button2.Visible = true;
button3.Visible = true;
button4.Visible = true;
button5.Visible = false;
button6.Visible = false;
button7.Visible = false;
button10.Visible = false;
button11.Visible = false;
button12.Visible = false;
button13.Visible = false;
button14.Visible = false;
button15.Visible = false;
button16.Visible = false;
}
if
(adim == 110)
{
button1.Visible = true;
button2.Visible = true;
button3.Visible = true;
button4.Visible = true;
button5.Visible = true;
button6.Visible = false;
button7.Visible = false;
button10.Visible = false;
button11.Visible = false;
button12.Visible = false;
button13.Visible = false;
button14.Visible = false;
button15.Visible = false;
button16.Visible = false;
}
if (adim == 100)
{
button1.Visible = true;
button2.Visible = true;
button3.Visible = true;
button4.Visible = true;
button5.Visible = true;
button6.Visible = true;
button7.Visible = false;
button10.Visible = false;
button11.Visible = false;
button12.Visible = false;
button13.Visible = false;
button14.Visible = false;
button15.Visible = false;
button16.Visible = false;
}
if (adim ==90)
{
button1.Visible = true;
button2.Visible = true;
button3.Visible = true;
button4.Visible = true;
button5.Visible = true;
button6.Visible = true;
button7.Visible = true;
button10.Visible = false;
button11.Visible = false;
button12.Visible = false;
button13.Visible = false;
button14.Visible = false;
button15.Visible = false;
button16.Visible = false;
}
if (adim == 80)
{
button1.Visible = true;
button2.Visible = true;
button3.Visible = true;
button4.Visible = true;
button5.Visible = true;
button6.Visible = true;
button7.Visible = true;
button10.Visible = true;
button11.Visible = false;
button12.Visible = false;
button13.Visible = false;
button14.Visible = false;
button15.Visible = false;
button16.Visible = false;
}
if (adim == 70)
{
button1.Visible = true;
button2.Visible = true;
button3.Visible = true;
button4.Visible = true;
button5.Visible = true;
button6.Visible = true;
button7.Visible = true;
button10.Visible = true;
button11.Visible = true;
button12.Visible = false;
button13.Visible = false;
button14.Visible = false;
button15.Visible = false;
button16.Visible = false;
}
if
(adim == 60)
{
button1.Visible = true;
button2.Visible = true;
button3.Visible = true;
button4.Visible = true;
button5.Visible = true;
button6.Visible = true;
button7.Visible = true;
button10.Visible = true;
button11.Visible = true;
button12.Visible = true;
button13.Visible = false;
button14.Visible = false;
button15.Visible = false;
button16.Visible = false;
}
if (adim == 50)
{
button1.Visible = true;
button2.Visible = true;
button3.Visible = true;
button4.Visible = true;
button5.Visible = true;
button6.Visible = true;
button7.Visible = true;
button10.Visible = true;
button11.Visible = true;
button12.Visible = true;
button13.Visible = true;
button14.Visible = false;
button15.Visible = false;
button16.Visible = false;
}
if (adim == 40)
{
button1.Visible = true;
button2.Visible = true;
button3.Visible = true;
button4.Visible = true;
button5.Visible = true;
button6.Visible = true;
button7.Visible = true;
button10.Visible = true;
button11.Visible = true;
button12.Visible = true;
button13.Visible = true;
button14.Visible = true;
button15.Visible = false;
button16.Visible = false;
}
if (adim == 30)
{
button1.Visible = true;
button2.Visible = true;
button3.Visible = true;
button4.Visible = true;
button5.Visible = true;
button6.Visible = true;
button7.Visible = true;
button10.Visible = true;
button11.Visible = true;
button12.Visible = true;
button13.Visible = true;
button14.Visible = true;
button15.Visible = true;
button16.Visible = false;
}
if (adim == 20)
{
button1.Visible = true;
button2.Visible = true;
button3.Visible = true;
button4.Visible = true;
button5.Visible = true;
button6.Visible = true;
button7.Visible = true;
button10.Visible = true;
button11.Visible = true;
button12.Visible = true;
button13.Visible = true;
button14.Visible = true;
button15.Visible = true;
button16.Visible = true;
}
}
}
private void
Form1_Load(object sender, EventArgs e)
{
button1.Visible = false;
button2.Visible = false;
button3.Visible = false;
button4.Visible = false;
button5.Visible = false;
button6.Visible = false;
button7.Visible = false;
button10.Visible = false;
button11.Visible = false;
button12.Visible = false;
button13.Visible = false;
button14.Visible = false;
button15.Visible = false;
button16.Visible = false;
}
}
}
Hiç yorum yok:
Yorum Gönder