private void ScoreEntry_Load(object sender, EventArgs e)
        {
            if (Properties.Settings.Default.SlalomEntry_Width > 0) {
                this.Width = Properties.Settings.Default.SlalomEntry_Width;
            }
            if (Properties.Settings.Default.SlalomEntry_Height > 0) {
                this.Height = Properties.Settings.Default.SlalomEntry_Height;
            }
            if (Properties.Settings.Default.SlalomEntry_Location.X > 0
                && Properties.Settings.Default.SlalomEntry_Location.Y > 0) {
                this.Location = Properties.Settings.Default.SlalomEntry_Location;
            }
            myTourProperties = TourProperties.Instance;
            mySortCommand = myTourProperties.RunningOrderSortSlalom;
            int curDelim = mySortCommand.IndexOf( "AgeGroup" );
            if (curDelim < 0) {
            } else if (curDelim > 0) {
                mySortCommand = mySortCommand.Substring( 0, curDelim ) + "DivOrder" + mySortCommand.Substring( curDelim + "AgeGroup".Length );
                myTourProperties.RunningOrderSortSlalom = mySortCommand;
            } else {
                mySortCommand = "DivOrder" + mySortCommand.Substring( "AgeGroup".Length );
                myTourProperties.RunningOrderSortSlalom = mySortCommand;
            }

            ResizeNarrow.Visible = false;
            ResizeNarrow.Enabled = false;
            ResizeWide.Visible = true;
            ResizeWide.Enabled = true;
            ResizeNarrow.Location = ResizeWide.Location;

            EventDelayReasonTextBox.Visible = false;
            EventDelayReasonLabel.Visible = false;
            StartTimerButton.Visible = false;
            PauseTimerButton.Visible = true;
            StartTimerButton.Location = PauseTimerButton.Location;

            String[] curList = { "SkierName", "Div", "DivOrder", "EventGroup", "RunOrder", "TeamCode", "EventClass", "RankingScore", "RankingRating", "HCapBase", "HCapScore", "Status" };
            sortDialogForm = new SortDialogForm();
            sortDialogForm.ColumnListArray = curList;

            filterDialogForm = new Common.FilterDialogForm();
            filterDialogForm.ColumnListArray = curList;

            rerideReasonDialogForm = new RerideReason();
            skierDoneReasonDialogForm = new SkierDoneReason();
            OptUpDialogForm = new SlalomOptUp();
            myCheckEventRecord = new CheckEventRecord();

            // Retrieve data from database
            mySanctionNum = Properties.Settings.Default.AppSanctionNum;
            Cursor.Current = Cursors.WaitCursor;

            if (mySanctionNum == null) {
                MessageBox.Show("An active tournament must be selected from the Administration menu Tournament List option");
            } else {
                if (mySanctionNum.Length < 6) {
                    MessageBox.Show("An active tournament must be selected from the Administration menu Tournament List option");
                } else {
                    //Retrieve selected tournament attributes
                    DataTable curTourDataTable = getTourData(mySanctionNum);
                    if (curTourDataTable.Rows.Count > 0) {
                        myTourRow = curTourDataTable.Rows[0];
                        myTourRules = (String)myTourRow["Rules"];
                        if ( myTourRules.ToLower().Equals( "ncwsa" ) ) {
                            TeamCode.Visible = true;
                        } else {
                            TeamCode.Visible = false;
                        }
                        if ( (byte)myTourRow["SlalomRounds"] > 0 ) {
                            mySortCommand = myTourProperties.RunningOrderSortSlalom;

                            EventRunInfoLabel.Text = "   Event Start:\n" + "   Event Delay:\n" + "Skiers, Passes:";
                            EventRunInfoData.Text = "";
                            EventRunPerfLabel.Text = "Event Duration:\n" + "Mins Per Skier:\n" + " Mins Per Pass:"******"";

                            //Load round selection list based on number of rounds specified for the tournament
                            roundSelect.SelectList_Load( myTourRow["SlalomRounds"].ToString(), roundSelect_Click );
                            roundActiveSelect.SelectList_LoadHorztl( myTourRow["SlalomRounds"].ToString(), roundActiveSelect_Click );
                            roundActiveSelect.RoundValue = "1";

                            //Load rope length selection list
                            SlalomLineSelect.SelectList_Load( SlalomLineSelect_Change );

                            //Load slalom speed selection list
                            SlalomSpeedSelect.SelectList_Load( SlalomSpeedSelect_Change );

                            mySkierClassList = new ListSkierClass();
                            mySkierClassList.ListSkierClassLoad();
                            scoreEventClass.DataSource = mySkierClassList.DropdownList;
                            scoreEventClass.DisplayMember = "ItemName";
                            scoreEventClass.ValueMember = "ItemValue";
                            myTourClass = myTourRow["Class"].ToString().ToUpper();
                            myClassCRow = mySkierClassList.SkierClassDataTable.Select("ListCode = 'C'")[0];
                            myClassERow = mySkierClassList.SkierClassDataTable.Select("ListCode = 'E'")[0];

                            //Determine required number of judges for event
                            myNumJudges = 5;
                            StringBuilder curSqlStmt = new StringBuilder( "" );
                            curSqlStmt.Append( "Select ListCode, CodeValue, MaxValue, MinValue FROM CodeValueList " );
                            curSqlStmt.Append( "Where ListName = 'SlalomJudgesNum' And ListCode = '" + myTourClass + "' ORDER BY SortSeq" );
                            DataTable curNumJudgesDataTable = getData( curSqlStmt.ToString() );
                            if (curNumJudgesDataTable.Rows.Count > 0) {
                                setShowByNumJudges( Convert.ToInt16( (Decimal)curNumJudgesDataTable.Rows[0]["MaxValue"] ));
                            } else {
                                setShowByNumJudges ( 1 );
                            }
                            if ( myNumJudges > 3 ) {
                                ClassC5JudgeCB.Visible = false;
                                ClassC5JudgeCB.Enabled = false;
                                ClassR3JudgeCB.Visible = true;
                                ClassR3JudgeCB.Enabled = true;
                                ClassR3JudgeCB.Checked = true;
                            } else {
                                ClassC5JudgeCB.Visible = true;
                                ClassC5JudgeCB.Enabled = true;
                                ClassR3JudgeCB.Visible = false;
                                ClassR3JudgeCB.Enabled = false;
                            }

                            //Retrieve and load boat times
                            curSqlStmt = new StringBuilder( "" );
                            curSqlStmt.Append( "SELECT ListCode, ListCodeNum, SortSeq, CodeValue, MinValue, MaxValue, CodeDesc " );
                            curSqlStmt.Append( "FROM CodeValueList WHERE ListName = 'SlalomBoatTime' ORDER BY SortSeq" );
                            myTimesDataTable = getData( curSqlStmt.ToString() );

                            //Retrieve list of approved tournament boats
                            getApprovedTowboats();
                            listApprovedBoatsDataGridView.Visible = false;
                            BoatSelectInfoLabel.Visible = false;

                            //Retrieve and load tournament event entries
                            loadEventGroupList( Convert.ToByte( roundActiveSelect.RoundValue ) );

                            if (ExportLiveWeb.LiveWebLocation.Length > 1) {
                                LiveWebLabel.Visible = true;
                            } else {
                                LiveWebLabel.Visible = false;
                            }

                        } else {
                            MessageBox.Show( "The slalom event is not defined for the active tournament" );
                        }
                    } else {
                        MessageBox.Show( "The active tournament is not properly defined.  You must select from the Administration menu Tournament List option" );
                    }
                }
            }
            Cursor.Current = Cursors.Default;
        }
        public ScoreEntrySeg3()
        {
            InitializeComponent();

            appNopsCalc = CalcNops.Instance;
            appNopsCalc.LoadDataForTour();
            ScoreList.Add(new Common.ScoreEntry("Jump", 0, "", 0));
            TimeInTolImg.DisplayIndex = 16;

            myCheckEventRecord = new CheckEventRecord();

            jumpRecapDataGridView.AutoGenerateColumns = false;

            //RampHeightTextBox.Visible = false;
            //BoatSpeedTextBox.Visible = false;
        }