public frmCadEnderecos(wx.Window parent) : base(parent, TextValidatorCtrl.FILTER_NUMERIC, false) { ClientSize = new Size(523, 171); labDescricao.Label = "Logradouro:"; labDescricao.Size = new Size(57, 13); edtDescricao.Size = new Size(264, 21); labBairro = new wx.StaticText(this, (int)idx.ID_FRMCADENDERECOS_LABBAIRRO, "Bairro:", new Point(280, 48), new Size(48, 13)); edtBairro = new wx.TextCtrl(this, (int)idx.ID_FRMCADENDERECOS_EDTBAIRRO, "", new Point(280, 64), new Size(144, 21)); edtBairro.Enabled = false; labCEP = new wx.StaticText(this, (int)idx.ID_FRMCADENDERECOS_LABCEP, "CEP: ", new Point(8, 88), new Size(40, 13)); edtCEP = new wx.TextCtrl(this, (int)idx.ID_FRMCADENDERECOS_EDTCEP, "", new Point(8, 104), new Size(72, 21)); edtCEP.Enabled = false; labCidade = new wx.StaticText(this, (int)idx.ID_FRMCADENDERECOS_LABCIDADE, "Cidade: ", new Point(88, 88), new Size(39, 13)); edtCidade = new wx.TextCtrl(this, (int)idx.ID_FRMCADENDERECOS_EDTCIDADE, "", new Point(88, 104), new Size(184, 21)); edtCidade.Enabled = false; labEstado = new wx.StaticText(this, (int)idx.ID_FRMCADENDERECOS_LABESTADO, "Estado: ", new Point(280, 88), new Size(56, 13)); AdicionaCombo(); cmbEstado = new wx.Choice(this, (int)idx.ID_FRMCADENDERECOS_CMBESTADO, new Point(280, 104), new Size(144, 21), vsEstados); cmbEstado.Enabled = false; IniciaBotoes(); btnPesquisar.SetSize(440, 8, 75, 25); btnAnterior.SetSize(440, 40, 75, 25); btnProximo.SetSize(440, 72, 75, 25); btnSalvar.SetSize(200, 136, 75, 25); btnExcluir.SetSize(280, 136, 75, 25); btnLimpar.SetSize(360, 136, 75, 25); btnFechar.SetSize(440, 136, 75, 25); //FazLayout(); edtDescricao.MaxLength = 40; edtBairro.MaxLength = 15; edtCEP.MaxLength = 8; edtCidade.MaxLength = 30; 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)); }
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)); }