public void Sortear(UserControlProd prod) { using (FormNumSorteio formNumSorteio = new FormNumSorteio(prod, infoSort)) { formNumSorteio.ShowDialog(this); } }
private void button1_Click(object sender, EventArgs e) { if (infoS == null) { formatBotao(); FormConcorrente conc = this.Parent.Parent.Parent.Parent as FormConcorrente; if (conc != null) { conc.ContarVerde(); } } else { if (button1.BackColor == Color.Blue) { formatBotao(); FormNumSorteio frm = (FormNumSorteio)this.Parent.Parent; frm.RevelarNum(); } else if (button1.BackColor == Color.GreenYellow || button1.BackColor == Color.Gray) { //FormMessage.ShowMessegeWarning("PrĂªmio: " + infoS.Prod.produtodescricao + "Ganhador: " + infoS.Bilhete.bilheteidconcorrente.concorrentenome); using (FormPremio p = new FormPremio(infoS)) { p.ShowDialog(this); } button1.BackColor = Color.Gray; } } Botao = button1; }
private void buttonSortear_Click(object sender, EventArgs e) { //using (FormNumSorteio formNumSorteio = new FormNumSorteio(infoSort, colItem, colBilhete)) //{ // formNumSorteio.MdiParent = this.MdiParent; // formNumSorteio.Show(); //} this.Visible = false; FormNumSorteio formNumSorteio = new FormNumSorteio(infoSort, colItem, colBilhete); formNumSorteio.MdiParent = this.MdiParent; formNumSorteio.Show(); this.Close(); }