public TelaPrincipal()
        {
            TelaCarregamento loading = new TelaCarregamento();

            this.Hide();
            loading.ShowDialog();

            Principal.InicializarConexao();

            this.
            InitializeComponent();

            this.Show();

            LightBox.ShowLightBox(this.Bounds);
            login = new Login();
            login.ShowDialog();

            Assembly assembly = Assembly.GetEntryAssembly();
            AssemblyFileVersionAttribute[] attributes =
                assembly.GetCustomAttributes(typeof(AssemblyFileVersionAttribute), false)
                    as AssemblyFileVersionAttribute[];

            if (attributes != null && attributes.Length == 1)
            {
                toolStripStatusLabel.Text  = attributes[0].Version;
            }
        }
 private void EfetuarLogoff_Click(object sender, EventArgs e)
 {
     if (DialogoAlerta.Mostrar("Confirmação", "Deseja mesmo efetuar logoff?", MessageBoxIcon.Question, MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes) {
         LightBox.ShowLightBox(this.Bounds);
         login = new Login();
         login.ShowDialog();
     }
 }