Beispiel #1
0
        /// <summary>
        /// 更新処理(Renderingで処理される)
        /// </summary>
        private void Update(Object sender, EventArgs e)
        {
            if (0 <= NativeMethods.GetKeyState(NativeMethods.VK_MIDDLE))
            {
                ((Popup)this.Parent).IsOpen = false;
                return;
            }

            if (NativeMethods.GetCursorPos(out var point))
            {
                var currentMousePos = new Point(point.X, point.Y);
                var move            = (currentMousePos - _prevMousePos).X;
                if (IncrementMouseMoveThreshold < Math.Abs(move))
                {
                    var inc = (move < 0.0) ? -_addUnit : _addUnit;
                    if (IncrementMouseMoveXFixed)
                    {
                        NativeMethods.SetCursorPos((Int32)_prevMousePos.X, (Int32)currentMousePos.Y);
                    }
                    else
                    {
                        _prevMousePos = currentMousePos;
                    }
                    Incremented?.Invoke(this, new IncrementedEventArgs()
                    {
                        Increment = (Decimal)inc
                    });
                }
            }
        }
Beispiel #2
0
        private void iObservable_Incremented(int i_Increment)
        {
            if (m_ProgressBar != null)
            {
                m_ProgressBar.Increment(i_Increment);
                m_Value += i_Increment;
            }

            if (Incremented != null)
            {
                Incremented.Invoke(i_Increment);
            }
        }
Beispiel #3
0
        public void IncrementByOne()
        {
            m_ProgressBar.Value++;
            if (Incremented != null)
            {
                Incremented.Invoke(1);
            }

            if (m_ProgressBar.Value == m_ProgressBar.Maximum)
            {
                if (Finished != null)
                {
                    Finished.Invoke();
                }
            }
        }
 public void Increment()
 {
     _currentCount++;
     Incremented?.Invoke(_currentCount);
 }
Beispiel #5
0
 protected void Increment()
 {
     Incremented?.Invoke(_counter++);
 }