private void BtnSearch_Click_1(object sender, EventArgs e) { SearchClienttAnswer answer = clientService.Search(TxtSearch.Text); Client client = answer.Client; if (client != null) { FillTextBoxes ( client.FirstName, client.SecondName, client.LastName, client.SecondLastName, client.Cedula, client.Sex, client.DateOfBorn.ToString(), client.Telephone, client.E_mail, client.AddressHome, client.Neighborhood, client.City ); DisplayButtons(true, false, false); } else { MessageBox.Show(answer.Message); } EnabledComponets(false); TxtSearch.Text = ""; TxtSearch.Focus(); }
private void SearchEntity_Load(object sender, EventArgs e) { TxtSearch.BackColor = Color.White; TxtSearch.Focus(); materialRaisedButton3.Visible = true; ResetDataGrid(); }
private void OpenSearch() { SearchManager.SearchBox = TxtSearch; SearchManager.TextArea = m_rScintilla_TextArea; if (!SearchIsOpen) { SearchIsOpen = true; InvokeIfNeeded(delegate() { PanelSearch.Visible = true; TxtSearch.Text = SearchManager.LastSearch; TxtSearch.Focus(); TxtSearch.SelectAll(); }); } else { InvokeIfNeeded(delegate() { TxtSearch.Focus(); TxtSearch.SelectAll(); }); } }
public void OpenSearch() { SearchManager.SearchBox = TxtSearch; SearchManager.TextArea = textControl; if (!SearchIsOpen) { SearchIsOpen = true; InvokeIfNeeded(delegate() { PanelSearch.Visible = true; TxtSearch.Text = SearchManager.LastSearch; TxtSearch.Focus(); TxtSearch.SelectAll(); }); } else { InvokeIfNeeded(delegate() { TxtSearch.Focus(); TxtSearch.SelectAll(); }); } }
private void Window_Activated(object sender, EventArgs e) { MainContent.InvalidateVisual(); TxtSearch.Focus(); TxtSearch.CaretIndex = TxtSearch.Text.Length; }
public FrmPurReturnManger() { InitializeComponent(); loaddata(); TxtSearch.Text = ""; TxtSearch.Focus(); }
private void BtnSearch_Click(object sender, EventArgs e) { SearchProductAnswer answer = productService.Search(TxtSearch.Text); Product product = answer.Product; if (product != null) { FillTextBoxes ( product.ID, product.Name, product.UnitValue.ToString(), product.UnitMeasure, product.Quantity.ToString(), product.IVA.ToString() ); DisplayButtons(true, false, false); } else { MessageBox.Show(answer.Message); } TxtSearch.Text = ""; TxtSearch.Focus(); }
public WeatherCityAddView() { InitializeComponent(); DataContext = new WeatherCityAddViewModel(); TxtSearch.Focus(); }
public MainForm() { InitializeComponent(); TxtSearch.Focus(); GetCountryData(); }
private void BtnNew_Click(object sender, RoutedEventArgs e) { TxtSearch.Focus(); TxtName.Text = string.Empty; BtnAdd.IsEnabled = true; DgdData.SelectedIndex = -1; Counter = 1; _add = true; }
private void BtnNew_Click(object sender, RoutedEventArgs e) { TxtSearch.Focus(); TxtSearch.Text = TxtFirstName.Text = TxtLastName.Text = TxtFatherName.Text = TxtNationalCode.Text = TxtBirthDay.Text = TxtMobile.Text = TxtDescription.Text = string.Empty; BtnAdd.IsEnabled = true; _selectDgd = false; DgdPerson.SelectedIndex = -1; CboGender.SelectedIndex = 0; }
private void OwnedFormOnFormClosing(object sender, FormClosingEventArgs formClosingEventArgs) { if (formClosingEventArgs.CloseReason == CloseReason.UserClosing) { PanPrincipal.Panel1.Enabled = true; LblTitle.Text = ""; TxtSearch.Focus(); } }
void ViewBox_Load(object sender, EventArgs e) { TxtSearch.Focus(); DataSet ds = new ServiceController().GetAllServies(); AvailableServices = DSParser.ParseServices(ref ds); if (AvailableServices != null && AvailableServices.Count > 0) { SetAdapter(); } }
protected override void OnGotFocus(System.EventArgs e) { base.OnGotFocus(e); //set focus to input-box switch (FBoxType) { case TextEditorHelperBoxTypes.GotoLineBox: TxtGotoLine.Focus(); case TextEditorHelperBoxTypes.SearchBox: TxtSearch.Focus(); } }
private void BtnNew_Click(object sender, RoutedEventArgs e) { TxtSearch.Focus(); TxtMain.Text = string.Empty; TxtSecondary.Text = string.Empty; TxtPart.Text = string.Empty; TxtDescription.Text = string.Empty; BtnAdd.IsEnabled = true; DgdData.SelectedIndex = -1; Counter = 1; _add = true; }
private void BtnNew_Click(object sender, RoutedEventArgs e) { TxtSearch.Focus(); TxtFileNum.Text = TxtFileYear.Text = TxtPermitNum.Text = TxtPermitYear.Text = TxtMarlik.Text = TxtVoteNum.Text = TxtMantaghe.Text = TxtNahie.Text = TxtMahaleh.Text = TxtBlock.Text = TxtMelk.Text = TxtRadif.Text = TxtPostalCode.Text = TxtAddress.Text = TxtDescription.Text = TxtSearch.Text = string.Empty; TxtDate.Text = PersianDate.Today.ToString(); LblMarlik.Content = null; DgdPerson.ItemsSource = null; DgdPlaque.ItemsSource = null; _createPersons = null; _createPlaque = null; PersonId = null; PersonName = null; PersonFamily = null; PersonFather = null; PersonCode = null; PlaqueId = null; PlaqueMain = null; PlaqueSecondary = null; PlaquePart = null; PlaqueDescription = null; _createPersons = new List <CreatePerson>(); _createPlaque = new List <CreatePlaque>(); PersonId = new List <int>(); PersonName = new List <string>(); PersonFamily = new List <string>(); PersonFather = new List <string>(); PersonCode = new List <string>(); PlaqueId = new List <int>(); PlaqueMain = new List <int?>(); PlaqueSecondary = new List <int?>(); PlaquePart = new List <int?>(); PlaqueDescription = new List <string>(); DgdPerson.SelectedIndex = DgdPlaque.SelectedIndex = DgdFile.SelectedIndex = -1; CboFileType.SelectedIndex = CboViolation.SelectedIndex = -1; _searchLength = 0; BtnAdd.IsEnabled = true; }
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == (Keys.Control | Keys.F)) { TxtSearch.Focus(); return(true); } else if (keyData == (Keys.Control | Keys.N)) { dsh.AddNewService(); return(true); } return(base.ProcessCmdKey(ref msg, keyData)); }
private void InitMarketAnalysis() { Task.Run(async() => { Dispatcher?.Invoke(() => { TxtSearch.IsEnabled = false; FaLoadIcon.Visibility = Visibility.Visible; InitUi(); }); #region Set MainWindow height and width and center window Dispatcher?.Invoke(() => { Height = Settings.Default.MainWindowHeight; Width = Settings.Default.MainWindowWidth; if (Settings.Default.MainWindowMaximized) { WindowState = WindowState.Maximized; } CenterWindowOnScreen(); }); #endregion Dispatcher?.Invoke(() => { TxtBoxPlayerModeUsername.Text = Settings.Default.SavedPlayerInformationName; }); var isItemListLoaded = await StatisticsAnalysisManager.GetItemListFromJsonAsync(); if (!isItemListLoaded) { MessageBox.Show(LanguageController.Translation("ITEM_LIST_CAN_NOT_BE_LOADED"), LanguageController.Translation("ERROR")); } Dispatcher?.Invoke(() => { if (isItemListLoaded) { FaLoadIcon.Visibility = Visibility.Hidden; TxtSearch.IsEnabled = true; TxtSearch.Focus(); } }); }); }
private void Window_PreviewTextInput(object sender, TextCompositionEventArgs e) { if (e.OriginalSource != TxtSearch) { if ((char.IsLetterOrDigit(e.Text[0]) || char.IsWhiteSpace(e.Text[0])) && e.Text != "\r") { TxtSearch.Text = TxtSearch.Text + e.Text; TxtSearch.Focus(); TxtSearch.SelectionStart = TxtSearch.Text.Length; e.Handled = true; } } }
private void materialRaisedButton1_Click_1(object sender, EventArgs e) { if (TxtSearch.Text == "") { MessageBox.Show("Ingrese algun dato", "Google LLC", MessageBoxButtons.OK, MessageBoxIcon.Information); TxtSearch.Focus(); } else { LoadData(TxtSearch.Text); materialRaisedButton3.Visible = true; materialRaisedButton2.Location = new Point(458, 82); } }
private void FindTextOnPage(bool next = true) { bool first = lastSearch != TxtSearch.Text; lastSearch = TxtSearch.Text; if (lastSearch.CheckIfValid()) { CurBrowser.GetBrowser().Find(0, lastSearch, true, false, !first); } else { CurBrowser.GetBrowser().StopFinding(true); } TxtSearch.Focus(); }
private void BtnNew_Click(object sender, RoutedEventArgs e) { TxtSearch.Focus(); TxtSearch.Focus(); TxtPatientId.Text = string.Empty; TxtFirstName.Text = string.Empty; TxtLastName.Text = string.Empty; CboGender.SelectedIndex = 0; TxtTell.Text = string.Empty; TxtMobile.Text = string.Empty; TxtAddress.Text = string.Empty; TxtDescription.Text = string.Empty; BtnAutoId_Click(null, null); BtnAdd.IsEnabled = true; DgdPatient.SelectedIndex = -1; }
public void ShowFor(TextEditX dad, TextEditorControl editor, bool replaceMode) { Editor = editor; Dad = dad; _search.ClearScanRegion(); var sm = editor.ActiveTextAreaControl.SelectionManager; if (sm.HasSomethingSelected && sm.SelectionCollection.Count == 1) { var sel = sm.SelectionCollection[0]; if (sel.StartPosition.Line == sel.EndPosition.Line) { TxtSearch.Text = sm.SelectedText; } else { _search.SetScanRegion(sel); } } else { // Get the current word that the caret is on Caret caret = editor.ActiveTextAreaControl.Caret; int start = TextUtilities.FindWordStart(editor.Document, caret.Offset); int endAt = TextUtilities.FindWordEnd(editor.Document, caret.Offset); TxtSearch.Text = editor.Document.GetText(start, endAt - start); } //ReplaceMode = replaceMode; this.Owner = (Form)editor.TopLevelControl; this.Show(); TxtSearch.SelectAll(); TxtSearch.Focus(); if (!_highlightGroups.ContainsKey(_editor)) { _highlightGroups[_editor] = new HighlightGroup(_editor); } HighlightGroup group = _highlightGroups[_editor]; group.ClearMarkers(); }
private void CbMode_SelectionChanged(object sender, SelectionChangedEventArgs e) { var mode = (ComboboxMarketMode)CbMode.SelectedItem; switch (mode?.Mode) { case ViewMode.Normal: HideAllGrids(); GridNormalMode.Visibility = Visibility.Visible; TxtSearch.Focus(); return; case ViewMode.Player: HideAllGrids(); GridPlayerMode.Visibility = Visibility.Visible; TxtBoxPlayerModeUsername.Focus(); return; } }
private void New() { TxtSearch.Focus(); LblVoteNum.Content = LblMarlik.Content = LblFileType.Content = LblViolation.Content = LblDate.Content = LblPostalCode.Content = TxtSearch.Text = string.Empty; DgdPerson.ItemsSource = null; DgdPlaque.ItemsSource = null; _createPersons = null; _createPlaque = null; PersonId = null; PersonName = null; PersonFamily = null; PersonFather = null; PersonCode = null; PlaqueId = null; PlaqueMain = null; PlaqueSecondary = null; PlaquePart = null; PlaqueDescription = null; _createPersons = new List <CreatePerson>(); _createPlaque = new List <CreatePlaque>(); PersonId = new List <int>(); PersonName = new List <string>(); PersonFamily = new List <string>(); PersonFather = new List <string>(); PersonCode = new List <string>(); PlaqueId = new List <int>(); PlaqueMain = new List <int?>(); PlaqueSecondary = new List <int?>(); PlaquePart = new List <int?>(); PlaqueDescription = new List <string>(); DgdPerson.SelectedIndex = DgdPlaque.SelectedIndex = DgdFile.SelectedIndex = -1; _searchLength = 0; }
private void BtnNew_Click(object sender, RoutedEventArgs e) { TxtSearch.Focus(); TxtDate.Text = PersianDate.Today.ToString(); TxtHavlehNumber.Text = string.Empty; TxtHavlehDate.Text = PersianDate.Today.ToString(); TxtHavalehEndDate.Text = PersianDate.Today.ToString(); TxtNum.Text = "1"; LblMobile.Content = null; LblPelak.Content = null; BtnAutoId_Click(null, null); BtnAdd.IsEnabled = true; CboFactory.SelectedIndex = -1; CboBuyer.SelectedIndex = -1; CboDriver.SelectedIndex = -1; CboVehicle.SelectedIndex = 0; CboCapacity.SelectedIndex = 0; CboProduct.SelectedIndex = 0; CboCounty.SelectedIndex = 0; CboProvince.SelectedIndex = 0; DgdHavaleh.SelectedIndex = -1; DgdProduct.SelectedIndex = -1; DgdProduct.ItemsSource = null; _createProduct = null; _s1 = null; _s2 = null; _s3 = null; _s4 = null; _s5 = null; _createProduct = new List <CreateProduct>(); _s1 = new List <byte>(); _s2 = new List <byte>(); _s3 = new List <byte>(); _s4 = new List <string>(); _s5 = new List <string>(); Counter = 1; _add = true; }
private void FrmMain_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.N && e.Modifiers == Keys.Control) //Ctrl+N { 登记公文ToolStripMenuItem_Click(null, null); } if (e.KeyCode == Keys.L && e.Modifiers == Keys.Control) //Ctrl+L { 新增流转ToolStripMenuItem_Click(null, null); } if (e.KeyCode == Keys.C && e.Modifiers == Keys.Control) //Ctrl+L { 新增操作ToolStripMenuItem_Click(null, null); } if (e.KeyCode == Keys.F && e.Modifiers == Keys.Control) //Ctrl+L { PopulateDataGridView(); TxtSearch.Focus(); } }
private void OpenSearch() { if (!searchOpen) { searchOpen = true; InvokeIfNeeded(delegate() { PanelSearch.Visible = true; TxtSearch.Text = lastSearch; TxtSearch.Focus(); TxtSearch.SelectAll(); }); } else { InvokeIfNeeded(delegate() { TxtSearch.Focus(); TxtSearch.SelectAll(); }); } }
public ListPopUp(IEnumerable <ListItemResult> listContents, string message = "") { _suppress = true; InitializeComponent(); var newContents = new List <DisplayResult>(); foreach (var item in listContents) { newContents.Add(new DisplayResult { Display = item.Name, Result = item.Id }); } Init(newContents, message); _suppress = false; TxtSearch.Focus(); }
private void BtnNew_Click(object sender, RoutedEventArgs e) { TxtSearch.Focus(); TxtDocterId.Text = string.Empty; TxtFirstName.Text = string.Empty; TxtLastName.Text = string.Empty; CboGender.SelectedIndex = 0; TxtTell.Text = string.Empty; TxtMobile.Text = string.Empty; TxtAddress.Text = string.Empty; CboSpecialty.SelectedIndex = 0; CboProvince.SelectedIndex = 0; CboCounty.SelectedIndex = 0; TxtDescription.Text = string.Empty; BtnAutoId_Click(null, null); BtnAdd.IsEnabled = true; DgdDoctor.SelectedIndex = -1; Counter = 1; _add = true; Counter = 1; }