void OnSourceFocusOutEvent(object o, FocusOutEventArgs args)
 {
     if (IsParallelMode) {
         OutEntry.ModifyText (StateType.Normal);
         IsParallelMode = false;
     }
 }
示例#2
0
 protected virtual void OnEntry1FocusOutEvent(object o,
                                              Gtk.FocusOutEventArgs args)
 {
     //При потере фокуса присваиваем введёное значение
     //закрытой переменной mypropertydata.
     mypropertydata = entry1.Text;
 }
示例#3
0
 protected void ColumnFocusOut(object o, FocusOutEventArgs args)
 {
     Entry startColumn = o as Entry;
                 if (startColumn != null) {
                         ColumnChanged (this, new StringEventArgs(startColumn.Text));
                 }
 }
示例#4
0
 protected void ComparisonValueFocusOut(object o, FocusOutEventArgs args)
 {
     Entry compEntry = o as Entry;
                 if (compEntry != null) {
                         ComparisonChanged(this, new StringEventArgs(compEntry.Text));
                 }
 }
示例#5
0
 void OnFocusOutEvent(object o, Gtk.FocusOutEventArgs args)
 {
     if (AcceptUnknownCities && !Text.Contains(City))
     {
         City = Text;
     }
 }
示例#6
0
 void FilterTextBox_FocusOutEvent(object o, FocusOutEventArgs args)
 {
     if (string.IsNullOrWhiteSpace(entry.Text) || entry.Text == DefaultInfo)
     {
         SetShowInfo(DefaultInfo);
     }
 }
示例#7
0
        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;
            }
        }
示例#8
0
 protected virtual void OnFindLoseFocus(object o, Gtk.FocusOutEventArgs args)
 {
     findEntry.Visible = false;
 }
示例#9
0
        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;
        }
示例#10
0
 private void on_entry_focus_out(object sender, Gtk.FocusOutEventArgs args)
 {
     QueueDraw();
 }
示例#11
0
	//
	// Invoked when the search results panel losts focus
	//
	void LostFocus(object sender, FocusOutEventArgs a)
	{
		search_tree.Selection.UnselectAll();
	}
示例#12
0
			void HandleFocusOutEvent (object o, FocusOutEventArgs args)
			{
				this.Hide ();
			}
 void HandleFocusOutEvent(object o, FocusOutEventArgs args)
 {
     _searchView.GrabFocus ();
 }
示例#14
0
 private void Parent_FocusOutEvent(object o, Gtk.FocusOutEventArgs args)
 {
     _isFocused = false;
 }
示例#15
0
 /// <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 ();
            }
        }
示例#17
0
 /// <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);
 }
示例#18
0
 protected void OnEntryR2FocusOutEvent(object o, FocusOutEventArgs args)
 {
     ValidateR2();
 }
示例#19
0
 protected virtual void OnEventbox1FocusOutEvent(object o, Gtk.FocusOutEventArgs args)
 {
     Console.WriteLine("asdfasf");
 }
示例#20
0
 protected virtual void OnButton1FocusOutEvent(object o, Gtk.FocusOutEventArgs args)
 {
     Console.WriteLine("blahblah!");
 }
示例#21
0
 protected virtual void OnFocusOutEvent(object o, Gtk.FocusOutEventArgs args)
 {
     Console.WriteLine("Buga");
 }
示例#22
0
 private void widget_FocusOutEvent(object o, FocusOutEventArgs args)
 {
     args.RetVal = OnWidgetFocusOutEvent ();
 }
示例#23
0
文件: MemoView.cs 项目: hol353/ApsimX
 /// <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();
	}
示例#26
0
 /// <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);
 }
示例#27
0
 void HandleEntryFocusOutEvent(object o, FocusOutEventArgs args)
 {
     UpdateValueByBindings();
     SetBackgroundByState(false);
 }
		void OnEditFocusOut (object sender, FocusOutEventArgs args)
		{
			CompletionWindowManager.HideWindow ();
		}
示例#29
0
文件: GridView.cs 项目: hol353/ApsimX
 /// <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();
 }
示例#32
0
	void FocusOut (object sender, FocusOutEventArgs args)
	{
		if (TabMode == Mode.Editor)
			text_editor.GrabFocus ();	
	}
示例#33
0
		void HandleFocusOutEvent (object o, FocusOutEventArgs args)
		{
			selectionColor = ColorStyle.SelectedInactiveText;
		}
示例#34
0
        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;
        }
示例#35
0
 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;
 }
示例#36
0
 private void OnTempDirFocusOutEvent(object o, Gtk.FocusOutEventArgs a)
 {
     prefs["ByteBuffer.TempDir"] = TempDirEntry.Text;
 }
 private void OnPasswordFocusOut(object o, FocusOutEventArgs args)
 {
     if (bPasswordChanged)
     SavePassword();
 }
示例#38
0
 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();
 }
示例#40
0
        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;
		}
示例#43
0
 private void HandleFocusOutEvent(object o, FocusOutEventArgs args)
 {
     this.HideAll();
 }
 private void OnServerAddressFocusOut(object o, FocusOutEventArgs args)
 {
     if (bServerAddressChanged)
     SaveServerAddress();
 }
示例#45
0
文件: TextTool.cs 项目: xxgreg/Pinta
        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;
        }