private void OpenForm(string nameForm) { switch (nameForm) { case "tributaçõesToolStripMenuItem": uiForm t = new uiForm(); t.ShowDialog(); break; case "investimentosToolStripMenuItem": uiInvestimento i = new uiInvestimento(); i.ShowDialog(); break; case "descontosToolStripMenuItem": uiDesconto d = new uiDesconto(); d.ShowDialog(); break; case "formataContaToolStripMenuItem": uiFormataConta f = new uiFormataConta(); f.ShowDialog(); break; case "relatorioBancoToolStripMenuItem": uiRelatorio r = new uiRelatorio(); r.ShowDialog(); break; case "stateContaToolStripMenuItem": uiStateConta s = new uiStateConta(); s.ShowDialog(); break; case "notaFiscalToolStripMenuItem": uiNotaFiscal n = new uiNotaFiscal(); n.ShowDialog(); break; case "toolStripMenuItem1": FormTeste fm = new FormTeste(); fm.ShowDialog(); break; case "toolStripFlyweight": CAPII.Flyweight.uiPiano uiPiano = new CAPII.Flyweight.uiPiano(); uiPiano.ShowDialog(); break; } }
private void buttonNewFrame_Click(object sender, EventArgs e) { LavishScriptAPI.LavishScript.Commands.AddCommand("uiFdemoExit", new LavishScriptAPI.Delegates.CommandTarget(ExitDemo)); Frame.Lock(); // Create a blank form, setting it's exit function to call ours. uiForm ui = new uiForm("uiFormsTest", "uiForms Demo", "ISCommand('uiFdemoExit')"); // Create our logo uiTexture logotex = ui.frameui.CreateTexture(ui.frame + "LogoTex"); logotex.SetTexture(@"'Interface\\PVPFrame\\Icons\\PVP-Banner-Emblem-81.blp'"); logotex.SetPoint("CENTER", ui.frameui, "CENTER"); logotex.SetVertexColor(0.4, 0.5, 0.9); // Resize the form to fit ui.height = 150; Frame.Unlock(); }