Пример #1
0
        private void SetCurrentStateImage(eSettingItem_State state)
        {
            CycleCollection <int> activeStateImgColl;

            if (_stateImageMaping.TryGetValue(state, out activeStateImgColl))
            {
                IEnumerator <int> cycleIterator = activeStateImgColl.GetEnumerator();
                if (cycleIterator.MoveNext())
                {
                    int index = cycleIterator.Current;
                    if (index >= _imgList.Images.Count)
                    {
                        throw new Exception("img index out of range");
                    }

                    this.pbLogo.Image = _imgList.Images[index];
                }
            }
        }
Пример #2
0
        private void SetCurrentStateImage(eSettingItem_State state)
        {
            CycleCollection<int> activeStateImgColl;

            if (_stateImageMaping.TryGetValue(state, out activeStateImgColl))
            {
                IEnumerator<int> cycleIterator = activeStateImgColl.GetEnumerator();
                if (cycleIterator.MoveNext())
                {
                    int index = cycleIterator.Current;
                    if (index >= _imgList.Images.Count)
                        throw new Exception("img index out of range");

                    this.pbLogo.Image = _imgList.Images[index];
                }

            }
        }
Пример #3
0
        public void RegisterStateImage(eSettingItem_State itemState, params int[] imgIndexes)
        {
            CycleCollection <int> imgIndexColl = CycleCollection <int> .CreateInstance(0, imgIndexes);

            _stateImageMaping[itemState] = imgIndexColl;
        }
Пример #4
0
 public void RegisterStateImage(eSettingItem_State itemState, params int[] imgIndexes)
 {
     CycleCollection<int> imgIndexColl = CycleCollection<int>.CreateInstance(0, imgIndexes);
     _stateImageMaping[itemState] = imgIndexColl;
 }