Esempio n. 1
0
 /// <summary>
 /// Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>A hash code for the current object.</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int result = 17;
         result = result * 23 + Id.GetHashCode();
         result = result * 23 + ((Name != null) ? Name.GetHashCode() : 0);
         result = result * 23 + Type.GetHashCode();
         result = result * 23 + ShowInActions.GetHashCode();
         result = result * 23 + RowFilterEnabled.GetHashCode();
         result = result * 23 + SummaryRowEnabled.GetHashCode();
         result = result * 23 + ((SummaryRow != null) ? SummaryRow.GetHashCode() : 0);
         result = result * 23 + MultiSortEnabled.GetHashCode();
         result = result * 23 + RequiresFilter.GetHashCode();
         result = result * 23 + ((WaitForInputData != null) ? WaitForInputData.GetHashCode() : 0);
         result = result * 23 + ((Fields != null) ? Fields.GetHashCode() : 0);
         result = result * 23 + ((FieldGroups != null) ? FieldGroups.GetHashCode() : 0);
         result = result * 23 + ((MultiSort != null) ? MultiSort.GetHashCode() : 0);
         result = result * 23 + ((Filters != null) ? Filters.GetHashCode() : 0);
         result = result * 23 + ((Pages != null) ? Pages.GetHashCode() : 0);
         result = result * 23 + ((Layout != null) ? Layout.GetHashCode() : 0);
         result = result * 23 + SelectionMode.GetHashCode();
         result = result * 23 + ((DoubleClickAction != null) ? DoubleClickAction.GetHashCode() : 0);
         result = result * 23 + ((UseAsBrowser != null) ? UseAsBrowser.GetHashCode() : 0);
         result = result * 23 + ((UseAsBrowserRank != null) ? UseAsBrowserRank.GetHashCode() : 0);
         result = result * 23 + ((UseAsBrowserDefaultCode != null) ? UseAsBrowserDefaultCode.GetHashCode() : 0);
         result = result * 23 + ((Pivot != null) ? Pivot.GetHashCode() : 0);
         return(result);
     }
 }
Esempio n. 2
0
        public void Repaint()
        {
            _mode = InputManager.State.ActiveSelectionMode;
            for (var i = 0; i < icons.Length; i++)
            {
                icons[i].color = _mode.GetHashCode() == i ? activeColor : Color.white;
            }

            RepaintNewSelectionOnDrawBtn();
            RepaintDiscardSelectionOnDrawBtn();
        }
Esempio n. 3
0
        private void SetMode(SelectionMode mode)
        {
            if (_mode == mode)
            {
                return;
            }

            icons[_mode.GetHashCode()].color = Color.white;
            _mode = mode;
            InputManager.State.ActiveSelectionMode = _mode;
            icons[_mode.GetHashCode()].color       = activeColor;

            if (_mode != (int)SelectionMode.Add)
            {
                InputManager.State.NewSelectionOnDraw     = false;
                InputManager.State.DiscardSelectionOnDraw = false;
                RepaintNewSelectionOnDrawBtn();
                RepaintDiscardSelectionOnDrawBtn();
            }
        }