Example #1
0
 public StaticBoxSizer(StaticBox box, int orient)
     : base(wxStaticBoxSizer_ctor(Object.SafePtr(box), orient))
 {
 }
Example #2
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));
        }