コード例 #1
0
ファイル: Login.cs プロジェクト: riquefsouza/livrusvirtus
        public frmLogin(Window parent)
            : base(parent, -1, "Login do Sistema", new Point(546, 346),
                   new Size(211, 168), wxDEFAULT_DIALOG_STYLE, "")
        {
            bmpLogin = new wx.StaticBitmap(this, (int)idt.ID_FRMLOGIN_BMPLOGIN,
                                           new wx.Bitmap("xpms/login.xpm", wx.BitmapType.wxBITMAP_TYPE_XPM),
                                           new Point(8, 8), new Size(90, 90));
            labLogin = new wx.StaticText(this, (int)idt.ID_FRMLOGIN_LABLOGIN,
                                         "Login:"******"",
                                       new Point(112, 24), new Size(80, 21));
            edtLogin.MaxLength = 10;
            labSenha           = new wx.StaticText(this, (int)idt.ID_FRMLOGIN_LABSENHA,
                                                   "Senha:", new Point(112, 56), new Size(34, 13));
            edtSenha = new wx.TextCtrl(this, (int)idt.ID_FRMLOGIN_EDTSENHA, "",
                                       new Point(112, 72), new Size(80, 21), wx.TextCtrl.wxTE_PASSWORD);
            edtSenha.MaxLength = 10;
            btnLogin           = new wx.Button(this, (int)idt.ID_FRMLOGIN_BTNLOGIN, "&Login",
                                               new Point(24, 107), new Size(75, 25));
            btnCancelar = new wx.Button(this, (int)idt.ID_FRMLOGIN_BTNCANCELAR, "&Cancelar",
                                        new Point(112, 107), new Size(75, 25));
            btnLogin.SetDefault();

            bFechar = false;
            FazLayout();

            EVT_CLOSE(new EventListener(OnClose));
            EVT_BUTTON((int)idt.ID_FRMLOGIN_BTNLOGIN,
                       new EventListener(OnBtnLoginClick));
            EVT_BUTTON((int)idt.ID_FRMLOGIN_BTNCANCELAR,
                       new EventListener(OnBtnCancelarClick));
        }
コード例 #2
0
ファイル: Cadastros.cs プロジェクト: riquefsouza/livrusvirtus
        public frmCadastros(wx.Window parent, int nFiltroCodigo,
                            bool bIniciaBotoes)
            : base(parent, -1, new Point(0, 0), new Size(330, 140))
        {
            labCodigo = new wx.StaticText(this, (int)idt.ID_FRMCADASTROS_LABCODIGO,
                                          "Código:", new Point(8, 8), new Size(36, 13), 0);
            edtCodigo = new TextValidatorCtrl(this, (int)idt.ID_FRMCADASTROS_EDTCODIGO,
                                              "", new Point(8, 24), new Size(121, 21), 0, nFiltroCodigo);
            btnNovo = new wx.Button(this, (int)idt.ID_FRMCADASTROS_BTNNOVO,
                                    "&Novo", new Point(144, 24), new Size(75, 25), 0);
            labDescricao = new wx.StaticText(this, (int)idt.ID_FRMCADASTROS_LABDESCRICAO,
                                             "Descrição:", new Point(8, 48), new Size(51, 13), 0);
            edtDescricao = new wx.TextCtrl(this, (int)idt.ID_FRMCADASTROS_EDTDESCRICAO,
                                           "", new Point(8, 64), new Size(217, 21), 0);

            if (bIniciaBotoes)
            {
                IniciaBotoes();
                FazLayout();
            }
            edtCodigo.MaxLength    = 10;
            edtDescricao.MaxLength = 30;
            Registros      = new ArrayList();
            nLinhaRegistro = 0;
        }
コード例 #3
0
ファイル: Sobre.cs プロジェクト: riquefsouza/livrusvirtus
        public frmSobre(Window parent)
            : base(parent, -1, "Sobre o Sistema", new Point(498, 310),
                   new Size(306, 240), wxDEFAULT_DIALOG_STYLE, "")
        {
            this.SetIcon(new wx.Icon("xpms/livrus.xpm"));
            this.Centre(wx.Orientation.wxBOTH);

            labBmp = new wx.StaticBitmap(this, (int)idt.ID_FRMSOBRE_LABBMP,
                                         new wx.Bitmap("xpms/livrusvirtus.xpm"),
                                         new Point(24, 20), new Size(254, 72));
            labVersao = new wx.StaticText(this, (int)idt.ID_FRMSOBRE_LABVERSAO,
                                          "Versão: 1.0.0", new Point(200, 96), new Size(63, 13));
            labDireitos = new wx.StaticText(this, (int)idt.ID_FRMSOBRE_LABDIREITOS,
                                            "Todos os diretos reservados para: Henrique F. de Souza",
                                            new Point(16, 112), new Size(266, 13));
            labSistema = new wx.StaticText(this, (int)idt.ID_FRMSOBRE_LABSISTEMA,
                                           "Sistema integrante do projeto Livrus Virtus, " +
                                           "versão programada em C# usando a wx.NET.",
                                           new Point(16, 131), new Size(264, 29), wx.Alignment.wxALIGN_CENTRE);
            btnOk = new wx.Button(this, wxID_OK, "&Ok",
                                  new Point(111, 180), new Size(75, 25));

            btnOk.SetDefault();
            FazLayout();
        }
コード例 #4
0
        public frmAlterarSenha(wx.Window parent)
            : base(parent, -1, new Point(424, 292), new Size(257, 161),
                   wxTAB_TRAVERSAL, "")
        {
            ClientSize = new Size(249, 134);
            EVT_CLOSE(new EventListener(OnClose));

            labLogin = new wx.StaticText(this, (int)idt.ID_FRMALTERARSENHA_LABLOGIN,
                                         "Login: "******"",
                                       new Point(8, 24), new Size(100, 21));
            edtLogin.Enable(false);
            labSenhaAtual = new wx.StaticText(this, (int)idt.ID_FRMALTERARSENHA_LABSENHAATUAL,
                                              "Senha atual:", new Point(112, 8), new Size(60, 13));
            edtSenhaAtual = new wx.TextCtrl(this, (int)idt.ID_FRMALTERARSENHA_EDTSENHAATUAL,
                                            "", new Point(112, 24), new Size(100, 21), wx.TextCtrl.wxTE_PASSWORD);
            labNovaSenha = new wx.StaticText(this, (int)idt.ID_FRMALTERARSENHA_LABNOVASENHA,
                                             "Nova Senha:", new Point(8, 48), new Size(61, 13));
            edtNovaSenha = new wx.TextCtrl(this, (int)idt.ID_FRMALTERARSENHA_EDTNOVASENHA,
                                           "", new Point(8, 64), new Size(100, 21), wx.TextCtrl.wxTE_PASSWORD);
            labConfirmarSenha = new wx.StaticText(this,
                                                  (int)idt.ID_FRMALTERARSENHA_LABCONFIRMARSENHA, "Confirmar senha:",
                                                  new Point(112, 48), new Size(79, 13));
            edtConfirmarSenha = new wx.TextCtrl(this,
                                                (int)idt.ID_FRMALTERARSENHA_EDTCONFIRMARSENHA, "",
                                                new Point(112, 64), new Size(100, 21), wx.TextCtrl.wxTE_PASSWORD);
            btnSalvar = new wx.Button(this, (int)idt.ID_FRMALTERARSENHA_BTNSALVAR,
                                      "&Salvar", new Point(8, 104), new Size(75, 25));
            btnLimpar = new wx.Button(this, (int)idt.ID_FRMALTERARSENHA_BTNLIMPAR,
                                      "&Limpar", new Point(88, 104), new Size(75, 25));
            btnFechar = new wx.Button(this, (int)idt.ID_FRMALTERARSENHA_BTNFECHAR,
                                      "&Fechar", new Point(168, 104), new Size(75, 25));

            edtLogin.Value              = RotinasGlobais.Rotinas.sUsuarioLogin;
            edtSenhaAtual.MaxLength     = 10;
            edtNovaSenha.MaxLength      = 10;
            edtConfirmarSenha.MaxLength = 10;

            EVT_BUTTON((int)idt.ID_FRMALTERARSENHA_BTNSALVAR,
                       new EventListener(OnBtnSalvarClick));
            EVT_BUTTON((int)idt.ID_FRMALTERARSENHA_BTNLIMPAR,
                       new EventListener(OnBtnLimparClick));
            EVT_BUTTON((int)idt.ID_FRMALTERARSENHA_BTNFECHAR,
                       new EventListener(OnBtnFecharClick));

            FazLayout();
            edtSenhaAtual.SetFocus();
        }
コード例 #5
0
ファイル: Cadastros.cs プロジェクト: riquefsouza/livrusvirtus
        // Necessário por causa da tabulação dos campos
        protected void IniciaBotoes()
        {
            btnPesquisar = new wx.Button(this, (int)idt.ID_FRMCADASTROS_BTNPESQUISAR,
                                         "&Pesquisar", new Point(248, 8), new Size(75, 25), 0);
            btnAnterior = new wx.Button(this, (int)idt.ID_FRMCADASTROS_BTNANTERIOR,
                                        "&Anterior", new Point(248, 40), new Size(75, 25), 0);
            btnProximo = new wx.Button(this, (int)idt.ID_FRMCADASTROS_BTNPROXIMO,
                                       "Próxi&mo", new Point(248, 72), new Size(75, 25), 0);
            btnSalvar = new wx.Button(this, (int)idt.ID_FRMCADASTROS_BTNSALVAR,
                                      "&Salvar", new Point(8, 104), new Size(75, 25), 0);
            btnExcluir = new wx.Button(this, (int)idt.ID_FRMCADASTROS_BTNEXCLUIR,
                                       "&Excluir", new Point(88, 104), new Size(75, 25), 0);
            btnLimpar = new wx.Button(this, (int)idt.ID_FRMCADASTROS_BTNLIMPAR,
                                      "&Limpar", new Point(168, 104), new Size(75, 25), 0);
            btnFechar = new wx.Button(this, (int)idt.ID_FRMCADASTROS_BTNFECHAR,
                                      "&Fechar", new Point(248, 104), new Size(75, 25), 0);

            btnLimparClick();
        }
コード例 #6
0
ファイル: Consultas.cs プロジェクト: riquefsouza/livrusvirtus
        public frmConsultas(wx.Window parent)
            : base(parent, -1, "Consulta de", new Point(0, 0), new Size(365, 263),
                   wxDEFAULT_DIALOG_STYLE | wxCAPTION | wxRESIZE_BORDER |
                   wxMINIMIZE_BOX | wxMAXIMIZE_BOX)
        {
            SetIcon(new wx.Icon("xpms/livrus.xpm"));
            ClientSize = new Size(365, 263);
            Centre();

            labDescricao = new wx.StaticText(this, (int)idt.ID_FRMCONSULTAS_LABDESCRICAO,
                                             "Descrição:", new Point(8, 8), new Size(51, 13), 0);
            edtDescricao = new wx.TextCtrl(this, (int)idt.ID_FRMCONSULTAS_EDTDESCRICAO,
                                           "", new Point(8, 24), new Size(257, 21), 0);
            btnPesquisar = new wx.Button(this, (int)idt.ID_FRMCONSULTAS_BTNPESQUISAR,
                                         "&Pesquisar", new Point(272, 24), new Size(75, 25), 0);

            gridConsulta = new wx.Grid(this, (int)idt.ID_FRMCONSULTAS_GRIDCONSULTA,
                                       new Point(0, 56), new Size(365, 125), wx.Window.wxBORDER_SUNKEN);
            gridConsulta.CreateGrid(1, 2, wx.GridSelectionMode.wxGridSelectRows);
            gridConsulta.SetColLabelValue(0, "Código");
            gridConsulta.SetColSize(0, 80);
            gridConsulta.SetColLabelValue(1, "Descrição");
            gridConsulta.SetColSize(1, 180);
            gridConsulta.Editable = false;
            gridConsulta.HideCellEditControl();
            gridConsulta.ColLabelSize = 21;

            labRegistro = new wx.StaticText(this, (int)idt.ID_FRMCONSULTAS_LABREGISTRO,
                                            "Registro 0 de 0", new Point(8, 16), new Size(144, 13), 0);
            btnLimpar = new wx.Button(this, (int)idt.ID_FRMCONSULTAS_BTNLIMPAR,
                                      "&Limpar", new Point(16, 13), new Size(75, 25), 0);
            btnFechar = new wx.Button(this, (int)idt.ID_FRMCONSULTAS_BTNFECHAR,
                                      "&Fechar", new Point(75, 13), new Size(75, 25), 0);

            FazLayout();
            Registros    = new ArrayList();
            sSelecionado = "";
            edtDescricao.SetFocus();
        }
コード例 #7
0
        public frmCadClientes(wx.Window parent)
            : base(parent, TextValidatorCtrl.FILTER_NONE, false)
        {
            labDescricao.Label = "Nome: ";
            edtDescricao.SetSize(new Size(312, 21));
            edtCodigo.EVT_KILL_FOCUS(new EventListener(OnEdtCodigo_Killfocus));

            labEmail = new wx.StaticText(this, (int)idx.ID_FRMCADCLIENTES_LABEMAIL,
                                         "E-mail: ", new Point(8, 88), new Size(34, 13), 0);
            edtEmail = new wx.TextCtrl(this, (int)idx.ID_FRMCADCLIENTES_EDTEMAIL,
                                       "", new Point(8, 104), new Size(312, 21), 0);
            edtEmail.Enabled = false;

            labIdentidade = new wx.StaticText(this, (int)idx.ID_FRMCADCLIENTES_LABIDENTIDADE,
                                              "Identidade: ", new Point(322, 88), new Size(56, 13), 0);
            edtIdentidade = new wx.TextCtrl(this, (int)idx.ID_FRMCADCLIENTES_EDTIDENTIDADE,
                                            "", new Point(322, 104), new Size(100, 21), 0);
            edtIdentidade.Enabled = false;

            string[] sItems = new string[2] {
                "Masculino", "Feminino"
            };
            rbSexo = new wx.RadioBox(this, (int)idx.ID_FRMCADCLIENTES_RBSEXO, "Sexo",
                                     new Point(9, 128), new Size(200, 44), sItems, 2,
                                     wx.RadioBox.wxRA_SPECIFY_COLS);
            rbSexo.Enabled = false;

            labTelefone = new wx.StaticText(this, (int)idx.ID_FRMCADCLIENTES_LABTELEFONE,
                                            "Telefone: ", new Point(216, 128), new Size(48, 13), 0);
            edtTelefone = new wx.TextCtrl(this, (int)idx.ID_FRMCADCLIENTES_EDTTELEFONE,
                                          "", new Point(216, 144), new Size(104, 21), 0);
            edtTelefone.Enabled = false;

            labDtNasc = new wx.StaticText(this, (int)idx.ID_FRMCADCLIENTES_LABDTNASC,
                                          "Dt. Nascimento", new Point(322, 128), new Size(73, 13), 0);
            edtDtNasc = new wx.TextCtrl(this, (int)idx.ID_FRMCADCLIENTES_EDTDTNASC,
                                        "", new Point(322, 144), new Size(100, 21), 0);
            edtDtNasc.Enabled = false;
            edtDtNasc.EVT_KILL_FOCUS(new EventListener(OnEdtDtNasc_Killfocus));

            sbEndereco = new wx.StaticBox(this, (int)idx.ID_FRMCADCLIENTES_SBENDERECO,
                                          "Endereço", new Point(8, 176), new Size(432, 136), 0);

            edtCodEndereco = new TextValidatorCtrl(this,
                                                   (int)idx.ID_FRMCADCLIENTES_EDTCODENDERECO,
                                                   "", new Point(16, 200), new Size(88, 21), 0,
                                                   TextValidatorCtrl.FILTER_NUMERIC);
            edtCodEndereco.Enabled = false;
            edtCodEndereco.EVT_KILL_FOCUS(new EventListener(OnEdtCodEndereco_Killfocus));

            btnPEndereco = new wx.Button(this, (int)idx.ID_FRMCADCLIENTES_BTNPENDERECO,
                                         "...", new Point(104, 200), new Size(21, 21), 0);
            btnPEndereco.Enabled = false;

            labLogradouro = new wx.StaticText(this, (int)idx.ID_FRMCADCLIENTES_LABLOGRADOURO,
                                              "Logradouro: ", new Point(16, 224), new Size(60, 13), 0);
            edtLogradouro = new wx.TextCtrl(this, (int)idx.ID_FRMCADCLIENTES_EDTLOGRADOURO,
                                            "", new Point(16, 240), new Size(264, 21), 0);
            edtLogradouro.Enabled = false;

            labBairro = new wx.StaticText(this, (int)idx.ID_FRMCADCLIENTES_LABBAIRRO,
                                          "Bairro:", new Point(284, 224), new Size(48, 13), 0);
            edtBairro = new wx.TextCtrl(this, (int)idx.ID_FRMCADCLIENTES_EDTBAIRRO,
                                        "", new Point(284, 240), new Size(144, 21), 0);
            edtBairro.Enabled = false;

            labCEP = new wx.StaticText(this, (int)idx.ID_FRMCADCLIENTES_LABCEP, "CEP: ",
                                       new Point(16, 264), new Size(40, 13), 0);
            edtCEP = new wx.TextCtrl(this, (int)idx.ID_FRMCADCLIENTES_EDTCEP, "",
                                     new Point(16, 280), new Size(78, 21), 0);
            edtCEP.Enabled = false;

            labCidade = new wx.StaticText(this, (int)idx.ID_FRMCADCLIENTES_LABCIDADE,
                                          "Cidade: ", new Point(96, 264), new Size(39, 13), 0);
            edtCidade = new wx.TextCtrl(this, (int)idx.ID_FRMCADCLIENTES_EDTCIDADE,
                                        "", new Point(96, 280), new Size(184, 21), 0);
            edtCidade.Enabled = false;

            labEstado = new wx.StaticText(this, (int)idx.ID_FRMCADCLIENTES_LABESTADO,
                                          "Estado: ", new Point(284, 264), new Size(56, 13), 0);
            edtEstado = new wx.TextCtrl(this, (int)idx.ID_FRMCADCLIENTES_EDTESTADO,
                                        "", new Point(284, 280), new Size(144, 21), 0);
            edtEstado.Enabled = false;

            labPais = new wx.StaticText(this, (int)idx.ID_FRMCADCLIENTES_LABPAIS,
                                        "País de origem: ", new Point(8, 320), new Size(77, 16), 0);
            edtCodPais = new TextValidatorCtrl(this, (int)idx.ID_FRMCADCLIENTES_EDTCODPAIS,
                                               "", new Point(8, 336), new Size(78, 21), 0,
                                               TextValidatorCtrl.FILTER_ALPHA);
            edtCodPais.Enabled = false;
            edtCodPais.EVT_KILL_FOCUS(new EventListener(OnEdtCodPais_Killfocus));
            edtPais = new wx.TextCtrl(this, (int)idx.ID_FRMCADCLIENTES_EDTPAIS,
                                      "", new Point(88, 336), new Size(240, 21), 0);
            edtPais.Enabled = false;
            btnPPais        = new wx.Button(this, (int)idx.ID_FRMCADCLIENTES_BTNPPAIS, "...",
                                            new Point(328, 336), new Size(21, 21), 0);
            btnPPais.Enabled = false;

            labProfissao = new wx.StaticText(this, (int)idx.ID_FRMCADCLIENTES_LABPROFISSAO,
                                             "Profissão: ", new Point(8, 360), new Size(56, 13), 0);
            edtCodProfissao = new TextValidatorCtrl(this,
                                                    (int)idx.ID_FRMCADCLIENTES_EDTCODPROFISSAO,
                                                    "", new Point(8, 376), new Size(78, 21), 0,
                                                    TextValidatorCtrl.FILTER_NUMERIC);
            edtCodProfissao.Enabled = false;
            edtCodProfissao.EVT_KILL_FOCUS(new EventListener(OnEdtCodProfissao_Killfocus));
            edtProfissao = new wx.TextCtrl(this, (int)idx.ID_FRMCADCLIENTES_EDTPROFISSAO,
                                           "", new Point(88, 376), new Size(240, 21), 0);
            edtProfissao.Enabled = false;
            btnPProfissao        = new wx.Button(this, (int)idx.ID_FRMCADCLIENTES_BTNPPROFISSAO,
                                                 "...", new Point(328, 376), new Size(21, 21), 0);
            btnPProfissao.Enabled = false;

            IniciaBotoes();
            btnPesquisar.SetSize(440, 8, 75, 25);
            btnAnterior.SetSize(440, 40, 75, 25);
            btnProximo.SetSize(440, 72, 75, 25);
            btnSalvar.SetSize(200, 408, 75, 25);
            btnExcluir.SetSize(280, 408, 75, 25);
            btnLimpar.SetSize(360, 408, 75, 25);
            btnFechar.SetSize(440, 408, 75, 25);

            //FazLayout();

            edtCodigo.MaxLength       = 14;
            edtDescricao.MaxLength    = 30;
            edtEmail.MaxLength        = 30;
            edtIdentidade.MaxLength   = 10;
            edtCodEndereco.MaxLength  = 10;
            edtTelefone.MaxLength     = 17;
            edtCodPais.MaxLength      = 3;
            edtCodProfissao.MaxLength = 10;

            EVT_BUTTON((int)idt.ID_FRMCADASTROS_BTNNOVO,
                       new EventListener(OnBtnNovo));
            EVT_BUTTON((int)idt.ID_FRMCADASTROS_BTNPESQUISAR,
                       new EventListener(OnBtnPesquisar));
            EVT_BUTTON((int)idt.ID_FRMCADASTROS_BTNANTERIOR,
                       new EventListener(OnBtnAnterior));
            EVT_BUTTON((int)idt.ID_FRMCADASTROS_BTNPROXIMO,
                       new EventListener(OnBtnProximo));
            EVT_BUTTON((int)idt.ID_FRMCADASTROS_BTNSALVAR,
                       new EventListener(OnBtnSalvar));
            EVT_BUTTON((int)idt.ID_FRMCADASTROS_BTNEXCLUIR,
                       new EventListener(OnBtnExcluir));
            EVT_BUTTON((int)idt.ID_FRMCADASTROS_BTNLIMPAR,
                       new EventListener(OnBtnLimpar));
            EVT_BUTTON((int)idt.ID_FRMCADASTROS_BTNFECHAR,
                       new EventListener(OnBtnFechar));
            EVT_CLOSE(new EventListener(OnClose));
            EVT_BUTTON((int)idx.ID_FRMCADCLIENTES_BTNPENDERECO,
                       new EventListener(OnBtnPEndereco));
            EVT_BUTTON((int)idx.ID_FRMCADCLIENTES_BTNPPAIS,
                       new EventListener(OnBtnPPais));
            EVT_BUTTON((int)idx.ID_FRMCADCLIENTES_BTNPPROFISSAO,
                       new EventListener(OnBtnPProfissao));
        }
コード例 #8
0
        public frmConVendas(wx.Window parent)
            : base(parent, -1, new Point(0, 0), new Size(480, 310))
        {
            labDtHrVenda = new wx.StaticText(this, (int)idx.ID_FRMCONVENDAS_LABDTHRVENDA,
                                             "Data/Hora Venda: ", new Point(8, 8), new Size(91, 13), 0);
            edtDtHrVenda = new wx.TextCtrl(this, (int)idx.ID_FRMCONVENDAS_EDTDTHRVENDA,
                                           "", new Point(8, 24), new Size(128, 21), 0);
            edtDtHrVenda.EVT_KILL_FOCUS(new EventListener(OnEdtDtHrVenda_Killfocus));

            btnPesquisar = new wx.Button(this, (int)idx.ID_FRMCONVENDAS_BTNPESQUISAR,
                                         "&Pesquisar", new Point(144, 22), new Size(75, 25), 0);

            labCPF = new wx.StaticText(this, (int)idx.ID_FRMCONVENDAS_LABCPF,
                                       "CPF: ", new Point(8, 48), new Size(48, 13), 0);
            edtCPF = new wx.TextCtrl(this, (int)idx.ID_FRMCONVENDAS_EDTCPF,
                                     "", new Point(8, 64), new Size(128, 21), 0);
            edtCPF.EVT_KILL_FOCUS(new EventListener(OnEdtCPF_Killfocus));

            labCliente = new wx.StaticText(this, (int)idx.ID_FRMCONVENDAS_LABCLIENTE,
                                           "Cliente: ", new Point(142, 48), new Size(56, 13), 0);
            edtCliente = new wx.TextCtrl(this, (int)idx.ID_FRMCONVENDAS_EDTCLIENTE,
                                         "", new Point(142, 64), new Size(306, 21), 0);
            edtCliente.Enabled = false;

            btnPCliente = new wx.Button(this, (int)idx.ID_FRMCONVENDAS_BTNPCLIENTE,
                                        "...", new Point(448, 64), new Size(21, 21), 0);

            labISBN = new wx.StaticText(this, (int)idx.ID_FRMCONVENDAS_LABISBN,
                                        "ISBN: ", new Point(8, 88), new Size(48, 13), 0);
            edtISBN = new wx.TextCtrl(this, (int)idx.ID_FRMCONVENDAS_EDTISBN,
                                      "", new Point(8, 104), new Size(128, 21), 0);
            edtISBN.EVT_KILL_FOCUS(new EventListener(OnEdtISBN_Killfocus));

            labLivro = new wx.StaticText(this, (int)idx.ID_FRMCONVENDAS_LABLIVRO,
                                         "Livro: ", new Point(142, 88), new Size(40, 13), 0);
            edtLivro = new wx.TextCtrl(this, (int)idx.ID_FRMCONVENDAS_EDTLIVRO,
                                       "", new Point(142, 104), new Size(306, 21), 0);
            edtLivro.Enabled = false;

            btnPLivro = new wx.Button(this, (int)idx.ID_FRMCONVENDAS_BTNPLIVRO,
                                      "...", new Point(448, 104), new Size(21, 21), 0);

            this.gridVendas = new wx.Grid(this, (int)idx.ID_FRMCONVENDAS_GRIDVENDAS,
                                          new Point(0, 136), new Size(355, 122), wxSUNKEN_BORDER);
            this.gridVendas.CreateGrid(1, 6, wx.GridSelectionMode.wxGridSelectRows);
            this.gridVendas.HideCellEditControl();
            this.gridVendas.ColLabelSize = 21;

            this.labRegistro = new wx.StaticText(this, (int)idx.ID_FRMCONVENDAS_LABREGISTRO,
                                                 "Registro 0 de 0", new Point(8, 16), new Size(144, 13), 0);

            labPrecoTotal = new wx.StaticText(this, (int)idx.ID_FRMCONVENDAS_LABPRECOTOTAL,
                                              "Preço Total: ", new Point(280, 248), new Size(61, 13), 0);
            edtPrecoTotal = new wx.TextCtrl(this, (int)idx.ID_FRMCONVENDAS_EDTPRECOTOTAL,
                                            "", new Point(344, 246), new Size(127, 21), 0);
            edtPrecoTotal.Enabled = false;

            this.btnLimpar = new wx.Button(this, (int)idx.ID_FRMCONVENDAS_BTNLIMPAR,
                                           "&Limpar", new Point(16, 13), new Size(75, 25), 0);
            this.btnFechar = new wx.Button(this, (int)idx.ID_FRMCONVENDAS_BTNFECHAR,
                                           "&Fechar", new Point(75, 13), new Size(75, 25), 0);

            FazLayout();

            int[] nLargura = new int[6] {
                120, 100, 220, 100, 280, 80
            };
            string[] sRotulos = new string[6] {
                "Data/Hora Venda", "CPF", "Cliente",
                "ISBN", "Livro", "Preço"
            };
            RotinasGlobais.Rotinas.AdicionaColunasGrid(gridVendas, 0, 6, nLargura, sRotulos);
            gridVendas.Editable = false;
            edtCPF.MaxLength    = 14;
            edtISBN.MaxLength   = 13;
            edtPrecoTotal.Value = "R$ 0,00";
            edtDtHrVenda.Value  = RotinasGlobais.Rotinas.retDataHoraStr(true, true);

            EVT_BUTTON((int)idx.ID_FRMCONVENDAS_BTNPESQUISAR, new EventListener(OnBtnPesquisar));
            EVT_BUTTON((int)idx.ID_FRMCONVENDAS_BTNLIMPAR, new EventListener(OnBtnLimpar));
            EVT_BUTTON((int)idx.ID_FRMCONVENDAS_BTNFECHAR, new EventListener(OnBtnFechar));
            EVT_CLOSE(new EventListener(OnClose));
            EVT_BUTTON((int)idx.ID_FRMCONVENDAS_BTNPCLIENTE, new EventListener(OnBtnPCliente));
            EVT_BUTTON((int)idx.ID_FRMCONVENDAS_BTNPLIVRO, new EventListener(OnBtnPLivro));
            EVT_GRID_SELECT_CELL(new EventListener(OnGridSelectCell));
            EVT_GRID_LABEL_LEFT_CLICK(new EventListener(OnGridLabelLeftClick));
        }
コード例 #9
0
ファイル: CadLivros.cs プロジェクト: riquefsouza/livrusvirtus
        public frmCadLivros(wx.Window parent)
            : base(parent, TextValidatorCtrl.FILTER_NONE, false)
        {
            slIdiomas  = new ArrayList();
            slAssuntos = new ArrayList();
            slAutores  = new ArrayList();

            labCodigo.Label    = "ISBN: ";
            labDescricao.Label = "Título: ";
            edtDescricao.SetSize(new Size(312, 21));
            edtCodigo.EVT_KILL_FOCUS(new EventListener(OnEdtCodigo_Killfocus));

            labEdicao = new wx.StaticText(this, (int)idx.ID_FRMCADLIVROS_LABEDICAO,
                                          "Edição: ", new Point(326, 48), new Size(39, 13), 0);
            edtEdicao = new wx.SpinCtrl(this, (int)idx.ID_FRMCADLIVROS_EDTEDICAO,
                                        "1", new Point(324, 64), new Size(92, 21), wx.SpinCtrl.wxSP_ARROW_KEYS, 1, 9999, 1);
            edtEdicao.Enabled = false;

            labAnoPubli = new wx.StaticText(this, (int)idx.ID_FRMCADLIVROS_LABANOPUBLI,
                                            "Ano Publicação: ", new Point(8, 88), new Size(81, 13), 0);
            edtAnoPubli = new wx.SpinCtrl(this, (int)idx.ID_FRMCADLIVROS_EDTANOPUBLI,
                                          "1", new Point(8, 104), new Size(92, 21), wx.SpinCtrl.wxSP_ARROW_KEYS, 1, 9999, 1);
            edtAnoPubli.Enabled = false;

            labEditora = new wx.StaticText(this, (int)idx.ID_FRMCADLIVROS_LABEDITORA,
                                           "Editora: ", new Point(104, 88), new Size(39, 13), 0);
            edtCodEditora = new TextValidatorCtrl(this, (int)idx.ID_FRMCADLIVROS_EDTCODEDITORA,
                                                  "", new Point(104, 104), new Size(78, 21), 0, TextValidatorCtrl.FILTER_NUMERIC);
            edtCodEditora.Enabled = false;
            edtCodEditora.EVT_KILL_FOCUS(
                new EventListener(OnEdtCodEditora_Killfocus));

            edtEditora = new wx.TextCtrl(this, (int)idx.ID_FRMCADLIVROS_EDTEDITORA,
                                         "", new Point(184, 104), new Size(216, 21), 0);
            edtEditora.Enabled = false;

            btnPEditora = new wx.Button(this, (int)idx.ID_FRMCADLIVROS_BTNPEDITORA,
                                        "...", new Point(400, 104), new Size(21, 21), 0);
            btnPEditora.Enabled = false;

            labVolume = new wx.StaticText(this, (int)idx.ID_FRMCADLIVROS_LABVOLUME,
                                          "Volume: ", new Point(8, 128), new Size(41, 13), 0);
            edtVolume = new wx.SpinCtrl(this, (int)idx.ID_FRMCADLIVROS_EDTVOLUME,
                                        "1", new Point(8, 144), new Size(92, 21), wx.SpinCtrl.wxSP_ARROW_KEYS, 1, 9999, 1);
            edtVolume.Enabled = false;

            labIdioma = new wx.StaticText(this, (int)idx.ID_FRMCADLIVROS_LABIDIOMA,
                                          "Idioma: ", new Point(104, 128), new Size(56, 13), 0);

            AdicionaCombo();
            cmbIdioma = new wx.Choice(this, (int)idx.ID_FRMCADLIVROS_CMBIDIOMA,
                                      new Point(104, 144), new Size(320, 21), vsIdiomas);
            cmbIdioma.Enabled = false;

            labNPaginas = new wx.StaticText(this, (int)idx.ID_FRMCADLIVROS_LABNPAGINAS,
                                            "Nº Páginas: ", new Point(8, 168), new Size(59, 13), 0);

            edtNPaginas = new wx.SpinCtrl(this, (int)idx.ID_FRMCADLIVROS_EDTNPAGINAS,
                                          "1", new Point(8, 184), new Size(92, 21), wx.SpinCtrl.wxSP_ARROW_KEYS, 1, 9999, 1);
            edtNPaginas.Enabled = false;

            labAssunto = new wx.StaticText(this, (int)idx.ID_FRMCADLIVROS_LABASSUNTO,
                                           "Assunto: ", new Point(104, 168), new Size(44, 13), 0);

            edtCodAssunto = new TextValidatorCtrl(this, (int)idx.ID_FRMCADLIVROS_EDTCODASSUNTO,
                                                  "", new Point(104, 184), new Size(78, 21), 0,
                                                  TextValidatorCtrl.FILTER_NUMERIC);
            edtCodAssunto.Enabled = false;
            edtCodAssunto.EVT_KILL_FOCUS(
                new EventListener(OnEdtCodAssunto_Killfocus));

            edtAssunto = new wx.TextCtrl(this, (int)idx.ID_FRMCADLIVROS_EDTASSUNTO,
                                         "", new Point(184, 184), new Size(192, 21), 0);
            edtAssunto.Enabled = false;

            btnAdAssuntos = new wx.Button(this, (int)idx.ID_FRMCADLIVROS_BTNADASSUNTOS,
                                          "+", new Point(376, 184), new Size(21, 21), 0);
            btnAdAssuntos.Enabled = false;

            btnPAssunto = new wx.Button(this, (int)idx.ID_FRMCADLIVROS_BTNPASSUNTO,
                                        "...", new Point(400, 184), new Size(21, 21), 0);
            btnPAssunto.Enabled = false;

            lstAssuntos = new wx.ListBox(this, (int)idx.ID_FRMCADLIVROS_LSTASSUNTOS,
                                         new Point(104, 208), new Size(320, 48));
            lstAssuntos.Enabled = false;

            labPreco = new wx.StaticText(this, (int)idx.ID_FRMCADLIVROS_LABPRECO,
                                         "Preço: ", new Point(8, 216), new Size(40, 13), 0);

            edtPreco = new wx.TextCtrl(this, (int)idx.ID_FRMCADLIVROS_EDTPRECO,
                                       "", new Point(7, 232), new Size(92, 21), 0);
            edtPreco.Enabled = false;
            edtPreco.EVT_KILL_FOCUS(
                new EventListener(OnEdtPreco_Killfocus));

            labQtdEstoque = new wx.StaticText(this, (int)idx.ID_FRMCADLIVROS_LABQTDESTOQUE,
                                              "Qtd. Estoque: ", new Point(6, 256), new Size(68, 13), 0);

            edtQtdEstoque = new wx.SpinCtrl(this, (int)idx.ID_FRMCADLIVROS_EDTQTDESTOQUE,
                                            "0", new Point(8, 272), new Size(92, 21), wx.SpinCtrl.wxSP_ARROW_KEYS, 0, 9999, 0);
            edtQtdEstoque.Enabled = false;

            labAutor = new wx.StaticText(this, (int)idx.ID_FRMCADLIVROS_LABAUTOR,
                                         "Autor: ", new Point(104, 256), new Size(31, 13), 0);
            edtCodAutor = new TextValidatorCtrl(this, (int)idx.ID_FRMCADLIVROS_EDTCODAUTOR,
                                                "", new Point(104, 272), new Size(78, 21), 0,
                                                TextValidatorCtrl.FILTER_NUMERIC);
            edtCodAutor.Enabled = false;
            edtCodAutor.EVT_KILL_FOCUS(
                new EventListener(OnEdtCodAutor_Killfocus));

            edtAutor = new wx.TextCtrl(this, (int)idx.ID_FRMCADLIVROS_EDTAUTOR,
                                       "", new Point(184, 272), new Size(192, 21), 0);
            edtAutor.Enabled = false;

            btnAdAutores = new wx.Button(this, (int)idx.ID_FRMCADLIVROS_BTNADAUTORES,
                                         "+", new Point(376, 272), new Size(21, 21), 0);
            btnAdAutores.Enabled = false;

            btnPAutor = new wx.Button(this, (int)idx.ID_FRMCADLIVROS_BTNPAUTOR, "...",
                                      new Point(400, 272), new Size(21, 21), 0);
            btnPAutor.Enabled = false;

            lstAutores = new wx.ListBox(this, (int)idx.ID_FRMCADLIVROS_LSTAUTORES,
                                        new Point(104, 296), new Size(320, 48));
            lstAutores.Enabled = false;

            IniciaBotoes();
            btnPesquisar.SetSize(427, 8, 75, 25);
            btnAnterior.SetSize(427, 40, 75, 25);
            btnProximo.SetSize(427, 72, 75, 25);
            btnSalvar.SetSize(187, 352, 75, 25);
            btnExcluir.SetSize(267, 352, 75, 25);
            btnLimpar.SetSize(347, 352, 75, 25);
            btnFechar.SetSize(427, 352, 75, 25);

            //FazLayout();

            edtCodigo.MaxLength     = 13;
            edtDescricao.MaxLength  = 50;
            edtCodEditora.MaxLength = 5;
            edtPreco.MaxLength      = 7;

            EVT_BUTTON((int)idt.ID_FRMCADASTROS_BTNNOVO,
                       new EventListener(OnBtnNovo));
            EVT_BUTTON((int)idt.ID_FRMCADASTROS_BTNPESQUISAR,
                       new EventListener(OnBtnPesquisar));
            EVT_BUTTON((int)idt.ID_FRMCADASTROS_BTNANTERIOR,
                       new EventListener(OnBtnAnterior));
            EVT_BUTTON((int)idt.ID_FRMCADASTROS_BTNPROXIMO,
                       new EventListener(OnBtnProximo));
            EVT_BUTTON((int)idt.ID_FRMCADASTROS_BTNSALVAR,
                       new EventListener(OnBtnSalvar));
            EVT_BUTTON((int)idt.ID_FRMCADASTROS_BTNEXCLUIR,
                       new EventListener(OnBtnExcluir));
            EVT_BUTTON((int)idt.ID_FRMCADASTROS_BTNLIMPAR,
                       new EventListener(OnBtnLimpar));
            EVT_BUTTON((int)idt.ID_FRMCADASTROS_BTNFECHAR,
                       new EventListener(OnBtnFechar));
            EVT_CLOSE(new EventListener(OnClose));
            EVT_BUTTON((int)idx.ID_FRMCADLIVROS_BTNPEDITORA,
                       new EventListener(OnBtnPEditora));
            EVT_BUTTON((int)idx.ID_FRMCADLIVROS_BTNPASSUNTO,
                       new EventListener(OnBtnPAssunto));
            EVT_BUTTON((int)idx.ID_FRMCADLIVROS_BTNADASSUNTOS,
                       new EventListener(OnBtnAdAssuntos));
            EVT_BUTTON((int)idx.ID_FRMCADLIVROS_BTNPAUTOR,
                       new EventListener(OnBtnPAutor));
            EVT_BUTTON((int)idx.ID_FRMCADLIVROS_BTNADAUTORES,
                       new EventListener(OnBtnAdAutores));
            EVT_LISTBOX_DCLICK((int)idx.ID_FRMCADLIVROS_LSTASSUNTOS,
                               new EventListener(OnLstAssuntos_Dblclk));
            EVT_LISTBOX_DCLICK((int)idx.ID_FRMCADLIVROS_LSTAUTORES,
                               new EventListener(OnLstAutores_Dblclk));
        }
コード例 #10
0
        public frmVenderLivros(wx.Window parent)
            : base(parent, TextValidatorCtrl.FILTER_NONE, false)
        {
            slPrecos     = new ArrayList();
            slISBNs      = new ArrayList();
            slQtdEstoque = new ArrayList();
            btnNovo.Hide();

            labDtHrVenda = new wx.StaticText(this, (int)idx.ID_FRMVENDERLIVROS_LABDTHRVENDA,
                                             "Data/Hora Venda: ", new Point(8, 8), new Size(91, 13), 0);
            edtDtHrVenda = new wx.TextCtrl(this, (int)idx.ID_FRMVENDERLIVROS_EDTDTHRVENDA,
                                           "", new Point(8, 24), new Size(128, 21), 0);
            edtDtHrVenda.Enabled = false;

            labCodigo.Label = "CPF: ";
            labCodigo.SetSize(8, 48, 48, 13);
            edtCodigo.SetSize(8, 64, 128, 21);
            edtCodigo.EVT_KILL_FOCUS(new EventListener(OnEdtCodigo_Killfocus));

            labDescricao.Label = "Cliente: ";
            labDescricao.SetSize(142, 48, 56, 13);
            edtDescricao.SetSize(142, 64, 306, 21);
            edtDescricao.Enabled = false;

            btnPCliente = new wx.Button(this, (int)idx.ID_FRMVENDERLIVROS_BTNPCLIENTE,
                                        "...", new Point(448, 64), new Size(21, 21), 0);

            labISBN = new wx.StaticText(this, (int)idx.ID_FRMVENDERLIVROS_LABISBN,
                                        "ISBN: ", new Point(8, 88), new Size(48, 13), 0);
            edtISBN = new wx.TextCtrl(this, (int)idx.ID_FRMVENDERLIVROS_EDTISBN,
                                      "", new Point(8, 104), new Size(128, 21), 0);
            edtISBN.EVT_KILL_FOCUS(new EventListener(OnEdtISBN_Killfocus));

            labLivro = new wx.StaticText(this, (int)idx.ID_FRMVENDERLIVROS_LABLIVRO,
                                         "Livro: ", new Point(142, 88), new Size(40, 13), 0);
            edtLivro = new wx.TextCtrl(this, (int)idx.ID_FRMVENDERLIVROS_EDTLIVRO,
                                       "", new Point(142, 104), new Size(282, 21), 0);
            edtLivro.Enabled = false;

            btnAdLivros = new wx.Button(this, (int)idx.ID_FRMVENDERLIVROS_BTNADLIVROS,
                                        "+", new Point(424, 104), new Size(21, 21), 0);

            btnPLivro = new wx.Button(this, (int)idx.ID_FRMVENDERLIVROS_BTNPLIVRO,
                                      "...", new Point(448, 104), new Size(21, 21), 0);

            labLivros = new wx.StaticText(this, (int)idx.ID_FRMVENDERLIVROS_LABLIVROS,
                                          "Livros para vender: ", new Point(8, 128), new Size(120, 13), 0);

            lstLivros = new wx.ListBox(this, (int)idx.ID_FRMVENDERLIVROS_LSTLIVROS,
                                       new Point(8, 144), new Size(464, 96));

            labPrecoTotal = new wx.StaticText(this, (int)idx.ID_FRMVENDERLIVROS_LABPRECOTOTAL,
                                              "Preço Total: ", new Point(280, 248), new Size(61, 13), 0);
            edtPrecoTotal = new wx.TextCtrl(this, (int)idx.ID_FRMVENDERLIVROS_EDTPRECOTOTAL,
                                            "R$ 0,00", new Point(344, 246), new Size(127, 21), 0);
            edtPrecoTotal.Enabled = false;

            btnVender = new wx.Button(this, (int)idx.ID_FRMVENDERLIVROS_BTNVENDER,
                                      "&Vender", new Point(239, 275), new Size(75, 25), 0);
            btnLimpar = new wx.Button(this, (int)idx.ID_FRMVENDERLIVROS_BTNLIMPAR,
                                      "&Limpar", new Point(319, 275), new Size(75, 25), 0);
            btnFechar = new wx.Button(this, (int)idx.ID_FRMVENDERLIVROS_BTNFECHAR,
                                      "&Fechar", new Point(399, 275), new Size(75, 25), 0);

            //FazLayout();

            edtDtHrVenda.Value  = RotinasGlobais.Rotinas.retDataHoraStr(true, true);
            edtCodigo.MaxLength = 14;
            edtISBN.MaxLength   = 13;
            nPrecoTotal         = 0;

            EVT_BUTTON((int)idx.ID_FRMVENDERLIVROS_BTNVENDER,
                       new EventListener(OnBtnVender));
            EVT_BUTTON((int)idx.ID_FRMVENDERLIVROS_BTNLIMPAR,
                       new EventListener(OnBtnLimpar));
            EVT_BUTTON((int)idx.ID_FRMVENDERLIVROS_BTNFECHAR,
                       new EventListener(OnBtnFechar));
            EVT_CLOSE(new EventListener(OnClose));
            EVT_BUTTON((int)idx.ID_FRMVENDERLIVROS_BTNPCLIENTE,
                       new EventListener(OnBtnPCliente));
            EVT_BUTTON((int)idx.ID_FRMVENDERLIVROS_BTNPLIVRO,
                       new EventListener(OnBtnPLivro));
            EVT_BUTTON((int)idx.ID_FRMVENDERLIVROS_BTNADLIVROS,
                       new EventListener(OnBtnAdLivros));
            EVT_LISTBOX_DCLICK((int)idx.ID_FRMVENDERLIVROS_LSTLIVROS,
                               new EventListener(OnLstLivros_Dblclk));
        }