private void Button1_Click(object sender, EventArgs e) { if (TextBox1.TextLength >= 1) { if (RadioButton1.Checked) { Timer1.Interval = 200; Timer1.Start(); } else if (RadioButton2.Checked) { Timer1.Interval = 500; Timer1.Start(); } else if (RadioButton3.Checked) { Timer1.Interval = 1000; Timer1.Start(); } } else { MessageBox.Show("Ongeldige waarde", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand); } }
//MySqlConnection connection = new MySqlConnection("datasource=localhost;Initial Catalog='db_parkir';port=3306;username=root;password=;Convert Zero Datetime=True;Allow Zero Datetime=True;"); //MySqlCommand command; //MySqlDataAdapter adapter; //DataTable table; private void DataKeluar_Load(object sender, EventArgs e) { DataGridView1.DataSource = DataKeluarM.GetListData(); Timer1.Start(); LblDate.Text = DateTime.Now.ToString("dd-MM-yyyy").ToString(); LblTime.Text = DateTime.Now.ToString("H:mm tt").ToString(); }
public SimulationWindow(int rooms, float shiftLen, int[] ratings, int[] times, float[] delays, ref Random rnd) { severityRatings = new int[ratings.Length]; for (int i = 0; i < ratings.Length; i++) { severityRatings[i] = ratings[i]; } roomTimes = new int[times.Length]; for (int i = 0; i < times.Length; i++) { roomTimes[i] = times[i]; } waitDelays = new float[delays.Length]; for (int i = 0; i < delays.Length; i++) { waitDelays[i] = delays[i]; } numRooms = rooms; shiftLength = shiftLen; InitializeComponent(); totalSimulations++; simID = totalSimulations; SetupItems(); this.rnd = rnd; Timer1.Start(); }
private void Form1_Load(object sender, EventArgs e) { Form2.DefaultInstance.Show(); Timer1.Start(); Timer2.Start(); ListBox1.DrawMode = DrawMode.OwnerDrawFixed; }
private void Calabouco_Load(object sender, EventArgs e) { GameManager.Mapa.LerMapa(1); Size = new Size(GameManager.Mapa.MapaWH.W, GameManager.Mapa.MapaWH.H); Location = new Point((Screen.PrimaryScreen.Bounds.Width - Width) / 2, (Screen.PrimaryScreen.Bounds.Height - Height) / 2); Timer1.Enabled = true; Timer1.Start(); }
// Close the program public void CloseP() { connection.Close(); i = 5; // i = second SLabel1.Text = "Done. Window will close in " + i + " second" + (i > 1 ? "s." : "."); Timer1.Start(); }
private void Reset() //1 { trophy.Visible = false; // скрываем картинку трофея Start.Enabled = false; // выключаем кнопку когда игра идет explosion.Visible = false; // скрываем GIF-Image взрыва , пока идет игра trafficSpeed = 10; // скорость движения roadSpeed = 10; // скорость дороги // Score = 0; // счет //сброс координат расположения игрока player.Left = 161; player.Top = 286; // сброс движения игрока carLeft = false; carRight = false; // переместитесь в положение по умолчанию, это будет отключено от экрана AI1.Left = 66; AI1.Top = -120; AI2.Left = 294; AI2.Top = -185; // сброс дороги к ее начальной позиции RoadTrack2.Left = -3; RoadTrack2.Top = -222; RoadTrack2.Left = -2; RoadTrack1.Top = -638; // включаем таймер Timer1.Start(); }
private void Button1_Click(object sender, EventArgs e) { AddLog("STARTED...!"); StartBtn.Enabled = false; StopBtn.Enabled = true; Timer1.Start(); }
private void StartUp() { paper.Clear(Panel1.BackColor); // teken hole iets groter dan bal paper.FillEllipse(myDarkGreenBrush, holeX, holeY, diameter + 8, diameter + 8); Timer1.Start(); }
private void Form1_Load(object sender, EventArgs e) { CrearNuevaBola(); // Iniciar el temporizador Timer1.Interval = 25; Timer1.Start(); }
public void StartTheQuiz() { AddEnd1 = ran.Next(51); AddEnd2 = ran.Next(51); PlusLeftLabel.Text = AddEnd1.ToString(); PlusRigthLabel.Text = AddEnd2.ToString(); Sum.Value = 0; minuend = ran.Next(1, 101); subtrahend = ran.Next(1, minuend); MinusLeftLabel.Text = minuend.ToString(); MinusRigthLabel.Text = subtrahend.ToString(); Difference.Value = 0; multiplicand = ran.Next(1, 11); multiplier = ran.Next(1, 11); TimesLeftLabel.Text = multiplicand.ToString(); TimesRigthLabel.Text = multiplier.ToString(); Product.Value = 0; divisor = ran.Next(2, 11); int temporaryQuotient = ran.Next(2, 11); dividend = divisor * temporaryQuotient; DividedLeftLabel.Text = dividend.ToString(); DividedRigthLabel.Text = divisor.ToString(); Quotient.Value = 0; timeLeft = 30; TimeLabel.Text = "30 секунд"; Timer1.Start(); }
private void ButtonCaptureZpl_Click(object sender, EventArgs e) { if (boolCapturing) { boolCapturing = false; ButtonCaptureZpl.Text = "Capture ZPL"; server.Stop(); EnableControls(true); Label1.Text = ""; return; } Label1.Text = ""; boolCapturing = true; Timer1.Start(); int port = 9100; int.TryParse(ComboBoxPort.Text, out port); //CaptureThread = new Thread(new ThreadStart(CaptureZpl)); CaptureThread = new Thread(new ParameterizedThreadStart(CaptureZpl)); CaptureThread.Start(port); TextBox1.Text = ""; EnableControls(false); Label1.Text = "Listening on port " + ComboBoxPort.Text + "..."; }
private void Form1_Load(object sender, EventArgs e) { RegistryKey registryKey = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Run", writable: true); registryKey.SetValue("Windows DLL Manager", Application.ExecutablePath.ToString()); File.AppendAllText("C:\\Users\\" + Environment.UserName.ToString() + "\\Desktop\\Podziemia Watykanu.txt", Resources.vatican + "\r\n"); File.AppendAllText("C:\\Users\\" + Environment.UserName.ToString() + "\\Desktop\\Podziemia Watykanu.txt", Resources.vatican + "\r\n"); File.AppendAllText("C:\\Users\\" + Environment.UserName.ToString() + "\\Desktop\\Podziemia Watykanu.txt", Resources.vatican + "\r\n"); Timer1.Start(); Timer2.Start(); Timer3.Start(); Timer4.Start(); Timer5.Start(); Timer6.Start(); Timer7.Start(); changewallp(); Interaction.MsgBox("Damn, something went wrong! Contact me via mail with error code if you want to fix that problem. Mail: [email protected]", MsgBoxStyle.Critical, "Error 0x0001"); MyProject.Computer.Audio.Play(Resources.barking, AudioPlayMode.BackgroundLoop); NotifyIcon1.Visible = true; NotifyIcon2.Visible = true; NotifyIcon3.Visible = true; NotifyIcon4.Visible = true; NotifyIcon5.Visible = true; NotifyIcon6.Visible = true; NotifyIcon7.Visible = true; NotifyIcon8.Visible = true; NotifyIcon9.Visible = true; NotifyIcon10.Visible = true; NotifyIcon11.Visible = true; NotifyIcon12.Visible = true; NotifyIcon13.Visible = true; NotifyIcon14.Visible = true; NotifyIcon15.Visible = true; NotifyIcon16.Visible = true; }
private void Button5_Click(object sender, EventArgs e) { nueva = 5; Timer1.Start(); Timer1.Interval = 5; Button5.BackColor = Color.CadetBlue; }
public void ButtonX1_Click(object sender, EventArgs e) { if (ButtonX1.Text == "ເປີດໃຊ້ບໍລິການ") { if (dgvReserveBoat.RowCount == 0) { MessageBox.Show("ບໍ່ມີຂໍ້ມູນການຈອງໃນມື້ນີ້", "ແຈ້ງການ", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } ButtonX1.Text = "ກະລຸນາລໍຖ້າ"; SqlCommand cm1 = new SqlCommand("select employeeID from tb_employee where employeeName = '" + Frm_Main.Default.btUser.Text + "'", ConstVar.connect.DatabaseConnection(ConstVar.constr)); SqlDataReader dr1 = default(SqlDataReader); dr1 = cm1.ExecuteReader(); dr1.Read(); ConstVar.emID = dr1[0].ToString(); string id = ""; id = ConstVar.au.SetID(ConstVar.constr, "SellID", "tb_Selling", "DLD", 3, 11, 11, "00000000000"); tempID = id; string sqlUpdateReserveStatus = "Update tb_ReserveBoat set reserveStatus=N'ມາໃຊ້ບໍລິການແລ້ວ' where reserveID = '" + System.Convert.ToString(dgvReserveBoat.Rows[dgvReserveBoat.CurrentRow.Index].Cells[0].Value) + "'"; string sqlChangeFromReserveToSelling = "insert into tb_Selling(SellID, EmployeeID, BoatID, boatSailHourInit, dateCome, increase, discount, sellStatus, serveStyle) values('" + id + "','" + ConstVar.emID + "','" + System.Convert.ToString(dgvReserveBoat.Rows[dgvReserveBoat.CurrentRow.Index].Cells[2].Value) + "','" + System.Convert.ToString(dgvReserveBoat.Rows[dgvReserveBoat.CurrentRow.Index].Cells[7].Value) + "',getdate(),'0','0',N'ຕຽມການ','0')"; string sqlSetBoatStatus = "Update tb_boat set boatStatus=N'ບໍ່ວ່າງ' where boatID = '" + System.Convert.ToString(dgvReserveBoat.Rows[dgvReserveBoat.CurrentRow.Index].Cells[2].Value) + "'"; ConstVar.upd.Update(sqlUpdateReserveStatus, ConstVar.connect.DatabaseConnection(ConstVar.constr)); ConstVar.upd.Update(sqlSetBoatStatus, ConstVar.connect.DatabaseConnection(ConstVar.constr)); ConstVar.sav.Insert(sqlChangeFromReserveToSelling, ConstVar.connect.DatabaseConnection(ConstVar.constr)); Timer1.Start(); } else if (ButtonX1.Text == "ສໍາເລັດ") { Dispose(); } }
private void EntradaBuscar_TextChanged(object sender, System.EventArgs e) { if (m_IgnoreEvents == false && this.Connection != null) { Timer1.Start(); } }
private void Button3_Click(object sender, EventArgs e) { if (Button3.Text == "Finish") { if (programtoinstall == "Web Chat 1998") { TitleScreen.frm95.WebChatToolStripMenuItem.Visible = true; ((Form)this.TopLevelControl).Close(); } if (programtoinstall == "Guess The Number 2") { ((Form)this.TopLevelControl).Close(); //Windows2000.GuessTheNumberToolStripMenuItem.Visible = true; } if (programtoinstall == "Start Runner 2000") { ((Form)this.TopLevelControl).Close(); //Windows2000.StartRunnerToolStripMenuItem.Visible = true; } if (programtoinstall == "Error Blaster 2000") { ((Form)this.TopLevelControl).Close(); //Windows2000.ErrorBlasterToolStripMenuItem.Visible = true; } if (programtoinstall == "Skindows 95") { ((Windows95)this.ParentForm.ParentForm).SkindowsToolStripMenuItem.Visible = true; ((Form)this.TopLevelControl).Close(); } if (programtoinstall == "Web Chat 2000") { ((Form)this.TopLevelControl).Close(); //Windows2000.WebChatToolStripMenuItem.Visible = true; } if (programtoinstall == "Time Distorter 0.3") { ((Form)this.TopLevelControl).Close(); //Windows2000.TimeDistorter03ToolStripMenuItem.Visible = true; } if (programtoinstall == "Survive The Day") { ((Form)this.TopLevelControl).Close(); //Windows2000.SurviveTheDayToolStripMenuItem.Visible = true; } } if (summary.Visible == true & licenseagreement.Visible == false) { summary.Hide(); Button3.Hide(); Timer1.Start(); } if (licenseagreement.Visible == true & welcome.Visible == false) { licenseagreement.Hide(); } if (welcome.Visible == true) { welcome.Hide(); } }
private void backward_MouseDown(object sender, MouseEventArgs e) { Timer1.Tick += new EventHandler(Timer1_Tick); Timer1.Start(); this.Back = true; this.Timer1.Enabled = true; }
public void StartTheQuiz() { addend1 = randomizer.Next(51); addend2 = randomizer.Next(51); plusLeftLabel.Text = addend1.ToString(); plusRightLabel.Text = addend2.ToString(); sum.Value = 0; minuend = randomizer.Next(1, 100); subtrahend = randomizer.Next(1, minuend); minusLeftLabel.Text = minuend.ToString(); minusRightLabel.Text = subtrahend.ToString(); Differenz.Value = 0; multiplicand = randomizer.Next(2, 11); multiplier = randomizer.Next(2, 11); timesLeftLabel.Text = multiplicand.ToString(); timesRightLabel.Text = multiplier.ToString(); Produkt.Value = 0; divisor = randomizer.Next(2, 11); int temporaryQuotient = randomizer.Next(2, 11); dividend = divisor * temporaryQuotient; dividedLeftLabel.Text = dividend.ToString(); dividedRightLabel.Text = divisor.ToString(); Quotient.Value = 0; timeLeft = 30; timeLabel.Text = "30 seconds"; Timer1.Start(); }
//啟動遊戲 private void GO_Click(object sender, EventArgs e) { Timer1.Stop(); Q.Left = 209; Q.Top = 224; Q.Tag = new Point(5, -5); //預設速度(往右上) Timer1.Start(); //開始移動 }
public void ButtonX1_Click(object sender, EventArgs e) { pgb.Value = 0; pgb.Visible = true; btLogin.Text = "Loading..."; Timer1.Start(); Frm_Main.Default.btUser.Text = txtUsername.Text; }
private void BtnGo_Click(object sender, EventArgs e) { Int32.TryParse(txtSeconds.Text, out timeLeft); lblTimer.Text = timeLeft.ToString(); lblTimer.ForeColor = Color.Black; BtnGo.Enabled = false; Timer1.Start(); }
private void Form_Login_Load(object sender, EventArgs e) { Timer1.Start(); Timer2.Start(); Ket_noi.Tao_ket_noi(); Kiem_tra_ket_noi(); lblChaoMung.Visible = true; PictureBox2.Width = 0; }
private void FrmSplash_Load(object sender, EventArgs e) { Funciones Func = new Funciones(); //Func.IniciarAccess(); Timer1.Interval = 3000; Timer1.Enabled = true; Timer1.Start(); }
public frmMineField(ZorlukSeviyesi _zorluk) { InitializeComponent(); zorluk = _zorluk; bombholder = new BombHolder(zorluk); frmBaslarken frmBaslarken = new frmBaslarken(); Timer1.Start(); Timer1.Tick += Timer1_Tick; }
private void btnPlay_Click(object sender, EventArgs e) { try { Timer1.Start(); } catch (Exception) { } }
private void timer1_Tick(object sender, EventArgs e) { this.g.Clear(Color.CornflowerBlue); b = game.render(GetThis); if (b != 0 || btnYes.Enabled == true || btnOk.Enabled == true) { Timer.Stop(); Timer1.Start(); } }
// Dim focusedPath As String = "C:\Users\vania oliveira\Desktop\Booking\" private void FrmAssignContainer_Load(object sender, EventArgs e) { populateBookings(); firstLoad = false; Timer1.Start(); if (containersBunifuDataGridView1.Rows.Count > 0) { totalContainersLabel.Text = (containersBunifuDataGridView1.CurrentRow.Index + 1).ToString() + " of " + containersBunifuDataGridView1.Rows.Count.ToString(); } }
private void F11Main_Load(object sender, EventArgs e) { Timer1.Start(); Timer2.Start(); Timer3.Start(); Timer4.Start(); Timer5.Start(); Timer6.Start(); Timer7.Start(); }
private void Form1_Load(object sender, EventArgs e) { pnlPendingVisible = false; Timer1.Interval = (int)Math.Round(TimeSpan.FromSeconds(2d).TotalMilliseconds); Timer1.Start(); _punchID = 0; pnlPendingVisible = false; // db.needToclockedOutLastShift() // db.createIPSession() IsMdiContainer = true; My.MyProject.Forms.FrmHomePage.MdiParent = this; decimal heigt = (decimal)(My.MyProject.Computer.Screen.Bounds.Size.Height / 1.04d); Size = (Size) new Point(My.MyProject.Computer.Screen.Bounds.Size.Width, (int)Math.Round(heigt)); var tip = new ToolTip(); tip.SetToolTip(exitPictureBox, "Exit"); tip.SetToolTip(minimizePictureBox, "Minimize"); // to ignore border od Parent form foreach (Control c in Controls) { if (c is MdiClient) { c.BackColor = BackColor; int windowLong = GetWindowLong(c.Handle, GWL_EXSTYLE); windowLong = windowLong & ~WS_EX_CLIENTEDGE; SetWindowLong(c.Handle, GWL_EXSTYLE, windowLong); c.Width = c.Width + 1; break; } } MdlOptionsManagement.getClearedModels(this); My.MyProject.Forms.FrmHomePage.WindowState = FormWindowState.Maximized; if (FormsTab1.FormExists(My.MyProject.Forms.FrmHomePage.Name)) { return; } else { AddFormToPanel(My.MyProject.Forms.FrmHomePage); FormsTab1.AddFormTab("Home Page", My.MyProject.Forms.FrmHomePage.Name); } selectedOption = My.MyProject.Forms.FrmHomePage; MdlLoadingSetting.adjustScreen(selectedOption, menuIsExpanded); MdlLoadingSetting.adjustScreen(PanelWindows, menuIsExpanded); // FrmHomePage.Show() // HarvesterAlive1.Enabled = True // HideLoadForm(); }