Exemplo n.º 1
0
        private void InitialPaint()
        {
            this.SetStyle(ControlStyles.UserPaint |
                ControlStyles.AllPaintingInWmPaint |
                ControlStyles.OptimizedDoubleBuffer, true);
            this.UpdateStyles();

            this.SuspendLayout();

               _raceSummaryControls.Clear();
            Cursor = Cursors.WaitCursor;
            foreach (Race race in _raceCard.Races)
            {
                RaceSummaryControl c = new RaceSummaryControl();
                c.BindRace(race);
                _panel.Controls.Add(c);
                _raceSummaryControls.Add(c);

                if ( null != c.Race && c.Race.IsHidden)
                {
                    c.Visible = false;
                }

                c.UpdateParentEvent += OnRaceWasHidden;
            }
            Cursor = Cursors.Default;
            this.ResumeLayout(false);
            this.AdjustFormScrollbars(true);
        }
Exemplo n.º 2
0
 public void OnRaceWasHidden(RaceSummaryControl c)
 {
     c.Visible = false;
     this.AdjustFormScrollbars(true);
 }
Exemplo n.º 3
0
 private void OnInitialLoad(object sender, EventArgs e)
 {
     _isLoading = true;
     this.Text = _race.Parent.TrackCode + " " + _race.Parent.Date;
     _comboboxAmountToWin.Text = "1000";
     _trifectaPayoutsControl.UpdateParentEvent += PayoutsControlWasChanged;
     LoadHorseNumbers();
     LoadSelectionComponents();
     LoadOddsControl();
     ControlWasSelected(_firstPositionCtrl);
     _oddsControl.OddsWereChangedEvent += UpdateScreen;
     _isLoading = false;
     RaceSummaryControl r = new RaceSummaryControl();
     r.BindRace(_race);
     _panelRaceSummary.Controls.Add(r);
 }