private void ClearAfterDelete() { DataChangeOff(); LoadData(); SearchTB.Clear(); SearchStatusL.Text = "Number of results: " + Selected + "/" + x.Count; }
private void RemoveButton_Click(object sender, EventArgs e) { try { string id = ((AppMessage)MessagesLB.SelectedIndex())?.Id; if (!string.IsNullOrEmpty(id) && _messages.Remove(id)) { if (!_messages.SaveMessages()) { MessageBox.Show("Unable to save some or all messages.", "Error Occurred.", MessageBoxButtons.OK, MessageBoxIcon.Error); } ClearMessageDetails(); ToggleButtons(false, DASH); SearchTB.SetText(string.Empty); UpdateMessages(); ClearMessageDisplay(); } } catch (Exception) { //Something happened } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { SearchTB.Focus(); MyDataBind(); } }
private void ClearWorkPlace() { foreach (UIElement workPlaceChild in WorkPlace.Children) { if (workPlaceChild.Visibility == Visibility.Visible) { workPlaceChild.Visibility = Visibility.Hidden; } } SearchTB.Clear(); }
// searches for the specified gallery and sets it to selected if exists private void SearchGalBtn_Click(object sender, EventArgs e) { if (!string.IsNullOrWhiteSpace(SearchTB.Text)) { int target = Searcher.GallerySearch(SearchTB.Text, galleries); if (target >= 0) { GalleryList.SelectedItem = galleries.ElementAt(target); } } SearchTB.Clear(); }
public void Cleanup() { _controls.Remove(_parentId, SearchTB.GetId()); _controls.Remove(_parentId, MessageTB.GetId()); _controls.Remove(_parentId, PreviewTB.GetId()); _controls.Remove(_parentId, AuthorsTB.GetId()); _controls.Remove(_parentId, SourcesTB.GetId()); _controls.Remove(_parentId, MessagesLB.GetId()); _controls.Remove(_parentId, Title.GetId()); _controls.Remove(_parentId, Status.GetId()); _controls.Remove(_parentId, Date_Created.GetId()); _controls.Remove(_parentId, Time_Created.GetId()); _controls.Remove(_parentId, Last_Displayed_Date.GetId()); _controls.Remove(_parentId, Last_Displayed_Time.GetId()); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Session["DoctorGUID"] == null) { Util.ShowMessage("用户登录超时,请重新登录!", "../Login.aspx"); Response.End(); } else { SearchTB.Focus(); MyDataBind(); } } }
private void CreateButton_Click(object sender, EventArgs e) { if (_messages.Add()) { if (!_messages.SaveMessages()) { MessageBox.Show("Unable to save some or all messages.", "Error Occurred.", MessageBoxButtons.OK, MessageBoxIcon.Error); } ClearMessageDetails(); ToggleButtons(false, DASH); SearchTB.SetText(string.Empty); UpdateMessages(); ClearMessageDisplay(); } }
// searches for the specified image and sets it to selected if exists private void SearchImgBtn_Click(object sender, EventArgs e) { if (!string.IsNullOrWhiteSpace(SearchTB.Text)) { int target = Searcher.ImageSearch(SearchTB.Text, selectedGallery.Images); if (target >= 0) { // load img ImageGallery.ClearSelection(); ImageGallery.CurrentCell = ImageGallery.Rows[target].Cells[0]; //ImageGallery.Rows[target].Selected = true; } } SearchTB.Clear(); }
private TextBox Focused() { if (NameTb.Focus()) { return(NameTb); } else if (ValueTb.Focus()) { return(ValueTb); } else if (DescriptionTb.Focus()) { return(DescriptionTb); } else if (SearchTB.Focus()) { return(SearchTB); } else { return(NameTb); } }
/// <summary> /// Updates the messages view /// </summary> public void UpdateMessagesView() { SearchTB.SetText(string.Empty); UpdateMessages(); ToggleButtons(false, DASH); }
private void SearchTB_MouseDown(object sender, MouseButtonEventArgs e) { SearchTB.Focusable = true; SearchTB.CaretIndex = SearchTB.CaretIndex; SearchTB.Focus(); }
// call it with: string repeatPassword = PromptDialog.Prompt("Repeat password", "Password confirm", inputType: PromptDialog.InputType.Password) // SedResult ret = SedWindow.Prompt(); void SedWindow_Loaded(object sender, RoutedEventArgs e) { SearchTB.Focus(); }
private void EmptyButton_Click(object sender, RoutedEventArgs e) { SearchTB.Clear(); PerformDictionaryPrint(_mainWindow.Serializer.TermList); }
private void SearchTB_Leave(object sender, EventArgs e) { SearchTB.AddText(SearchPlaceholder); }
private void SearchTB_Enter(object sender, EventArgs e) { SearchTB.RemoveText(SearchPlaceholder); }