Exemplo n.º 1
0
 public ViewWindow(InitArgs areaArgs, WindowInitArgs initArgs)
 {
     InitializeComponent();
     ScreenArea         = new ScreenArea(areaArgs);
     Location           = initArgs.WindowLocation;
     Size               = initArgs.WindowSize;
     elementHost1.Child = ScreenArea;
     BackColor          = Color.Black;
     elementHost1.Show();
 }
Exemplo n.º 2
0
        private void InitObjects()
        {
            viewInitArgs = new InitArgs();
            FontInfo           NameFont       = new FontInfo(Properties.Settings.Default.NameFont.Name, (int)Properties.Settings.Default.NameFont.Size);
            FontInfo           ScoreFont      = new FontInfo(Properties.Settings.Default.ScoreFont.Name, (int)Properties.Settings.Default.ScoreFont.Size);
            FontInfo           TimeFont       = new FontInfo(Properties.Settings.Default.TimeFont.Name, (int)Properties.Settings.Default.TimeFont.Size);
            CustomColorWrapper BacgroundColor = new CustomColorWrapper(Properties.Settings.Default.BackgroundColor.R, Properties.Settings.Default.BackgroundColor.G, Properties.Settings.Default.BackgroundColor.B);
            CustomColorWrapper TextColor      = new CustomColorWrapper(Properties.Settings.Default.TextColor.R, Properties.Settings.Default.TextColor.G, Properties.Settings.Default.TextColor.B);

            viewInitArgs.NameFont        = NameFont;
            viewInitArgs.TextFont        = TimeFont;
            viewInitArgs.ScoreFont       = ScoreFont;
            viewInitArgs.BackgroundColor = BacgroundColor;
            viewInitArgs.TextColor       = TextColor;

            windowInit = new WindowInitArgs();
            windowInit.WindowLocation = Properties.Settings.Default.Location;
            windowInit.WindowSize     = Properties.Settings.Default.Size;

            viewWindow = new ViewWindow(viewInitArgs, windowInit);

            windowSize     = Properties.Settings.Default.Size;
            windowLocation = Properties.Settings.Default.Location;

            imageArgs = new ImageInitArgs();
            homeImg   = new Size(0, 0);
            awayImg   = new Size(0, 0);
            imageArgs.HomeImageSize = homeImg;
            imageArgs.AwayImageSize = awayImg;
            imageArgs.HomeImagePath = "";
            imageArgs.AwayImagePath = "";

            timer.Tick    += Timer_Tick;
            timer.Interval = 500;
            timer.Start();

            if (splitContainer1.Width != 0)
            {
                splitContainer1.SplitterDistance = splitContainer1.Width / 2;
            }

            homePlayers = new List <PlayerControl>();
            awayPlayers = new List <PlayerControl>();
        }