Exemplo n.º 1
0
        private void frmSplash_Load(object sender, EventArgs e)
        {
            try
            {
                //Attempt to open a connection to verify the presence of the database
                lblConnection.Text = "Checking connection...";

                string        connectionString;
                SqlConnection connection;

                connectionString = @"Data Source={SQL Server};SERVER=Nsccsqlinst16.nscc.edu;Database=CITC_CTEAM;UID=CITC_CTEAM;PWD=ITROCKS;";
                connection       = new SqlConnection(connectionString);
                connection.Open();

                //Check to see if a connection was established.
                if (connection != null && connection.State == ConnectionState.Open)
                {
                    lblConnection.Text = "Connection established!";
                }
                connection.Close();
            }
            catch (SqlException ex)
            {
                //If no connection, stop the timer and throw an error.
                SplashTimer.Stop();
                MessageBox.Show("Connection to the database could not be established. \nPlease try again later.\n\n"
                                + ex.Message);
                this.Close();
            }
        }
        private void SplashTimer_Tick(object sender, EventArgs e)
        {
            SplashTimer.Stop();
            SelectionForm select = new SelectionForm();

            select.Show();
            this.Hide();
        }
Exemplo n.º 3
0
        private void SplashTimer_Tick(object sender, EventArgs e)
        {
            frmLogin login = new frmLogin();

            login.Show();
            SplashTimer.Stop();
            this.Hide();
        }
Exemplo n.º 4
0
        private void SplashTimer_Tick(object sender, EventArgs e)
        {
            SplashTimer.Stop();
            Main Main = new Main();

            Main.Show();
            Hide();
        }
Exemplo n.º 5
0
        private void SplashScreen_KeyDown(object sender, KeyEventArgs e)
        {
            SplashTimer.Stop();
            Main Main = new Main();

            Main.Show();
            Hide();
        }
Exemplo n.º 6
0
 private void SplashTimer_Tick(object sender, EventArgs e)
 {
     prgSplash.Increment(2);
     if (prgSplash.Value == 100)
     {
         SplashTimer.Stop();
     }
 }
Exemplo n.º 7
0
        private void SplashTimer_Tick(object sender, EventArgs e)
        {
            SplashTimer.Stop();
            this.Hide();
            SecureBinHome MainPage = new SecureBinHome();

            MainPage.Show();
        }
 private void SplashTimer_Tick(object sender, EventArgs e)
 {
     progress       += 10;
     lblLoading.Text = String.Format("Loading {0}%...", progress);
     Logo2.Visible   = false;
     SplashAnimator3.Show(Logo2);
     if (progress >= 110)
     {
         SplashTimer.Stop();
         frmLogin log = new frmLogin();
         this.Hide();
         SplashAnimator2.Show(log);
     }
 }
Exemplo n.º 9
0
        private void Timer1_Tick(object sender, EventArgs e)
        {
            //Second = Second + 1;
            //if (Second >= 10)
            //{
            //    SplashTimer.Stop(); // Timer stops functioning
            //    HideSplash();
            //}
            Console.Out.WriteLine("timer clicked");
            SplashTimer.Stop();
            this.Hide();
            Form1 mainform = new Form1();

            mainform.Show();
        }
Exemplo n.º 10
0
 private void SplashScreen_KeyPress(object sender, KeyPressEventArgs e)
 {
     SplashTimer.Stop();
     Main.Show();
     Hide();
 }
Exemplo n.º 11
0
 private void pictureBox1_Click(object sender, System.EventArgs e)
 {
     SplashTimer.Stop();
     Main.Show();
     Hide();
 }
Exemplo n.º 12
0
 private void SplashTimer_Tick(object sender, System.EventArgs e)
 {
     SplashTimer.Stop();
     Main.Show();
     Hide();
 }
 /// <summary>
 /// This form will be visible for 3 secounds then it will be hidden and
 /// timer will be stopped then show the start form
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void SplashTimer_Tick(object sender, EventArgs e)
 {
     this.Hide();
     SplashTimer.Stop();
     Program.startForm.Show();
 }