示例#1
0
 private void HandleFormLoad(object sender, EventArgs e)
 {
     this.Hide();
     Thread thread = new Thread(new ThreadStart(this.ShowSplashScreen));
     thread.Start();
     ClasseSplash worker = new ClasseSplash();
     worker.ProgressChanged += (o, ex) =>
     {
         this.frmSplash.UpdateProgress(ex.Progress);
     };
     worker.HardWorkDone += (o, ex) =>
         {
             done = true;
             this.Show();
         };
     worker.DoHardWork();
 }
示例#2
0
        private void frmMDI_Load(object sender, EventArgs e)
        {
            if (id_permissao == "2")
            {
                btnADM.Enabled = false;
            }
            if (id_permissao == "1")
            {
                btnADM.Enabled = false;
                btnATD.Enabled = false;
            }
            var data = DateTime.Now;
            int horas = data.Hour;
            if (horas >= 0 && horas < 12)
            {
                lblHora.Text = "Eclair Buffet™\nBom Dia";
            }
            if (horas >= 12 && horas < 18)
            {
                lblHora.Text = "Eclair Buffet™\nBoa Tarde";
            }
            if (horas >= 18 && horas <=23)
            {
                lblHora.Text = "Eclair Buffet™\nBoa Noite";
            }

            lblText.Text = "Nível de Acesso: "+nm_permissao+"";
            lblNome.Text = nome;

            timer1.Enabled = true;
            ClasseSplash CS = new ClasseSplash();
        }