public MainWindow()
        {
            InitializeComponent();
            parser = new Library.Data.CsvParser();

            sspP          = new SyncSliderBox(lblParameterP, tbxParameterP, sldParameterP, 5, 66, 37);
            sspMinCars    = new SyncSliderBox(lblParameterMinCars, tbxParameterMinCars, sldParameterMinCars, 1, 20, 10);
            sspIR         = new SyncSliderBox(lblParameterIR, tbxParameterIR, sldParameterIR, 0, 3200, 1700);
            sspMaxSofDiff = new SyncSliderBox(lblParameterMaxSoffDiff, tbxParameterMaxSoffDiff, sldParameterMaxSoffDiff, 3, 100, 17);
            sspMaxSofFunctExtraThresoldPerK = new SyncSliderBox(lblParameterMaxSoffFunctExtrPctPerK, tbxParameterMaxSoffFunctExtrPctPerK, sldParameterMaxSoffFunctExtrPctPerK, 0, 50, 11);
            sspMaxSofFunctStartingIRValue   = new SyncSliderBox(lblParameterMaxSoffFunctStartIR, tbxParameterMaxSoffFunctStartIR, sldParameterMaxSoffFunctStartIR, 500, 9000, 2800);
            sspMaxSofFunctStartingThreshold = new SyncSliderBox(lblParameterMaxSoffFunctStartPct, tbxParameterMaxSoffFunctStartPct, sldParameterMaxSoffFunctStartPct, 0, 50, 18);
            sspTopSplitExc   = new SyncSliderBox(lblParameterTopSplitExc, tbxParameterTopSplitExc, sldParameterTopSplitExc, 0, 1, 0);
            sspDebug         = new SyncSliderBox(lblParameterDebug, tbxParameterDebug, sldParameterDebug, 0, 1, 1);
            sspForceMidClass = new SyncSliderBox(lblParameterForceMidClass, tbxParameterForceMidClass, sldParameterForceMidClass, 0, 1, 0);

            sspP.Visible          = false;
            sspMinCars.Visible    = false;
            sspIR.Visible         = false;
            sspMaxSofDiff.Visible = false;
            sspMaxSofFunctExtraThresoldPerK.Visible = false;
            sspMaxSofFunctStartingIRValue.Visible   = false;
            sspMaxSofFunctStartingThreshold.Visible = false;
            sspTopSplitExc.Visible   = false;
            sspDebug.Visible         = false;
            sspForceMidClass.Visible = false;


            this.Loaded += MainWindow_Loaded;
        }
        private void BtnAskIpitting_Click(object sender, RoutedEventArgs e)
        {
            string race = SyncSliderBox.CleanStringOfNonDigits(tbxRaceID.Text);

            if (!String.IsNullOrWhiteSpace(race))
            {
                raceid = Convert.ToInt64(race);
                if (raceid > 0)
                {
                    pg.Visibility = Visibility.Visible;

                    System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(GetData));
                    t.Start();
                }
            }
        }