Beispiel #1
0
        public FormUsuario(Settings.EnumPerfil pPerfilUsuarioLogado)
        {
            this.PerfilUsuarioLogado = pPerfilUsuarioLogado;
            InitializeComponent();
            MostrarDados();
            //panelBanner.BackgroundImage = Image.FromFile("d:\\teste.jpg");
            dataGridView1.Columns["Senha"].Visible          = false;
            dataGridView1.Columns["Perfil"].Visible         = false;
            dataGridView1.Columns["Codigo"].Visible         = false;
            dataGridView1.Columns["Nome"].Visible           = false;
            dataGridView1.Columns["PerfilToString"].Visible = false;
            dataGridView1.Columns["Perfil"].Visible         = false;
            //dataGridView1.Columns["PerfilToString"].HeaderText = "Perfil";
            //panelBanner.Width = this.Width;

            //Evento evento = new EventoDAO().VerificaExistenciaEvento();
            //if (evento != null) // Se for edição
            //{
            //    panelBanner.BackgroundImage = new Bitmap(evento.PathFile);
            //}
            //if (System.IO.File.Exists(Evento.DIRETORIO_INSTALACAO_BANNER(string.Empty)))
            //{
            //    //pictureBox1.Image = Resize(new Bitmap(evento.PathFile), pictureBox1.Width, pictureBox1.Height);
            //    panelBanner.BackgroundImage = Helper.Resize(new Bitmap(Evento.DIRETORIO_INSTALACAO_BANNER(string.Empty)), panelBanner.Width, panelBanner.Height);
            //}
            btnHome.TabStop   = false;
            btnHome.FlatStyle = FlatStyle.Flat;
            btnHome.FlatAppearance.BorderSize  = 0;
            btnHome.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255);
            //btnHome.Visible = false;
        }
Beispiel #2
0
        public FormHorarios(Settings.EnumPerfil pPerfilUsuarioLogado)
        {
            this.PerfilUsuarioLogado = pPerfilUsuarioLogado;
            InitializeComponent();
            MostrarDados();

            btnHome.TabStop   = false;
            btnHome.FlatStyle = FlatStyle.Flat;
            btnHome.FlatAppearance.BorderSize  = 0;
            btnHome.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255);


            btnStop.TabStop   = false;
            btnStop.FlatStyle = FlatStyle.Flat;
            btnStop.FlatAppearance.BorderSize  = 0;
            btnStop.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255);

            if (pPerfilUsuarioLogado == EnumPerfil.MONITOR)
            {
                //Desabilita Cadastro
                lblNome.Visible = lblMinuto.Visible = tbxHorario.Visible = tbxNome.Visible = btnAtualizar.Visible = btnExcluir.Visible = btnIncluir.Visible = false;
            }
            //btnHome.Visible = false;
            //panelBanner.BackgroundImage = Image.FromFile("d:\\teste.jpg");
            //panelBanner.Width = this.Width;
            //Evento evento = new EventoDAO().VerificaExistenciaEvento();
            //if (System.IO.File.Exists(Evento.DIRETORIO_INSTALACAO_BANNER(string.Empty)))
            //{
            //    //pictureBox1.Image = Resize(new Bitmap(evento.PathFile), pictureBox1.Width, pictureBox1.Height);
            //    panelBanner.BackgroundImage = Helper.Resize(new Bitmap(Evento.DIRETORIO_INSTALACAO_BANNER(string.Empty)), panelBanner.Width, panelBanner.Height);
            //}

            //DataGridViewButtonColumn btn = new DataGridViewButtonColumn();
            //btn = new DataGridViewButtonColumn();
            //dataGridView1.Columns.Add(btn);
            //btn.HeaderText = "Tempo";
            ////btn.Text = "Clique aqui";
            //btn.Name = "time";
            //btn.UseColumnTextForButtonValue = true;
            //dataGridView1.CellFormatting += dataGridView1_CellClick;


            DataGridViewButtonColumn btn = new DataGridViewButtonColumn();

            dataGridView1.Columns.Add(btn);
            btn.HeaderText = string.Empty;
            btn.DefaultCellStyle.BackColor = Color.White;
            btn.Text = "Iniciar";
            //dataGridView1.CellPainting += DataGridView1_CellPainting;
            btn.Name = "btnIniciar";
            btn.UseColumnTextForButtonValue = true;
            dataGridView1.CellClick        += dataGridView1_CellClick;
            dataGridView1.Columns["Temporizador"].HeaderText = "Minutos";
            dataGridView1.Columns["Contador"].HeaderText     = "Tempo";
            dataGridView1.Columns["btnIniciar"].Width        = 50;

            //DataGridViewButtonColumn btn2 = new DataGridViewButtonColumn();
            //dataGridView1.Columns.Add(btn2);
            //btn2.HeaderText = string.Empty;
            //btn2.DefaultCellStyle.BackColor = Color.White;
            //btn2.Text = "Zerar";

            //btn2.Name = "btnZerar";
            //btn2.UseColumnTextForButtonValue = true;
            //dataGridView1.Columns["btnZerar"].Width = 50;
        }