Skip to content

Commit 8175221

Browse files
author
Ron Petrusha
authored
Fixed code formatting (#773)
1 parent 99e2580 commit 8175221

File tree

2 files changed

+290
-312
lines changed
  • snippets
    • csharp/VS_Snippets_Winforms/MessageBox.Show Variations/CS
    • visualbasic/VS_Snippets_Winforms/MessageBox.Show Variations/VB

2 files changed

+290
-312
lines changed

snippets/csharp/VS_Snippets_Winforms/MessageBox.Show Variations/CS/form1.cs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -104,40 +104,27 @@ private void button1_Click(object sender, System.EventArgs e)
104104

105105
}
106106

107-
//<snippet1>
108-
107+
//<snippet1>
109108
private void validateUserEntry()
110109
{
111-
112110
// Checks the value of the text.
113-
114111
if(serverName.Text.Length == 0)
115112
{
116-
117113
// Initializes the variables to pass to the MessageBox.Show method.
118-
119114
string message = "You did not enter a server name. Cancel this operation?";
120-
string caption = "Error Detected in Input";
115+
string caption = "Error Detected in Input";
121116
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
122117
DialogResult result;
123118

124119
// Displays the MessageBox.
125-
126120
result = MessageBox.Show(message, caption, buttons);
127-
128121
if (result == System.Windows.Forms.DialogResult.Yes)
129122
{
130-
131123
// Closes the parent form.
132-
133124
this.Close();
134-
135125
}
136-
137126
}
138-
139127
}
140-
141128
//</snippet1>
142129

143130
//<snippet2>

0 commit comments

Comments
 (0)