コード例 #1
0
 public void refresh()
 {
     if (bp.block())
     {
         try
         {
             for (int i = 0; i < tableSource.Rows.Count; ++i)
             {
                 if (validator.check(tableSource.Rows[i]))
                 {
                     distribute(tableSource.Rows[i], bindChildCol);
                 }
             }
         }
         finally
         {
             bp.unblock();
         }
     }
 }
コード例 #2
0
 public void refresh()
 {
     if (!flags.isFlagEnabled(UpdateTypeFlags.stopRefresh))
     {
         if (bp.block())
         {
             try
             {
                 for (int i = 0; i < tableSource.Rows.Count; ++i)
                 {
                     if (validator.check(tableSource.Rows[i]))
                     {
                         distribute(tableSource.Rows[i], bindChildCol);
                     }
                 }
             }
             finally
             {
                 bp.unblock();
             }
         }
     }
 }
コード例 #3
0
        public void textChanged()
        {
            if (_block.block())
            {
                try
                {
                    if (_prevText != editor.Text)
                    {
                        if (isEmptyString(editor.Text))
                        {
                            _prevText = editor.Text;
                            return;
                        }
                        if (isValidString(editor.Text))
                        {
                            double curVal         = toValue(editor.Text);
                            double curValFiltered = checkBounds(curVal, editor.Minimum, editor.Maximum);

                            if (Math.Abs(curVal - curValFiltered) < ConstValues.minPositive)
                            {
                                _prevText = editor.Text;
                            }
                            else
                            {
                                _prevText = toText(curValFiltered);
                            }
                        }

                        if (editor.Text != _prevText)
                        {
                            try
                            {
                                editor.Text = _prevText;
                            }
                            catch { }
                        }
                    }
                }
                finally
                {
                    _block.unblock();
                }
            }
        }