예제 #1
0
        public Dial()
        {
            InitializeComponent();
            Background = null;

            var children = Children.ToArray();

            _elmGrid = new DialItem[3, 3];
            for (int y = 0, i = 0; y < 3; y++)
            {
                for (var x = 0; x < 3; x++)
                {
                    _elmGrid[x, y] = children[i++];
                }
            }

            var seq = BaseChars;

            for (int i = 0, c = 0; i < seq.Length; i += 4, c++)
            {
                children[c].SetChars(seq.Substring(i, 4));
            }

            FocusBlock(children[4]);
        }
예제 #2
0
        private void FocusBlock(DialItem elm)
        {
            if (_activeElement != null)
            {
                _activeElement.IsActive = false;
            }

            _activeElement = elm;
            elm.IsActive   = true;
        }