public SendErrMail(string string_2, string string_3, string string_4, string string_5, string string_6) { this.fwsk_ErrInfo_0 = new Fwsk_ErrInfo(); this.string_0 = string.Empty; this.form0_0 = new Form0(); this.string_1 = string.Empty; this.ilog_0 = LogUtil.GetLogger <SendErrMail>(); try { this.InitializeComponent_1(); this.method_1(string_2, string_3, string_4, string_5, string_6); this.method_3(); int width = Screen.PrimaryScreen.Bounds.Width; int height = Screen.PrimaryScreen.Bounds.Height; Bitmap image = new Bitmap(width, height); using (Graphics graphics = Graphics.FromImage(image)) { graphics.CopyFromScreen(0, 0, 0, 0, Screen.AllScreens[0].Bounds.Size); graphics.Dispose(); string filename = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "fwkp_capture.jpeg"); image.Save(filename, ImageFormat.Jpeg); } this.btnSendEmail.Focus(); } catch (BaseException exception) { this.ilog_0.Error(exception.Message); ExceptionHandler.HandleError(exception); } catch (Exception exception2) { this.ilog_0.Error(exception2.Message); ExceptionHandler.HandleError(exception2); } }
private void BtnPronto_Click(object sender, EventArgs e) { if (txtSabedoria.Text == "Sabedoria" || txtResistencia.Text == "Resistencia" || txtNome.Text == "" || txtLabia.Text == "Lábia" || txtInteligencia.Text == "Inteligência" || txtForca.Text == "Força" || txtAgilidade.Text == "Agilidade") { MessageBox.Show("Preencha Tudo!", "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { Form0 destino = new Form0(txtSabedoria.Text, txtForca.Text, txtAgilidade.Text, txtInteligencia.Text, txtLabia.Text, txtResistencia.Text, txtClasse.Text); this.Hide(); destino.Show(); } }
private void OpenForm <Forms>() where Forms : Form, new() { Form Form0 = Panel1.Controls.OfType <Forms>().FirstOrDefault(); if (Form0 == null) { Form0 = new Forms { TopLevel = false, FormBorderStyle = FormBorderStyle.None, Dock = DockStyle.Fill }; Panel1.Controls.Add(Form0); Panel1.Tag = Form0; try { Form0.Show(); } catch (Exception) { Form0.Show(); } Form0.BringToFront(); } else { Form0.BringToFront(); if (Form0.WindowState == FormWindowState.Minimized) { Form0.WindowState = FormWindowState.Normal; } } }