private void timer1_Tick(object sender, EventArgs e) { btnNext2.Location = new Point((int)wx[0], (int)wy[0]); btnPrev.Location = new Point((int)wx[1], (int)wy[1]); btnBack.Location = new Point((int)wx[2], (int)wy[2]); progressBarNext.Location = new Point((int)wx[0], (int)wy[0]); progressBarPrev.Location = new Point((int)wx[1], (int)wy[1]); progressBarBack.Location = new Point((int)wx[2], (int)wy[2]); if (lap == 0) { wx[0]++; wx[1]--; wy[2]--; } if (lap == 1) { wx[0]--; wx[1]++; wy[2]++; } if (wx[0] == 1670) { lap = 1; } if (wx[0] == 1370) { lap = 0; } kendali.CekTombol(); }
private void timer1_Tick(object sender, EventArgs e) { btnUser.Location = new Point((int)wx[0], (int)wy[0]); progressBar1.Location = new Point((int)wx[0], (int)wy[0]); if (lap == 0) //titik awal { wx[0]++; } if (lap == 1) //titik akhir, balik { wx[0]--; } if (wx[0] == 1450) { lap = 1; //titik akhir } if (wx[0] == 1150) { lap = 0; } kendali.CekTombol(); }
//timer berjalan untuk menggerakkan tombol yang ada pada halaman form private void timer1_Tick(object sender, EventArgs e) { BtnStart.Location = new Point((int)wx[0], (int)wy[0]); BtnBack.Location = new Point((int)wx[1], (int)wy[1]); if (lap == 0) { wx[0]++; wy[1]++; } if (lap == 1) { wx[0]--; wy[1]--; } if (wx[0] == 1144) { lap = 1; } if (wx[0] == 744) { lap = 0; } kendali.CekTombol(); }
private void timer1_Tick(object sender, EventArgs e) { btnInfo.Location = new Point((int)wx[0], (int)wy[0]); btnPeta.Location = new Point((int)wx[1], (int)wy[1]); btnBack.Location = new Point((int)wx[2], (int)wy[2]); progressBarInform.Location = new Point((int)wx[0], (int)wy[0]); progressBarPeta.Location = new Point((int)wx[1], (int)wy[1]); progressBarBack.Location = new Point((int)wx[2], (int)wy[2]); if (lap == 0) { wx[0]--; wx[1]++; wy[2]--; } if (lap == 1) { wx[0]++; wx[1]--; wy[2]++; } if (wx[0] == 75) { lap = 1; } if (wx[0] == 375) { lap = 0; } kendaliuser.CekTombol(); }
private void timer1_Tick(object sender, EventArgs e) { BtnPrev.Location = new Point((int)wx[0], (int)wy[0]); BtnNext.Location = new Point((int)wx[1], (int)wy[1]); BtnPlay.Location = new Point((int)wx[2], (int)wy[2]); BtnBack.Location = new Point((int)wx[3], (int)wy[3]); if (lap == 0) { wy[0]++; wy[1]--; wx[2]++; wx[3]--; } if (lap == 1) { wy[0]--; wy[1]++; wx[2]--; wx[3]++; } if (wx[2] == 688) { lap = 0; } if (wx[2] == 1134) { lap = 1; } kendali.CekTombol(); }
//eventhandler timer untuk menggerakkan tombol, serta menjalankan method CekTombol di kelas kendali private void TimerTombol_Tick(object sender, EventArgs e) { BtnTahu.Location = new Point((int)wx[1], (int)wy[1]); progressBar2.Location = new Point((int)wx[1], (int)wy[1]); BtnMisi.Location = new Point((int)wx[0], (int)wy[0]); progressBar1.Location = new Point((int)wx[0], (int)wy[0]); if (lap == 0) //titik awal { wy[0]--; wy[1]++; } if (lap == 1) //titik akhir, balik { wy[0]++; wy[1]--; } if (wy[0] == 427) { lap = 1; //titik akhir } if (wy[0] == 800) { lap = 0; } kendali.CekTombol(); }
//timer untuk menggerakkan tombol private void TombolTimer_Tick(object sender, EventArgs e) { PBOpsiKiri.Location = new Point((int)wx[0], (int)wy[0]); PBOpsiKanan.Location = new Point((int)wx[1], (int)wy[1]); //progressBarInform.Location = new Point((int)wx[0], (int)wy[0]); //progressBarPeta.Location = new Point((int)wx[1], (int)wy[1]); //progressBarBack.Location = new Point((int)wx[2], (int)wy[2]); if (lap == 0) { wy[0]--; wy[1]++; } if (lap == 1) { wy[0]++; wy[1]--; } if (wy[0] == 75) { lap = 1; } if (wy[0] == 475) { lap = 0; } kendaliuser.CekTombol(); }
private void timer1_Tick(object sender, EventArgs e) { BtnBack.Location = new Point((int)wx[0], (int)wy[0]); if (lap == 0) { wy[0]++; } if (lap == 1) { wy[0]--; } if (wy[0] == 823) { lap = 1; } if (wy[0] == 232) { lap = 0; } kendali.CekTombol(); }
private void timer1_Tick(object sender, EventArgs e) { btnSatu.Location = new Point((int)wx[0], (int)wy[0]); btnDua.Location = new Point((int)wx[1], (int)wy[1]); btnTiga.Location = new Point((int)wx[2], (int)wy[2]); btnHome.Location = new Point((int)wx[3], (int)wy[3]); progressBarSatu.Location = new Point((int)wx[0], (int)wy[0]); progressBarDua.Location = new Point((int)wx[1], (int)wy[1]); progressBarTiga.Location = new Point((int)wx[2], (int)wy[2]); progressBarHome.Location = new Point((int)wx[3], (int)wy[3]); if (lap == 0) { wy[0]++; wx[1]++; wy[2]--; wx[3]--; } if (lap == 1) { wy[0]--; wx[1]--; wy[2]++; wx[3]++; } if (wx[3] == 786) { lap = 1; } if (wx[3] == 1086) { lap = 0; } kendali.CekTombol(); }
private void timer1_Tick(object sender, EventArgs e) { btnTentang.Location = new Point((int)wx[0], (int)wy[0]); btnKegiatan.Location = new Point((int)wx[1], (int)wy[1]); btnPrestasi.Location = new Point((int)wx[2], (int)wy[2]); btnHome.Location = new Point((int)wx[3], (int)wy[3]); progressBarTentang.Location = new Point((int)wx[0], (int)wy[0]); progressBarKegiatan.Location = new Point((int)wx[1], (int)wy[1]); progressBarPrestasi.Location = new Point((int)wx[2], (int)wy[2]); progressBarHome.Location = new Point((int)wx[3], (int)wy[3]); if (lap == 0) { wy[0]--; wy[1]++; wx[2]++; wx[3]--; } if (lap == 1) { wy[0]++; wy[1]--; wx[2]--; wx[3]++; } if (wx[3] == 786) { lap = 1; } if (wx[3] == 1086) { lap = 0; } kendali.CekTombol(); }