public ToolBarTool(ToolBar tbar, Control control) : this(wxToolBarToolBase_ctorCtrl(Object.SafePtr(tbar), Object.SafePtr(control))) { }
void Attach(ToolBar tbar) { wxToolBarToolBase_Attach(wxObject, Object.SafePtr(tbar)); }
public ToolBarTool(ToolBar tbar, int toolid, string label, Bitmap bmpNormal, Bitmap bmpDisabled, ItemKind kind, ClientData clientData, string shortHelpString, string longHelpString) : this(wxToolBarToolBase_ctor(Object.SafePtr(tbar), toolid, label, Object.SafePtr(bmpNormal), Object.SafePtr(bmpDisabled), (int)kind, Object.SafePtr(clientData), shortHelpString, longHelpString)) { }
public frmPrincipal() : base(null, -1, Resource.STR_TITULO, new Point(-1, -1), new Size(640, 480), wx.MDIParentFrame.wxDEFAULT_MDI_FRAME_STYLE) { Icon = new wx.Icon("xpms/livrus.xpm"); //Barra de Menu mnuCadastros = new wx.Menu(); mnuCadastros.Append((int)Resource.MNU_CAD_ASSUNTOS, "&Assuntos", Resource.STR_CADASSUNTO); mnuCadastros.Append((int)Resource.MNU_CAD_AUTORES, "A&utores", Resource.STR_CADAUTOR); mnuCadastros.Append((int)Resource.MNU_CAD_EDITORAS, "&Editoras", Resource.STR_CADEDITORA); mnuCadastros.Append((int)Resource.MNU_CAD_ENDERECOS, "E&ndereços", Resource.STR_CADENDERECO); mnuCadastros.Append((int)Resource.MNU_CAD_IDIOMAS, "&Idiomas", Resource.STR_CADIDIOMA); mnuCadastros.Append((int)Resource.MNU_CAD_PAISES, "&Países", Resource.STR_CADPAIS); mnuCadastros.Append((int)Resource.MNU_CAD_PROFISSOES, "P&rofissões", Resource.STR_CADPROFISS); mnuCadastros.AppendSeparator(); mnuCadastros.Append((int)Resource.MNU_CAD_CLIENTES, "&Clientes", Resource.STR_CADCLIENTE); mnuCadastros.Append((int)Resource.MNU_CAD_LIVROS, "&Livros", Resource.STR_CADLIVRO); mnuPesquisas = new wx.Menu(); mnuPesquisas.Append((int)Resource.MNU_CON_ASSUNTOS, "&Assuntos", Resource.STR_CONASSUNTO); mnuPesquisas.Append((int)Resource.MNU_CON_AUTORES, "A&utores", Resource.STR_CONAUTOR); mnuPesquisas.Append((int)Resource.MNU_CON_EDITORAS, "&Editoras", Resource.STR_CONEDITORA); mnuPesquisas.Append((int)Resource.MNU_CON_ENDERECOS, "E&ndereços", Resource.STR_CONENDERECO); mnuPesquisas.Append((int)Resource.MNU_CON_IDIOMAS, "&Idiomas", Resource.STR_CONIDIOMA); mnuPesquisas.Append((int)Resource.MNU_CON_PAISES, "&Países", Resource.STR_CONPAIS); mnuPesquisas.Append((int)Resource.MNU_CON_PROFISSOES, "P&rofissões", Resource.STR_CONPROFISS); mnuPesquisas.AppendSeparator(); mnuPesquisas.Append((int)Resource.MNU_CON_CLIENTES, "&Clientes", Resource.STR_CONCLIENTE); mnuPesquisas.Append((int)Resource.MNU_CON_LIVROS, "&Livros", Resource.STR_CONLIVRO); mnuVendas = new wx.Menu(); mnuVendas.Append((int)Resource.MNU_VEN_VENDERLIVROS, "&Vender Livros", Resource.STR_VENLIVRO); mnuVendas.Append((int)Resource.MNU_VEN_VENDASREALIZADAS, "Vendas &Realizadas", Resource.STR_CONVENLIVRO); mnuOpcoes = new wx.Menu(); mnuOpcoes.Append((int)Resource.MNU_OP_ALTERARSENHA, "&Alterar Senha", Resource.STR_ALTSENHA); mnuOpcoes.AppendSeparator(); mnuOpcoes.Append((int)Resource.MNU_OP_SOBRE, "&Sobre", Resource.STR_OPSOBRE); mnuOpcoes.Append((int)Resource.MNU_OP_SAIR, "Sa&ir\tCtrl-S", Resource.STR_OPSAIR); barraMenu = new wx.MenuBar(); barraMenu.Append(mnuCadastros, "&Cadastros"); barraMenu.Append(mnuPesquisas, "&Pesquisas"); barraMenu.Append(mnuVendas, "&Vendas"); barraMenu.Append(mnuOpcoes, "&Opções"); MenuBar = barraMenu; //Barra de ferramentas barraFerra = new wx.ToolBar(this, -1, wxDefaultPosition, wxDefaultSize, wx.ToolBar.wxTB_HORIZONTAL | wx.ToolBar.wxNO_BORDER); ToolBar = barraFerra; barraFerra.AddTool((int)Resource.MNU_CAD_CLIENTES, "", new wx.Bitmap("xpms/cliente.xpm", wx.BitmapType.wxBITMAP_TYPE_XPM), "", wx.ItemKind.wxITEM_NORMAL); barraFerra.AddTool((int)Resource.MNU_CAD_LIVROS, "", new wx.Bitmap("xpms/livro.xpm", wx.BitmapType.wxBITMAP_TYPE_XPM), "", wx.ItemKind.wxITEM_NORMAL); barraFerra.AddTool((int)Resource.MNU_VEN_VENDERLIVROS, "", new wx.Bitmap("xpms/livros.xpm", wx.BitmapType.wxBITMAP_TYPE_XPM), "", wx.ItemKind.wxITEM_NORMAL); barraFerra.AddSeparator(); barraFerra.AddTool((int)Resource.MNU_OP_SOBRE, "", new wx.Bitmap("xpms/sobre.xpm", wx.BitmapType.wxBITMAP_TYPE_XPM), "", wx.ItemKind.wxITEM_NORMAL); barraFerra.AddTool((int)Resource.MNU_OP_SAIR, "", new wx.Bitmap("xpms/sair.xpm", wx.BitmapType.wxBITMAP_TYPE_XPM), "", wx.ItemKind.wxITEM_NORMAL); barraFerra.Realize(); barraStatus = CreateStatusBar(2); StatusBarPane = 1; nLarguras = new int[2]; nLarguras[0] = 100; nLarguras[1] = -1; barraStatus.StatusWidths = nLarguras; barraStatus.SetStatusText(Resource.STR_USUARIO, 0); FazLayout(); EVT_MENU((int)Resource.MNU_CAD_ASSUNTOS, new EventListener(OnMnuCadAssuntos)); EVT_MENU((int)Resource.MNU_CAD_AUTORES, new EventListener(OnMnuCadAutores)); EVT_MENU((int)Resource.MNU_CAD_EDITORAS, new EventListener(OnMnuCadEditoras)); EVT_MENU((int)Resource.MNU_CAD_ENDERECOS, new EventListener(OnMnuCadEnderecos)); EVT_MENU((int)Resource.MNU_CAD_IDIOMAS, new EventListener(OnMnuCadIdiomas)); EVT_MENU((int)Resource.MNU_CAD_PAISES, new EventListener(OnMnuCadPaises)); EVT_MENU((int)Resource.MNU_CAD_PROFISSOES, new EventListener(OnMnuCadProfissoes)); EVT_MENU((int)Resource.MNU_CAD_CLIENTES, new EventListener(OnMnuCadClientes)); EVT_MENU((int)Resource.MNU_CAD_LIVROS, new EventListener(OnMnuCadLivros)); EVT_MENU((int)Resource.MNU_CON_ASSUNTOS, new EventListener(OnMnuConAssuntos)); EVT_MENU((int)Resource.MNU_CON_AUTORES, new EventListener(OnMnuConAutores)); EVT_MENU((int)Resource.MNU_CON_EDITORAS, new EventListener(OnMnuConEditoras)); EVT_MENU((int)Resource.MNU_CON_ENDERECOS, new EventListener(OnMnuConEnderecos)); EVT_MENU((int)Resource.MNU_CON_IDIOMAS, new EventListener(OnMnuConIdiomas)); EVT_MENU((int)Resource.MNU_CON_PAISES, new EventListener(OnMnuConPaises)); EVT_MENU((int)Resource.MNU_CON_PROFISSOES, new EventListener(OnMnuConProfissoes)); EVT_MENU((int)Resource.MNU_CON_CLIENTES, new EventListener(OnMnuConClientes)); EVT_MENU((int)Resource.MNU_CON_LIVROS, new EventListener(OnMnuConLivros)); EVT_MENU((int)Resource.MNU_VEN_VENDERLIVROS, new EventListener(OnMnuVenderLivros)); EVT_MENU((int)Resource.MNU_VEN_VENDASREALIZADAS, new EventListener(OnMnuVendasRealizadas)); EVT_MENU((int)Resource.MNU_OP_ALTERARSENHA, new EventListener(OnMnuAlterarSenha)); EVT_MENU((int)Resource.MNU_OP_SOBRE, new EventListener(OnMnuSobre)); EVT_MENU((int)Resource.MNU_OP_SAIR, new EventListener(OnClose)); EVT_CLOSE(new EventListener(OnClose)); }