Ejemplo n.º 1
0
        private static void StepChanged(object sender, StepsEventArgs e)
        {
            if (e.Step == Steps.BACKUP)
            {
                Console.WriteLine();
                Console.WriteLine("Creating Backup...");
            }

            if (e.Step == Steps.COPY)
            {
                //Copy backupfile to dest
                Console.WriteLine();
                Console.WriteLine("Copying file...");
            }

            if (e.Step == Steps.RESTORE)
            {
                Console.WriteLine();
                Console.WriteLine("Restoring database...");
            }

            if (e.Step == Steps.IDLE)
            {
                Console.WriteLine();
                Console.WriteLine("Successfully copied database...");
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Sets the progress indicator which step has been reached
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void StepChanged(object sender, StepsEventArgs e)
        {
            switch (e.Step)
            {
            case Steps.BACKUP:
            {
                tsStatus.Text = "Creating Backup...";
                break;
            }

            case Steps.COPY:
            {
                //Copy backupfile to dest
                tsStatus.Text = "Copying file...";
                pbCopy.Value  = 0;
                break;
            }

            case Steps.RESTORE:
            {
                tsStatus.Text = "Restoring database...";
                pbCopy.Value  = 0;
                break;
            }

            case Steps.IDLE:
            {
                tsStatus.Text = "Idle.";
                pbCopy.Value  = 0;
                MessageBox.Show("Successfully copied database..", "Wohooo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                break;
            }
            }

            this.Refresh();
        }