コード例 #1
0
ファイル: EditorView.cs プロジェクト: oseledets/ApsimX
 /// <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();
     }
 }
コード例 #2
0
ファイル: TreeView.cs プロジェクト: mpandreucci/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 OnTreeLoseFocus(object o, FocusOutEventArgs args)
 {
     if (ContextMenu != null)
     {
         (treeview1.Toplevel as Gtk.Window).RemoveAccelGroup(ContextMenu.Accelerators);
     }
 }
コード例 #3
0
 private void entry_FocusOutEvent(object o, FocusOutEventArgs args)
 {
     this.UpDateData(delegate
     {
         this.SetWidgetValue();
     });
 }
コード例 #4
0
 //Events
 private void TimeZoneEntry_FocusOut(Object sender, FocusOutEventArgs e)
 {
     if (!_validTzRegions.Contains(_systemTimeZoneEntry.Text))
     {
         _systemTimeZoneEntry.Text = _timeZoneContentManager.SanityCheckDeviceLocationName();
     }
 }
コード例 #5
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);
     }
 }
コード例 #6
0
 private void Entry_FocusOutEvent2(object o, FocusOutEventArgs args)
 {
     if (this.isKeyPress)
     {
         if (string.IsNullOrEmpty(this.comboboxentry2.Entry.Text))
         {
             this.comboboxentry2.Entry.Text = this.entry2.ToString();
             return;
         }
         if (Convert.ToInt32(this.comboboxentry2.Entry.Text) > this.maxValue)
         {
             this.comboboxentry2.Entry.Text = this.maxValue.ToString();
         }
         if (Convert.ToInt32(this.comboboxentry2.Entry.Text) < this.minValue)
         {
             this.comboboxentry2.Entry.Text = this.minValue.ToString();
         }
         if (this.ValueChanged != null)
         {
             this.entry2 = Convert.ToInt32(this.comboboxentry2.Entry.Text);
             this.RaiseValueChanged((object)null, (System.Action)(() => this.ValueChanged((object)null, new EntryComboxEvent(1, this.entry2))));
         }
     }
     this.isKeyPress = false;
 }
コード例 #7
0
 private void OnServerAddressFocusOut(object o, FocusOutEventArgs args)
 {
     if (bServerAddressChanged)
     {
         SaveServerAddress();
     }
 }
コード例 #8
0
        private void EntryBuildingOnFocusOutEvent(object o, FocusOutEventArgs args)
        {
            var addressChanged = entryCity.City != _cityBeforeChange ||
                                 entryStreet.Street != _streetBeforeChange ||
                                 entryBuilding.House != _buildingBeforeChange;

            if (!addressChanged || !entryBuilding.OsmCompletion.HasValue)
            {
                return;
            }

            ViewModel.Entity.FoundOnOsm = entryBuilding.OsmCompletion.Value;

            entryBuilding.GetCoordinates(out var longitude, out var latitude);

            _cityBeforeChange     = entryCity.City;
            _streetBeforeChange   = entryStreet.Street;
            _buildingBeforeChange = entryBuilding.House;

            ViewModel.WriteCoordinates(latitude, longitude, false);

            if (entryBuilding.OsmHouse != null && !string.IsNullOrWhiteSpace(entryBuilding.OsmHouse.Name))
            {
                labelHouseName.Visible   = true;
                labelHouseName.LabelProp = entryBuilding.OsmHouse.Name;
            }
            else
            {
                labelHouseName.Visible = false;
            }
        }
コード例 #9
0
 private void OnPasswordFocusOut(object o, FocusOutEventArgs args)
 {
     if (bPasswordChanged)
     {
         SavePassword();
     }
 }
コード例 #10
0
 protected void OnFocusOutEvent(object sender, FocusOutEventArgs args)
 {
     if (game.Running)
     {
         PauseGame();
     }
 }
コード例 #11
0
 private void Entry_FocusOutEvent(object o, FocusOutEventArgs args)
 {
     if (this.isKeyPress)
     {
         this.FontValue();
     }
     this.isKeyPress = false;
 }
コード例 #12
0
 private void InputGenericCommand_FocusOutEvent(object o, FocusOutEventArgs args)
 {
     if (_hasChangedHistoryCommand)
     {
         SetCursorLastPos();
         _hasChangedHistoryCommand = false;
     }
 }
コード例 #13
0
 protected void OnTxtSerialDataFocusOutEvent(object o, FocusOutEventArgs args)
 {
     if (_keyPressed)
     {
         this.txtSerialData.IsFocus = true;
         _keyPressed = false;
     }
 }
コード例 #14
0
 void OnSourceFocusOutEvent(object o, FocusOutEventArgs args)
 {
     if (IsParallelMode)
     {
         OutEntry.ModifyText(StateType.Normal);
         IsParallelMode = false;
     }
 }
コード例 #15
0
 /// <summary>
 ///     Raises the username text view focus out event event.
 /// </summary>
 /// <param name="sender">The parameter is not used.</param>
 /// <param name="e">The parameter is not used.</param>
 private void OnUsernameTextViewFocusOutEvent(object sender, FocusOutEventArgs e)
 {
     if (string.IsNullOrEmpty(this.usernameTextView.Buffer.Text))
     {
         this.usernameTextView.Buffer.Text = "Username";
         this.youtubeController.Username   = string.Empty;
     }
 }
コード例 #16
0
 protected void OnEntryObjectFocusOutEvent(object o, FocusOutEventArgs args)
 {
     if (string.IsNullOrWhiteSpace(entryObject.Text))
     {
         Subject = null;
         OnChangedByUser();
     }
 }
コード例 #17
0
 /// <summary>
 ///     Raises the password text view focus out event event.
 /// </summary>
 /// <param name="sender">The parameter is not used.</param>
 /// <param name="e">The parameter is not used.</param>
 private void OnPasswordTextViewFocusOutEvent(object sender, FocusOutEventArgs e)
 {
     if (string.IsNullOrEmpty(this.passwordTextView.Buffer.Text))
     {
         this.passwordTextView.Buffer.Text = "Password";
         this.youtubeController.Password   = string.Empty;
     }
 }
コード例 #18
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 && textentry1.Text != lastText)
     {
         lastText = textentry1.Text;
         Changed.Invoke(this, e);
     }
 }
コード例 #19
0
 private void textView_FocusOutEvent(object o, FocusOutEventArgs args)
 {
     if (this.isKeyPress)
     {
         return;
     }
     this.UpDateData((System.Action)(() => this.SetTextViewWidget()));
 }
コード例 #20
0
 private void widget_FocusOutEvent(object o, FocusOutEventArgs args)
 {
     if (this.isKeyPress)
     {
         return;
     }
     this.UpDateData((System.Action)(() => this.SetWidgetValue()));
 }
コード例 #21
0
        protected void FocusOutStudent(object o, FocusOutEventArgs args)
        {
            var entry = o as Entry;

            if (entry.Text == "")
            {
                entry.Text = COMBO_STUDENT;
            }
        }
コード例 #22
0
        protected void FocusOutExercice(object o, FocusOutEventArgs args)
        {
            var entry = o as Entry;

            if (entry.Text == "")
            {
                entry.Text = COMBO_EXERCICE;
            }
        }
コード例 #23
0
        ///<summary>
        /// Handle DataView focus loss
        ///</summary>
        internal void OnFocusOutEvent(object o, FocusOutEventArgs args)
        {
            foreach (Area a in dvDisplay.Layout.AreaGroup.Areas)
            {
                a.IsActive = false;
            }

            dataView.FireFocusChangedEvent();
        }
コード例 #24
0
 /// <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);
     }
 }
コード例 #25
0
ファイル: MiscHelpers.cs プロジェクト: julmaxi/opdtab
        public static void EntryFilterFocusOut(object o, FocusOutEventArgs a)
        {
            Entry e = (Entry)o;

            // show some hint
            if (e.Text == "")
            {
                e.Layout.SetMarkup("  <i><span foreground='#AAAAAA'>Type here to filter</span></i>");
            }
        }
コード例 #26
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;
        }
コード例 #27
0
 private void textView_FocusOutEvent(object o, FocusOutEventArgs args)
 {
     if (!this.isKeyPress)
     {
         this.UpDateData(delegate
         {
             this.SetTextViewWidget();
         });
     }
 }
コード例 #28
0
ファイル: GridView.cs プロジェクト: zeespogeira/logicPOS
        private void OnFocusOutEvent(object o, FocusOutEventArgs a)
        {
            TreePath       spath;
            GridViewColumn scol;

            if (selection.GetSelected(out spath, out scol))
            {
                InvalidateCellRect(spath, scol);
            }
        }
コード例 #29
0
 /// <summary>
 /// User has left the edit box.
 /// </summary>
 /// <param name="o"></param>
 /// <param name="args"></param>
 private void OnLeave(object o, FocusOutEventArgs args)
 {
     try
     {
         OnLeave(o, new EventArgs());
     }
     catch (Exception err)
     {
         ShowError(err);
     }
 }
コード例 #30
0
 private void txt_Password_FocusOutEvent(object o, FocusOutEventArgs args)
 {
     if (string.IsNullOrEmpty(this.txt_Password.Text))
     {
         this.txt_Password.Text = this._passwordText;
     }
     else
     {
         this.RaiseValueChanged((object)null, (System.Action)(() => this.UpdateDate()));
     }
 }