private void OnNewProjectSettingsViewLoaded(object sender, RoutedEventArgs e) { TextBoxProjectName.Clear(); TextBoxProjectName.Focus(); TextBoxLocation.Clear(); TextBoxSolutionName.Clear(); CheckBoxProjectInRoot.IsChecked = false; }
private void ClearFields() { TextBoxYear.Clear(); TextBoxMonth.Clear(); TextBoxDay.Clear(); TextBoxFirstName.Clear(); TextBoxSecondName.Clear(); TextBoxLastName.Clear(); TextBoxLocation.Clear(); TextBoxPost.Clear(); }
protected void btnSubmit_Click(object sender, EventArgs e) { string locationName = ""; string msg = ""; //if (ddldistrict.SelectedIndex == 0) //{ // ClientScript.RegisterStartupScript(this.GetType(), "Popup", "ShowPopup('Select District');", true); // return; //} //else //{ // districtid = validations.remove_bad_words(ddldistrict.SelectedItem.Value.ToString()); //} if (TextBoxLocation.Text.Trim() == "") { ClientScript.RegisterStartupScript(this.GetType(), "Popup", "ShowPopup('Enter Location Name');", true); return; } else { if (validations.alpha_Slash_space(TextBoxLocation.Text.Trim()) != true) { ClientScript.RegisterStartupScript(this.GetType(), "Popup", "ShowPopup('Location Name: Alphabet Space and Slash(/) Only');", true); return; } else { locationName = validations.remove_bad_words(TextBoxLocation.Text.Trim()); } } if (btnSubmit.Text == "Submit") { msg = insert.insertLocations(TextBoxLocation.Text.Trim()); } else if (btnSubmit.Text == "Update") { msg = update.updateIncident("UpdateIncident", locationName, Session["IncidentId"].ToString()); } if (msg != "") { ClientScript.RegisterStartupScript(this.GetType(), "Popup", "ShowPopup('" + msg + "');", true); Bindgrid(); TextBoxLocation.Text = ""; TextBoxLocation.Focus(); btnSubmit.Text = "Submit"; } }
/// <summary> /// Create a textbox with x lines of text /// </summary> public static TextBox CreateTextBox(GraphicsDevice device, SpriteFont font, TextBoxLocation location, int borderSize, int padding, int offsetX, int offsetY, Color borderColor, Color backgroundColor, Color penColor) { TextBox tb = new TextBox(device, font); tb.Location = location; tb.Mode = TextBoxMode.List; tb.BorderSize = borderSize; tb.Padding = padding; tb.OffsetX = offsetX; tb.OffsetY = offsetY; tb.BorderColor = borderColor; tb.BackgroundColor = backgroundColor; tb.PenColor = penColor; return(tb); }
private void ButtonTryLoad_OnClick(object sender, RoutedEventArgs e) { var partQuery = from part in Entities.Parts orderby part.PartId descending select part; var loadedPart = partQuery.FirstOrDefault(x => x.PartNo == TextBoxPartNo.Text); if (loadedPart != null) { LoadPartPartial(loadedPart); ClearStatusbar(); ShowMessageInStatusbar("Part loaded"); TextBoxLocation.Focus(); } else { ClearStatusbar(); ShowMessageInStatusbar("Part no does not exist"); } }
private void ClearFields() { TextBoxLocation.Text = ""; TextBoxLocalLevel.Text = ""; TextBoxLocation.Focus(); }