void OnSourceFocusOutEvent(object o, FocusOutEventArgs args) { if (IsParallelMode) { OutEntry.ModifyText (StateType.Normal); IsParallelMode = false; } }
protected virtual void OnEntry1FocusOutEvent(object o, Gtk.FocusOutEventArgs args) { //При потере фокуса присваиваем введёное значение //закрытой переменной mypropertydata. mypropertydata = entry1.Text; }
protected void ColumnFocusOut(object o, FocusOutEventArgs args) { Entry startColumn = o as Entry; if (startColumn != null) { ColumnChanged (this, new StringEventArgs(startColumn.Text)); } }
protected void ComparisonValueFocusOut(object o, FocusOutEventArgs args) { Entry compEntry = o as Entry; if (compEntry != null) { ComparisonChanged(this, new StringEventArgs(compEntry.Text)); } }
void OnFocusOutEvent(object o, Gtk.FocusOutEventArgs args) { if (AcceptUnknownCities && !Text.Contains(City)) { City = Text; } }
void FilterTextBox_FocusOutEvent(object o, FocusOutEventArgs args) { if (string.IsNullOrWhiteSpace(entry.Text) || entry.Text == DefaultInfo) { SetShowInfo(DefaultInfo); } }
private void ComboBox_FocusOutEvent(object o, Gtk.FocusOutEventArgs args) { string text = PintaCore.Actions.View.ZoomComboBox.ComboBox.ActiveText; double percent; if (!TryParsePercent(text, out percent)) { (PintaCore.Actions.View.ZoomComboBox.ComboBox as Gtk.ComboBoxEntry).Entry.Text = temp_zoom; return; } if (percent > 3600) { PintaCore.Actions.View.ZoomComboBox.ComboBox.Active = 0; } }
protected virtual void OnFindLoseFocus(object o, Gtk.FocusOutEventArgs args) { findEntry.Visible = false; }
void OnFocusOut(object sender, FocusOutEventArgs args) { int tmp; // maximum displayed line number source.GetLineYrange (sourceBuf.StartIter, out tmp, out Height); Height *= (sourceBuf.LineCount < 15 ? sourceBuf.LineCount : 15); Height += (2 * (int)source.BorderWidth) + 10; SetSizeRequest (Width, Height); //Sets the minimum size of a widget //changed = true; source.Editable = false; source.HighlightCurrentLine = false; }
private void on_entry_focus_out(object sender, Gtk.FocusOutEventArgs args) { QueueDraw(); }
// // Invoked when the search results panel losts focus // void LostFocus(object sender, FocusOutEventArgs a) { search_tree.Selection.UnselectAll(); }
void HandleFocusOutEvent (object o, FocusOutEventArgs args) { this.Hide (); }
void HandleFocusOutEvent(object o, FocusOutEventArgs args) { _searchView.GrabFocus (); }
private void Parent_FocusOutEvent(object o, Gtk.FocusOutEventArgs args) { _isFocused = false; }
/// <summary> /// Event handler for when the completion window loses focus /// </summary> /// <param name="sender">Sender object</param> /// <param name="e">Event arguments</param> private void OnLeaveCompletion(object sender, FocusOutEventArgs e) { if (!initingCompletion) HideCompletionWindow(); }
protected void OnEntryDateFocusOutEvent(object o, FocusOutEventArgs args) { if (entryDate.Text == "") { startDate = null; endDate = null; return; } DateTime start, end; var dateRegex = new Regex (@"[0-9]{1,2}\/[0-9]{1,2}\/[0-9]{4}"); var matches = dateRegex.Matches (entryDate.Text); if (matches.Count == 2 && DateTime.TryParse (matches [0].Value, out start) && DateTime.TryParse (matches [1].Value, out end)) { startDate = start; EndDate = end; } else { UpdateEntryText (); } }
/// <summary>User has changed the selection.</summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnSelectionChanged(object sender, FocusOutEventArgs e) { if (Changed != null) Changed.Invoke(this, e); }
protected void OnEntryR2FocusOutEvent(object o, FocusOutEventArgs args) { ValidateR2(); }
protected virtual void OnEventbox1FocusOutEvent(object o, Gtk.FocusOutEventArgs args) { Console.WriteLine("asdfasf"); }
protected virtual void OnButton1FocusOutEvent(object o, Gtk.FocusOutEventArgs args) { Console.WriteLine("blahblah!"); }
protected virtual void OnFocusOutEvent(object o, Gtk.FocusOutEventArgs args) { Console.WriteLine("Buga"); }
private void widget_FocusOutEvent(object o, FocusOutEventArgs args) { args.RetVal = OnWidgetFocusOutEvent (); }
/// <summary> /// The memo has been updated and now send the changed text to the model. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void richTextBox1_Leave(object sender, FocusOutEventArgs e) { if (MemoLeave != null) { EditorArgs args = new EditorArgs(); args.TextString = textView.Buffer.Text; MemoLeave(this, args); } }
void TextArea_FocusOutEvent (object o, FocusOutEventArgs args) { FocusLost?.Invoke (this, EventArgs.Empty); }
private void OnFocusOut (object o, FocusOutEventArgs args) { Core.Base.Ui.Menus.SetPasteSensitivity(false); Core.Base.Ui.Status.ClearEditRelatedStatus(); }
/// <summary> /// Handle loss of focus by removing the accelerators from the popup menu /// </summary> /// <param name="o"></param> /// <param name="args"></param> private void Treeview1_FocusOutEvent(object o, FocusOutEventArgs args) { (treeview1.Toplevel as Gtk.Window).RemoveAccelGroup(accel); }
void HandleEntryFocusOutEvent(object o, FocusOutEventArgs args) { UpdateValueByBindings(); SetBackgroundByState(false); }
void OnEditFocusOut (object sender, FocusOutEventArgs args) { CompletionWindowManager.HideWindow (); }
/// <summary> /// Handle loss of focus by removing the accelerators from the popup menu /// </summary> /// <param name="o"></param> /// <param name="args"></param> private void FocusOutEvent(object o, FocusOutEventArgs args) { ((o as Widget).Toplevel as Gtk.Window).RemoveAccelGroup(accel); }
protected void OnEntryServerFocusOutEvent(object o, FocusOutEventArgs args) { entryName.ModifyText (StateType.Normal, new Gdk.Color (0, 0, 0)); }
private void OnLimitFocusLost(object o, FocusOutEventArgs args) { SaveLimit(); }
void FocusOut (object sender, FocusOutEventArgs args) { if (TabMode == Mode.Editor) text_editor.GrabFocus (); }
void HandleFocusOutEvent (object o, FocusOutEventArgs args) { selectionColor = ColorStyle.SelectedInactiveText; }
private void HandleFontSizeFocusOut(object o, FocusOutEventArgs args) { string text = size_combo.ComboBox.ActiveText; int size; if (!int.TryParse (text, out size)) { (size_combo.ComboBox as Gtk.ComboBoxEntry).Entry.Text = temp_size; return; } PintaCore.Chrome.Canvas.GrabFocus (); UpdateFont (); size_combo.ComboBox.Changed += HandleSizeChanged; }
private void OnEntryChangeDone(object o, Gtk.FocusOutEventArgs args) { try { Gtk.Entry entry = (Gtk.Entry)o; FieldOrProperty field = fieldTable[widgetTable.IndexOf(entry)]; PropertyChangeCommand command; if (field.Type == typeof(string)) { if ((string)field.GetValue(Object) == entry.Text) { return; } command = new PropertyChangeCommand( "Changed value of " + field.Name, field, Object, entry.Text); } else if (field.Type == typeof(float)) { float parsed = Single.Parse(entry.Text); if (parsed.ToString() != entry.Text && parsed.ToString() + "." != entry.Text) { entry.Text = parsed.ToString(); } if ((float)field.GetValue(Object) == parsed) { return; } command = new PropertyChangeCommand( "Changed value of " + field.Name, field, Object, parsed); } else if (field.Type == typeof(int)) { int parsed = Int32.Parse(entry.Text); if (parsed.ToString() != entry.Text) { entry.Text = parsed.ToString(); } if ((int)field.GetValue(Object) == parsed) { return; } command = new PropertyChangeCommand( "Changed value of " + field.Name, field, Object, parsed); } else { throw new ApplicationException( "PropertiesView.OnEntryChangeDone, \"" + field.Type.FullName + "\" is not implemented yet. " + "If you are a developer, please fix it, else report this full error message and what you did to cause it to the supertux developers."); } command.Do(); UndoManager.AddCommand(command); } catch (FormatException fe) { errorLabel.Text = fe.Message; return; } catch (Exception e) { ErrorDialog.Exception(e); return; } errorLabel.Text = String.Empty; }
private void OnTempDirFocusOutEvent(object o, Gtk.FocusOutEventArgs a) { prefs["ByteBuffer.TempDir"] = TempDirEntry.Text; }
private void OnPasswordFocusOut(object o, FocusOutEventArgs args) { if (bPasswordChanged) SavePassword(); }
protected void ValidateOnFocusOutEvent(object o, FocusOutEventArgs args) { if (Validate == null) return; if (!Validate (this.Text, ref parsedText)) { this.ModifyBase (StateType.Normal, invalidColor); } else { if (Normalize != null) { this.Text = Normalize (parsedText); } } }
protected virtual void OnEntryFocusOutEvent(object o, Gtk.FocusOutEventArgs args) { QueueDraw(); }
private void OnEntryFocusOutEvent (object o, FocusOutEventArgs args) { if (!accel_group_active) { AddAccelGroup (ActionService.UIManager.AccelGroup); accel_group_active = true; } (o as Widget).FocusOutEvent -= OnEntryFocusOutEvent; }
protected virtual void OnEntry1FocusOutEvent(object o, Gtk.FocusOutEventArgs args) { string conString = "server=localhost;database=ldap;User ID=someid;password=somepassword;"; string sql = String.Format("Select * From user where barcode='{0}'", txtBarcode.Text); string path = "/home/path/to/project/Photo/"; string expDate = ""; string usrName = ""; //creating connection with database MySqlConnection dbcon; dbcon = new MySqlConnection(conString); try { dbcon.Open(); } catch (Exception ex) { Console.WriteLine(ex.ToString()); //Console.WriteLine("MySQL Database Connection Problem !!!"); } //reading data from mysql MySqlCommand dbcmd = new MySqlCommand(sql, dbcon); MySqlDataReader reader = dbcmd.ExecuteReader(); while (reader.Read()) { txtFirstname.Text = Convert.ToString(reader["first_name"]); txtLastname.Text = Convert.ToString(reader["last_name"]); imgUser.File = path + Convert.ToString(reader["photo"]); expDate = Convert.ToString(reader["expiration_datetime"]); usrName = Convert.ToString(reader["username"]); } dbcon.Close(); //changeing time from sting to datetime DateTime dt = Convert.ToDateTime(expDate); DateTime now = DateTime.Now; txtStatus.Text = dt.ToString(); //checking if the account has expired if (dt > now) { //connecting with ldap server string server = "ip of the server"; string dn = "cn=Manager,dc=itc"; string up = "password"; string dn1 = "uid=" + usrName + ",ou=people,dc=itc"; // Create a new LdapConnection instance LdapConnection connl = new LdapConnection(); // Connect to the server connl.Connect(server, 389); //Bind connl.Bind(dn, up); //Modify user in ldap entry ArrayList modList = new ArrayList(); LdapAttribute attribute; //Replace the value of loginshell attribute attribute = new LdapAttribute("loginShell", "/bin/sh"); modList.Add(new LdapModification(LdapModification.REPLACE, attribute)); LdapModification[] mods = new LdapModification[modList.Count]; //Type mtype=Type.GetType("Novell.Directory.LdapModification"); mods = (LdapModification[])modList.ToArray(typeof(LdapModification)); //Modify the entry in the directory connl.Modify(dn1, mods); txtStatus.Text = "Account Activated!"; // Disconnect from server connl.Disconnect(); } else { txtStatus.Text = "Account Expired!"; } }
void HandleFocusOutEvent (object o, FocusOutEventArgs args) { selectionColor = ColorStyle.SelectedInactiveText; currentLineColor = ColorStyle.LineMarkerInactive; }
private void HandleFocusOutEvent(object o, FocusOutEventArgs args) { this.HideAll(); }
private void OnServerAddressFocusOut(object o, FocusOutEventArgs args) { if (bServerAddressChanged) SaveServerAddress(); }
void HandleFontSizeFocusOut(object o, FocusOutEventArgs args) { string text = size_combo.ComboBox.ActiveText; int size; if (!int.TryParse (text, out size)) { (size_combo.ComboBox as Gtk.ComboBoxEntry).Entry.Text = temp_size; return; } PintaCore.Chrome.DrawingArea.GrabFocus (); if (mode != EditingMode.NotEditing) { this.sizes = null; RedrawText (true); } size_combo.ComboBox.Changed += HandleSizeChanged; }