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)); }
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)); }
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)); }
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)); }