SECI  1
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
Generic_PopUp.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 using System.ComponentModel;
4 using System.Data;
5 using System.Drawing;
6 using System.Text;
7 using System.Windows.Forms;
8 
9 namespace SeciControls
10 {
11  public partial class Generic_PopUp : Form
12  {
13  public Generic_PopUp(String Title, String message)
14  {
16 
17  this.Text = "SECI - " + Title;
18  this.txtMessage.Text = message;
19 
20  }
21 
22  public Generic_PopUp(String Title, String message, String yestext, String notext)
23  {
25 
26  this.Text = Title;
27  this.txtMessage.Text = message;
28 
29  this.button1.Text = yestext;
30  this.button1.Visible = true;
31 
32  this.button2.Text = notext;
33  this.button2.Visible = true;
34 
35  this.btnOK.Visible = false;
36 
37 
38  }
39 
40  private void Generic_PopUp_Load(object sender, EventArgs e)
41  {
42 
43  }
44 
45  private void btnOK_Click(object sender, EventArgs e)
46  {
47  Close();
48  }
49 
50  //button1 is a positive answer (ie. yes)
51  private void button1_Click(object sender, EventArgs e)
52  {
53  DialogResult = DialogResult.Yes;
54  Close();
55  }
56 
57  //button2 is a negative answer (ie. no)
58  private void button2_Click(object sender, EventArgs e)
59  {
60  DialogResult = DialogResult.No;
61  Close();
62  }
63  }
64 }
void Generic_PopUp_Load(object sender, EventArgs e)
Generic_PopUp(String Title, String message, String yestext, String notext)
void button2_Click(object sender, EventArgs e)
void InitializeComponent()
Required method for Designer support - do not modify the contents of this method with the code editor...
void btnOK_Click(object sender, EventArgs e)
Generic_PopUp(String Title, String message)
void button1_Click(object sender, EventArgs e)