This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

- Switched default UI locale to de-DE, to allow testing localized mes…

…sageboxes

- Added extra tests for different icons

svn path=/trunk/winforms/; revision=40574
  • Loading branch information...
Peter Dennis Bartok
Peter Dennis Bartok committed Feb 13, 2005
1 parent a242f28 commit 87bc1ae52e9e06d49def6f623c7fa9e8c881f2f9
Showing with 43 additions and 28 deletions.
  1. +43 −28 messagebox/swf-messagebox.cs
@@ -1,6 +1,8 @@
using System;
-using System.Windows.Forms;
using System.Drawing;
+using System.Globalization;
+using System.Windows.Forms;
+using System.Threading;
namespace MyFormProject
{
@@ -48,38 +50,51 @@ private void InitializeComponent()
[STAThread]
static void Main()
{
+ Thread.CurrentThread.CurrentUICulture = new CultureInfo( "de-DE", false );
Application.Run(new MainForm());
- }
-
- private void button1_Click(object sender, EventArgs e) {
- DialogResult result;
-
- switch (count) {
- case 0: {
- result = MessageBox.Show("Please click a button and verify that the proper result is reported in the main window.", "MessageBox Test", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
+ }
+
+ private void button1_Click(object sender, EventArgs e) {
+ DialogResult result;
+
+ switch (count) {
+ case 0: {
+ result = MessageBox.Show("Please click a button and verify that the proper result is reported in the main window.", "MessageBox Test", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.button1.Text = "Last result was " + result + "\nClick to get OK/Cancel MessageBox";
break;
- }
-
- case 1: {
- result = MessageBox.Show("Please click a button and verify that the proper result is reported in the main window.", "MessageBox Test", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation);
+ }
+
+ case 1: {
+ result = MessageBox.Show("Please click a button and verify that the proper result is reported in the main window.", "MessageBox Test", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
this.button1.Text = "Last result was " + result + "\nClick me for Yes/No MessageBox";
break;
- }
-
- case 2: {
- result = MessageBox.Show("Please click a button and verify that the proper result is reported in the main window.", "MessageBox Test", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);
+ }
+
+ case 2: {
+ result = MessageBox.Show("Please click a button and verify that the proper result is reported in the main window.", "MessageBox Test", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk);
+ this.button1.Text = "Last result was " + result + "\nClick to exit the test application";
+ break;
+ }
+
+ case 3: {
+ result = MessageBox.Show("Please click a button and verify that the proper result is reported in the main window.", "MessageBox Test", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Warning);
this.button1.Text = "Last result was " + result + "\nClick to exit the test application";
- break;
- }
-
- case 3: {
- Application.Exit();
- break;
- }
- }
-
- count++;
- }
+ break;
+ }
+
+ case 4: {
+ result = MessageBox.Show("Please click a button and verify that the proper result is reported in the main window.", "MessageBox Test", MessageBoxButtons.AbortRetryIgnore);
+ this.button1.Text = "Last result was " + result + "\nClick to exit the test application";
+ break;
+ }
+
+ case 5: {
+ Application.Exit();
+ break;
+ }
+ }
+
+ count++;
+ }
}
}

0 comments on commit 87bc1ae

Please sign in to comment.