Exemplo n.º 1
0
        public virtual bool ScrollValueOnDoubleClick(bool forward, ScrollValueOnDoubleClickSource source, bool force)
        {
            if (IsBooleanValue)
            {
                SwitchCheckboxAtIndex(0, true);
                return(true);
            }

            return(false);
        }
Exemplo n.º 2
0
        public virtual bool ScrollValueOnDoubleClick(bool forward, ScrollValueOnDoubleClickSource source, bool force)
        {
            if (forward)
            {
                ProcessArrowKey(Keys.Down);
            }
            else
            {
                ProcessArrowKey(Keys.Up);
            }

            return(true);
        }
Exemplo n.º 3
0
        public virtual bool ScrollValueOnDoubleClick(bool forward, ScrollValueOnDoubleClickSource source, bool force)
        {
            if (ReadOnly || (source != ScrollValueOnDoubleClickSource.FromInPlaceCtrl))
            {
                return(false);
            }

            if (forward)
            {
                ProcessArrowKey(Keys.Down, true);
            }
            else
            {
                ProcessArrowKey(Keys.Up, true);
            }

            return(true);
        }
Exemplo n.º 4
0
        public virtual bool ScrollValueOnDoubleClick(bool forward, ScrollValueOnDoubleClickSource source, bool force)
        {
            if (ReadOnly)
            {
                return(false);
            }

            bool oldRTChange = _realtimeChange;

            _realtimeChange = true;

            HandleUpDownButton((forward ? ButtonID.Up : ButtonID.Down), true);

            _realtimeChange = oldRTChange;

            // TODO : retourner false si valeur pas changee (cause validator par ex)

            return(true);
        }
Exemplo n.º 5
0
        public virtual bool ScrollValueOnDoubleClick(bool forward, ScrollValueOnDoubleClickSource source, bool force)
        {
            if (ReadOnly)
            {
                return(false);
            }

            string[] displayStrings = _ownerPropertyEnum.Property.Value.GetDisplayedValues();

            for (int i = 0; i < displayStrings.Length; i++)
            {
                if (Text.Equals(displayStrings[i]))
                {
                    int index;
                    if (forward)
                    {
                        index = (i < displayStrings.Length - 1 ? i + 1 : 0);
                    }
                    else
                    {
                        index = (i > 0 ? i - 1 : displayStrings.Length - 1);
                    }

                    _ownerPropertyEnum.Property.Value.ImageIndex = index;
                    Text = displayStrings[index];

                    if (force || RealtimeChange)
                    {
                        CommitChanges(source == ScrollValueOnDoubleClickSource.FromLabel);
                    }

                    if ((_edit != null) && (source != ScrollValueOnDoubleClickSource.FromLabel))
                    {
                        _edit.SelectAll();
                    }

                    return(true);
                }
            }

            return(false);
        }
Exemplo n.º 6
0
        public virtual bool ScrollValueOnDoubleClick(bool forward, ScrollValueOnDoubleClickSource source, bool force)
        {
            if (IsBooleanValue)
            {
                SwitchCheckboxAtIndex(0, true);
                return true;
            }

            return false;
        }
Exemplo n.º 7
0
        public virtual bool ScrollValueOnDoubleClick(bool forward, ScrollValueOnDoubleClickSource source, bool force)
        {
            if (ReadOnly)
                return false;

            string[] displayStrings = _ownerPropertyEnum.Property.Value.GetDisplayedValues();

            for (int i = 0; i < displayStrings.Length; i++)
            {
                if (Text.Equals(displayStrings[i]))
                {
                    int index;
                    if (forward)
                        index = (i < displayStrings.Length - 1 ? i + 1 : 0);
                    else
                        index = (i > 0 ? i - 1 : displayStrings.Length - 1);

                    _ownerPropertyEnum.Property.Value.ImageIndex = index;
                    Text = displayStrings[index];

                    if (force || RealtimeChange)
                        CommitChanges(source == ScrollValueOnDoubleClickSource.FromLabel);

                    if ((_edit != null) && (source != ScrollValueOnDoubleClickSource.FromLabel))
                        _edit.SelectAll();

                    return true;
                }
            }

            return false;
        }
Exemplo n.º 8
0
 public virtual bool ScrollValueOnDoubleClick(bool forward, ScrollValueOnDoubleClickSource source, bool force)
 {
     return(false);
 }
Exemplo n.º 9
0
 public virtual bool ScrollValueOnDoubleClick(bool forward, ScrollValueOnDoubleClickSource source, bool force)
 {
     return false;
 }
Exemplo n.º 10
0
        public virtual bool ScrollValueOnDoubleClick(bool forward, ScrollValueOnDoubleClickSource source, bool force)
        {
            if (ReadOnly)
                return false;

            bool oldRTChange = _realtimeChange;
            _realtimeChange = true;

            HandleUpDownButton((forward ? ButtonID.Up : ButtonID.Down), true);

            _realtimeChange = oldRTChange;

            // TODO : retourner false si valeur pas changee (cause validator par ex)

            return true;
        }
Exemplo n.º 11
0
        public virtual bool ScrollValueOnDoubleClick(bool forward, ScrollValueOnDoubleClickSource source, bool force)
        {
            if (ReadOnly || (source != ScrollValueOnDoubleClickSource.FromInPlaceCtrl))
                return false;

            if (forward)
                ProcessArrowKey(Keys.Down, true);
            else
                ProcessArrowKey(Keys.Up, true);

            return true;
        }
Exemplo n.º 12
0
        public virtual bool ScrollValueOnDoubleClick(bool forward, ScrollValueOnDoubleClickSource source, bool force)
        {
            if (forward)
                ProcessArrowKey(Keys.Down);
            else
                ProcessArrowKey(Keys.Up);

            return true;
        }