コード例 #1
0
        public void Init(AppDataModel dm, Race race)
        {
            _dm   = dm;
            _race = race;

            _race.RunsChanged += OnRaceRunsChanged;

            UiUtilities.FillCmbRaceRun(cmbRaceRun, _race);
            UiUtilities.FillGrouping(cmbResultGrouping, _currentRaceRun.GetResultViewProvider().ActiveGrouping);

            cmbFilter.Items.Clear();
            cmbFilter.Items.Add(new CBItem {
                Text = "alle Teilnehmer", Value = "all"
            });
            cmbFilter.Items.Add(new CBItem {
                Text = "Teilnehmer ohne Zeit", Value = "no_time"
            });
            cmbFilter.Items.Add(new CBItem {
                Text = "ausgeschiedene Teilnehmer", Value = "out"
            });
            cmbFilter.Items.Add(new CBItem {
                Text = "offene Teilnehmer (keine Zeit oder Ausscheidung)", Value = "no_data"
            });
            cmbFilter.SelectedIndex = 1;

            cmbDisqualify.ItemsSource = ListOfResultCodesToSet;

            cmbDisqualifyReason.Items.Add("Vorbei am Tor");
            cmbDisqualifyReason.Items.Add("Eingefädelt am Tor");
            cmbDisqualifyReason.Items.Add("Nicht weit genug zurückgestiegen am Tor");
            cmbDisqualifyReason.Items.Add("Hilfe durch fremde Person am Tor");

            this.KeyDown += new KeyEventHandler(Timing_KeyDown);
        }
コード例 #2
0
        private void StartNumbersUC_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            if (!(bool)e.OldValue && (bool)e.NewValue) // Became visible
            {
                _snaWorkspace.LoadFromRace(_race, true);

                UiUtilities.FillGrouping(cmbGrouping, _race.RaceConfiguration.Run1_StartistViewGrouping);
                txtNotToBeAssigned.Text = Properties.Settings.Default.StartNumbersNotToBeAssigned;

                SetupDefaults();

                OnWorkspaceChanged(this, null);
                OnCurrentGroupChangedHandler(this, null);
            }
        }
コード例 #3
0
        private void initialize()
        {
            RaceResultViewProvider vp = _thisRace.GetResultViewProvider();

            UiUtilities.FillGrouping(cmbTotalResultGrouping, vp.ActiveGrouping);

            cmbTotalResult.Items.Clear();
            cmbTotalResult.Items.Add(new CBItem {
                Text = "Teilnehmer", Value = new CBObjectTotalResults {
                    Type = "participants"
                }
            });
            FillCmbTotalsResultsWithRaceSpecifics(cmbTotalResult);
            cmbTotalResult.Items.Add(new CBItem {
                Text = "Rennergebnis", Value = new CBObjectTotalResults {
                    Type = "raceresults"
                }
            });
            cmbTotalResult.SelectedIndex = cmbTotalResult.Items.Count - 1;
        }
コード例 #4
0
        public void Init(RaceConfiguration raceConfig)
        {
            // ApplicationFolder + raceconfigpresets
            _raceConfigurationPresets = new RaceConfigurationPresets(System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), @"raceconfigpresets"));
            _raceConfiguration        = raceConfig.Copy();

            refreshConfigPresetsUI();

            // Configuration Screen
            cmbRuns.Items.Clear();
            cmbRuns.Items.Add(new CBItem {
                Text = "1", Value = 1
            });
            cmbRuns.Items.Add(new CBItem {
                Text = "2", Value = 2
            });
            cmbRuns.Items.Add(new CBItem {
                Text = "3", Value = 3
            });
            cmbRuns.Items.Add(new CBItem {
                Text = "4", Value = 4
            });
            cmbRuns.Items.Add(new CBItem {
                Text = "5", Value = 5
            });
            cmbRuns.Items.Add(new CBItem {
                Text = "6", Value = 6
            });

            // Result
            UiUtilities.FillGrouping(cmbConfigErgebnisGrouping);

            cmbConfigErgebnis.Items.Clear();
            cmbConfigErgebnis.Items.Add(new CBItem {
                Text = "Bester Durchgang", Value = "RaceResult_BestOfTwo"
            });
            cmbConfigErgebnis.Items.Add(new CBItem {
                Text = "Summe der besten 2 Durchgänge", Value = "RaceResult_SumBest2"
            });
            cmbConfigErgebnis.Items.Add(new CBItem {
                Text = "Summe", Value = "RaceResult_Sum"
            });
            cmbConfigErgebnis.Items.Add(new CBItem {
                Text = "Summe + Punkte nach DSV Schülerreglement", Value = "RaceResult_SumDSVPointsSchool"
            });

            // Run 1
            UiUtilities.FillGrouping(cmbConfigStartlist1Grouping);
            cmbConfigStartlist1.Items.Clear();
            cmbConfigStartlist1.Items.Add(new CBItem {
                Text = "Startnummer (aufsteigend)", Value = "Startlist_1stRun_StartnumberAscending"
            });
            cmbConfigStartlist1.Items.Add(new CBItem {
                Text = "Punkte (nicht gelost)", Value = "Startlist_1stRun_Points_0"
            });
            cmbConfigStartlist1.Items.Add(new CBItem {
                Text = "Punkte (ersten 15 gelost)", Value = "Startlist_1stRun_Points_15"
            });
            cmbConfigStartlist1.Items.Add(new CBItem {
                Text = "Punkte (ersten 30 gelost)", Value = "Startlist_1stRun_Points_30"
            });

            // Run 2
            UiUtilities.FillGrouping(cmbConfigStartlist2Grouping);
            cmbConfigStartlist2.Items.Clear();
            cmbConfigStartlist2.Items.Add(new CBItem {
                Text = "Startnummer (aufsteigend)", Value = "Startlist_2nd_StartnumberAscending"
            });
            //cmbConfigStartlist2.Items.Add(new GroupingCBItem { Text = "Startnummer (aufsteigend, inkl. ohne Ergebnis)", Value = "Startlist_2nd_StartnumberAscending" });
            cmbConfigStartlist2.Items.Add(new CBItem {
                Text = "Startnummer (absteigend)", Value = "Startlist_2nd_StartnumberDescending"
            });
            //cmbConfigStartlist2.Items.Add(new GroupingCBItem { Text = "Startnummer (absteigend, inkl. ohne Ergebnis)", Value = "Startlist_2nd_StartnumberDescending" });
            cmbConfigStartlist2.Items.Add(new CBItem {
                Text = "Vorheriger Lauf nach Zeit (nicht gedreht)", Value = "Startlist_2nd_PreviousRun_0_OnlyWithResults"
            });
            cmbConfigStartlist2.Items.Add(new CBItem {
                Text = "Vorheriger Lauf nach Zeit (nicht gedreht, inkl. ohne Ergebnis)", Value = "Startlist_2nd_PreviousRun_0_AlsoWithoutResults"
            });
            cmbConfigStartlist2.Items.Add(new CBItem {
                Text = "Vorheriger Lauf nach Zeit (ersten 15 gedreht)", Value = "Startlist_2nd_PreviousRun_15_OnlyWithResults"
            });
            cmbConfigStartlist2.Items.Add(new CBItem {
                Text = "Vorheriger Lauf nach Zeit (ersten 15 gedreht, inkl. ohne Ergebnis)", Value = "Startlist_2nd_PreviousRun_15_AlsoWithoutResults"
            });
            cmbConfigStartlist2.Items.Add(new CBItem {
                Text = "Vorheriger Lauf nach Zeit (ersten 30 gedreht)", Value = "Startlist_2nd_PreviousRun_30_OnlyWithResults"
            });
            cmbConfigStartlist2.Items.Add(new CBItem {
                Text = "Vorheriger Lauf nach Zeit (ersten 30 gedreht, inkl. ohne Ergebnis)", Value = "Startlist_2nd_PreviousRun_30_AlsoWithoutResults"
            });
            cmbConfigStartlist2.Items.Add(new CBItem {
                Text = "Vorheriger Lauf nach Zeit (alle gedreht)", Value = "Startlist_2nd_PreviousRun_all_OnlyWithResults"
            });
            cmbConfigStartlist2.Items.Add(new CBItem {
                Text = "Vorheriger Lauf nach Zeit (alle gedreht, inkl. ohne Ergebnis)", Value = "Startlist_2nd_PreviousRun_all_AlsoWithoutResults"
            });

            ResetConfigurationSelectionUI(_raceConfiguration);
        }