BF2Statistics.SnapshotViewForm.ViewSelect_SelectedIndexChanged C# (CSharp) Method

ViewSelect_SelectedIndexChanged() private method

Event fired when the snapshot view type is changed
private ViewSelect_SelectedIndexChanged ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void ViewSelect_SelectedIndexChanged(object sender, EventArgs e)
        {
            // Enable/Disable features based in mode
            bool Enable = (ViewSelect.SelectedIndex == 0 && HttpServer.IsRunning);
            SnapshotView.CheckBoxes = Enable;
            ImportBtn.Enabled = Enable;
            SelectAllBtn.Enabled = Enable;
            SelectNoneBtn.Enabled = Enable;
            BuildList();

            // Set menu item text
            if (Enable)
                MoveSnapshotMenuItem.Text = "Move to Processed";
            else
                MoveSnapshotMenuItem.Text = "Move to UnProcessed";

            // Set textbox text
            if (ViewSelect.SelectedIndex == 0)
            {
                textBox1.Text = "Below is a list of  snapshots that have not been imported into the database. "
                    + "You can select which snapshots you wish to try and import below";
            }
            else
            {
                textBox1.Text = "Below is a list of  snapshots that have been successfully imported into the database. ";
            }
        }