protected void Calendar1_SelectionChanged(object sender, EventArgs e) { TextBox3.Text = Calendar1.SelectedDate.ToString("yyyy-MM-dd"); Button10.Focus(); Calendar1.Visible = false; TextBox3.Visible = true; }
protected void Button2_Click(object sender, EventArgs e) { int CustomerID = Convert.ToInt32(custID.Text); int index = GridView1.SelectedIndex; if (index < 0) { MessageBox.Show("Select a row in available slips table first!"); Button10.Focus(); return; } string slipID = GridView1.Rows[index].Cells[1].Text; int SlipID = Convert.ToInt32(slipID); DateTime ArriveDate = Convert.ToDateTime(TextBox3.Text); DateTime LeaveDate = Convert.ToDateTime(TextBox4.Text); int qq1 = Data_Layer.LeaseDB.AddSlip(SlipID, CustomerID, ArriveDate, LeaveDate); if (qq1 > 0) { MessageBox.Show("Add a new lease"); // MessageBox.Show(TextBox3.Text); //MessageBox.Show(GridView2.Rows[0].Cells[4].Text); // GridView2.Rows[1].Cells[1].Text = TextBox3.Text; } else { MessageBox.Show("Adding new lease is not successul"); } GridView1.DataBind(); GridView2.DataBind(); Button10.Focus(); }
protected void Button11_Click(object sender, EventArgs e) { if ((TextBox1.Text == "") || (TextBox2.Text == "") || (TextBox3.Text == "") || (TextBox4.Text == "")) { MessageBox.Show(" width and length,arrive date, leave date must be filled! "); GridView1.Visible = false; } else { GridView1.Visible = true; if (GridView1.Rows.Count == 0) { MessageBox.Show("Sorry, we do not have available slips fit your boats on your date in this dock , please try other docks"); DropDownList1.Focus(); } Button10.Focus(); } }
protected void Calendar2_SelectionChanged(object sender, EventArgs e) { DateTime date1 = Convert.ToDateTime(TextBox3.Text); TextBox4.Text = Calendar2.SelectedDate.ToString("yyyy-MM-dd"); DateTime date2 = Convert.ToDateTime(TextBox4.Text); if (date2 > date1) { Button10.Focus(); Calendar2.Visible = false; TextBox4.Visible = true; } else { Button10.Focus(); Response.Write("<script>alert('leave date can not early than arrive date')</script>"); } }
protected void TextBox1_TextChanged(object sender, EventArgs e) { GridView1.DataBind(); Button10.Focus(); }
//protected void Button1_Click(object sender, EventArgs e) //{ // GridView2.DataBind(); // GridView2.Visible = true; // GridView1.DataBind(); //} protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { Button10.Focus(); }
protected void GridView2_RowDeleted(object sender, GridViewDeletedEventArgs e) { GridView1.DataBind(); Button10.Focus(); }
protected void Button16_Click(object sender, EventArgs e) { GridView4.Visible = true; Button10.Focus(); }
private void playBackPress(string key) { switch (key) { case "Q": Button1.PerformClick(); break; case "W": Button2.PerformClick(); break; case "E": Button3.PerformClick(); break; case "R": Button4.PerformClick(); break; case "A": Button5.PerformClick(); break; case "S": Button6.PerformClick(); break; case "D": Button7.PerformClick(); break; case "F": Button8.PerformClick(); break; case "Y": Button9.PerformClick(); break; case "U": Button10.PerformClick(); break; case "I": Button11.PerformClick(); break; case "O": Button12.PerformClick(); break; case "H": Button13.PerformClick(); break; case "J": Button14.PerformClick(); break; case "K": Button15.PerformClick(); break; case "L": Button16.PerformClick(); break; } }
//stimulates button presses when key is hit *really wanted the buttons to visually depress but this didnt do it private void click_handle(object sender, System.Windows.Input.KeyEventArgs e) { Console.WriteLine("Argument is: " + e.Key.ToString()); switch (e.Key) { case Key.Q: e.Handled = true; Button1.PerformClick(); break; case Key.W: e.Handled = true; Button2.PerformClick(); break; case Key.E: e.Handled = true; Button3.PerformClick(); break; case Key.R: e.Handled = true; Button4.PerformClick(); break; case Key.A: e.Handled = true; Button5.PerformClick(); break; case Key.S: e.Handled = true; Button6.PerformClick(); break; case Key.D: e.Handled = true; Button7.PerformClick(); break; case Key.F: e.Handled = true; Button8.PerformClick(); break; case Key.Y: e.Handled = true; Button9.PerformClick(); break; case Key.U: e.Handled = true; Button10.PerformClick(); break; case Key.I: e.Handled = true; Button11.PerformClick(); break; case Key.O: e.Handled = true; Button12.PerformClick(); break; case Key.H: e.Handled = true; Button13.PerformClick(); break; case Key.J: e.Handled = true; Button14.PerformClick(); break; case Key.K: e.Handled = true; Button15.PerformClick(); break; case Key.L: e.Handled = true; Button16.PerformClick(); break; case Key.LeftShift: e.Handled = true; if (isShift == 0) { Loop(); } else { storeLoop(); } break; } }
private void ItemBonuses() { if (item >= 1) { Button1.SetActive(true); } if (item >= 5) { Button5.SetActive(true); } if (item >= 10) { Button10.SetActive(true); } if (item >= 20) { Button20.SetActive(true); } if (item >= 30) { Button30.SetActive(true); } if (item >= 50) { Button50.SetActive(true); } if (item >= 75) { Button75.SetActive(true); } if (item >= 100) { Button100.SetActive(true); } if (item >= 115) { Button115.SetActive(true); } if (item >= 145) { Button145.SetActive(true); } if (item >= 150) { Button150.SetActive(true); } if (item >= 180) { Button180.SetActive(true); } if (item >= 200) { Button200.SetActive(true); } if (item == 0) { Button1.SetActive(false); } if (item < 5) { Button5.SetActive(false); } if (item < 10) { Button10.SetActive(false); } if (item < 20) { Button20.SetActive(false); } if (item < 30) { Button30.SetActive(false); } if (item < 50) { Button50.SetActive(false); } if (item < 75) { Button75.SetActive(false); } if (item < 100) { Button100.SetActive(false); } if (item < 115) { Button115.SetActive(false); } if (item < 145) { Button145.SetActive(false); } if (item < 150) { Button150.SetActive(false); } if (item < 180) { Button180.SetActive(false); } if (item < 200) { Button200.SetActive(false); } }
void ReleaseDesignerOutlets() { if (Button0 != null) { Button0.Dispose(); Button0 = null; } if (Button1 != null) { Button1.Dispose(); Button1 = null; } if (Button10 != null) { Button10.Dispose(); Button10 = null; } if (Button11 != null) { Button11.Dispose(); Button11 = null; } if (Button2 != null) { Button2.Dispose(); Button2 = null; } if (Button3 != null) { Button3.Dispose(); Button3 = null; } if (Button4 != null) { Button4.Dispose(); Button4 = null; } if (Button5 != null) { Button5.Dispose(); Button5 = null; } if (Button6 != null) { Button6.Dispose(); Button6 = null; } if (Button7 != null) { Button7.Dispose(); Button7 = null; } if (Button8 != null) { Button8.Dispose(); Button8 = null; } if (Button9 != null) { Button9.Dispose(); Button9 = null; } if (ResultLabel != null) { ResultLabel.Dispose(); ResultLabel = null; } }