private void Entry_TextInserted(object o, TextInsertedArgs args) { if ((int)args.Text[0] > 57 || (int)args.Text[0] < 48) { ; } }
void HandleEntryTextInserted(object sender, TextInsertedArgs args) { //Log.DebugFormat ("inserting {0}, ( = {1} ) = {2}", args.Text, open_parens, close_parens); //int start = args.Position - args.Length; for (int i = 0; i < args.Text.Length; i++) { char c = args.Text [i]; if (c == '(') { open_parens++; } else if (c == ')') { close_parens++; } } int pos = entry.Position + 1; int close_parens_needed = open_parens - close_parens; for (int i = 0; i < close_parens_needed; i++) { entry.TextInserted -= HandleEntryTextInserted; entry.InsertText(")", ref pos); close_parens++; entry.TextInserted += HandleEntryTextInserted; pos++; } //Log.DebugFormat ("done w/ insert, {0}, ( = {1} ) = {2}", args.Text, open_parens, close_parens); last_entry_text = entry.Text; QueueUpdate(); }
void ProjectNameTextInserted(object o, TextInsertedArgs args) { if (args.Text.IndexOf('\r') >= 0) { var textBox = (Entry)o; textBox.Text = textBox.Text.Replace("\r", string.Empty); } }
protected void OnEntryServerTextInserted(object o, TextInsertedArgs args) { try { if (entryName.Text == entryServer.Text.Remove(args.Position - 1, args.Length)) { entryName.Text = entryServer.Text; } } catch { } }
void CityEntryTextInserted(object o, TextInsertedArgs args) { if (this.HasFocus && completionListStore == null && !queryIsRunning) { Thread queryThread = new Thread(fillAutocomplete); queryThread.IsBackground = true; queryIsRunning = true; queryThread.Start(); } }
void PswEntry2_TextInserted(object o, TextInsertedArgs args) { if (pswEntry.Text != pswEntry2.Text) { this.submitButton.Hide(); } else { this.submitButton.Show(); } }
private void EntryTextChanges(object o, TextInsertedArgs args) { if (cityId != 0) { if (firstCompletion) { EmptyCompletion(); firstCompletion = false; } streetsDataLoader.LoadStreets(cityId, Text); } }
private void EntryTextChanges(object o, TextInsertedArgs args) { if (CityGuid != null) { if (_firstCompletion) { EmptyCompletion(); _firstCompletion = false; } _streetsDataLoader.LoadStreets(CityGuid, Text); } }
protected void OnSpinNTextInserted(object o, TextInsertedArgs args) { string temp = spinN.Text; Console.WriteLine(DateTime.Now.ToString("[HH:mm:ss.fff] ") + "OnSpinNTextInserted Event fired"); Console.WriteLine(DateTime.Now.ToString("[HH:mm:ss.fff] ") + "Value taken: " + temp); try { spinR.SetRange(0, Convert.ToDouble(temp)); } catch (FormatException) { } }
/// <summary> /// Callback method executed on TextInserted event by Entry widget to force only digits /// </summary> /// <param name="sender">Entry widget</param> /// <param name="args">Text inserted arguments</param> private void OnlyNumerical(object sender, TextInsertedArgs args) { Entry entry = (Entry)sender; if (args.NewText.Length == 1) { char inputKey = Convert.ToChar(args.NewText); int inputKeyPosition = Convert.ToInt32(args.Position); if (!Char.IsNumber(inputKey) && inputKey != '.') { entry.Text = entry.Text.Remove(inputKeyPosition - 1); } } }
private void OnBufferInsertText(object o, InsertTextArgs args) { TextInsertedHandler handler = TextInserted; if (handler != null) { TextInsertedArgs raise_args = new TextInsertedArgs(); raise_args.Args = new object [] { args.Text, args.Length, args.Pos.Offset }; handler(this, raise_args); } }
void OnBufferInsertText(object o, InsertTextArgs args) { var handler = TextInserted; if (handler != null) { var raise_args = new TextInsertedArgs { Args = new object[] { args.Text, args.Length, args.Pos.Offset } }; handler(this, raise_args); } }
protected void OnEntryDateTextInserted(object o, TextInsertedArgs args) { if (!_AutoSeparation) { return; } if (args.Length == 1 && (args.Position == 3 || args.Position == 6) && args.Text != System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.DateSeparator && args.Position == entryDate.Text.Length) { int Pos = args.Position - 1; entryDate.InsertText(System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.DateSeparator, ref Pos); args.Position++; } }
private void EntryTextChanges(object o, TextInsertedArgs args) { if (string.IsNullOrWhiteSpace(Text)) { _completionListStore?.Clear(); return; } if (StreetGuid != null) { HousesDataLoader.LoadHouses(Text, StreetGuid); return; } if (CityGuid != null) { HousesDataLoader.LoadHouses(Text, null, CityGuid); } }
protected void OnEntVariosTextInserted(object o, TextInsertedArgs args) { float total, importe, gasolina, varios; int cantidad; if (entCantidad.Text == "" || entImporte.Text == "" || entGasolina.Text == "" || entVarios.Text == "") { entTotal.Text = ""; } else { cantidad = int.Parse(entCantidad.Text); importe = float.Parse(entImporte.Text); gasolina = float.Parse(entGasolina.Text); varios = float.Parse(entVarios.Text); total = cantidad + importe + gasolina + varios; entTotal.Text = total.ToString(); } }
protected void SearchLocation(object sender, EventArgs e) { TextInsertedArgs arguments = (TextInsertedArgs)e; if (locationEntry.Text.Length > 3) { List <City> matchedCities = new List <City>(); foreach (City city in cities) { if (city.name.StartsWith(locationEntry.Text, StringComparison.InvariantCulture)) { matchedCities.Add(city); } } foreach (City matchedCity in matchedCities) { Console.WriteLine(matchedCity.name); } } }
protected void InputTextInserted(object o, TextInsertedArgs args) { Calculate(); }
void OnArgumentsTextInserted(object o, TextInsertedArgs args) { GetCommandDescriptor()._arguments = _inputArguments.Text; }
public void TextUpdated(object o, TextInsertedArgs args) { citiesDataLoader.LoadCities(Text); }
protected void OnEntryQueryTextInserted(object o, TextInsertedArgs args) { RunQuery(); }
void OnTextInserted(object o, TextInsertedArgs args) { UndoManager.AddUndoAction(new EditableInsertAction(editable, args.Position, args.Text, args.Length)); }
protected void OnYValBoxTextInserted(object o, TextInsertedArgs args) { try { UpdateValueBox(); } catch (Exception ex) { ReportError("Valuebox", ex); } }
private void NameEntryOnTextInserted(object o, TextInsertedArgs args) { NameTextChanged(); }
private void OnTextInserted(object o, TextInsertedArgs args) { undo_manager.AddUndoAction(new EditableInsertAction(editable, args.Position, args.NewText, args.NewTextLength)); }
private void EntryTextChanges(object o, TextInsertedArgs args) { _citiesDataLoader.LoadCities(Text); }