Beispiel #1
0
        /// <summary>
        /// init resolver background
        /// </summary>
        private void InitResolverBackgroundGrid()
        {
            for (var i = 0; i <= _config.MaxDisplayCount + 1; i++)
            {
                var border = new Border
                {
                    Background = (i & 1) == 0
                        ? new SolidColorBrush(Colors.FromString(Colors.BgGray))
                        : new SolidColorBrush(Colors.FromString(Colors.Black)),
                    Height  = _config.TeamGridHeight,
                    Opacity = 1
                };

                BgGrid.Children.Add(border);
            }
        }
Beispiel #2
0
 private void InitCursor()
 {
     // hide mouse
     Cursor = Cursors.None;
     // init cursor
     _cursor = new Border
     {
         Background        = new SolidColorBrush(Colors.FromString(Colors.Blue)),
         Height            = _config.TeamGridHeight,
         Visibility        = Visibility.Hidden,
         VerticalAlignment = VerticalAlignment.Top,
         Margin            = new Thickness(0,
                                           _teams.Count < _config.MaxDisplayCount
                 ? (_teams.Count - 1) * _config.TeamGridHeight
                 : (_config.MaxDisplayCount - 1) * _config.TeamGridHeight
                                           , 0, 0)
     };
     _status.CursorIdx = (int)_cursor.Margin.Top / _config.TeamGridHeight;
     Layout.Children.Insert(1, _cursor);
 }