Exemplo n.º 1
0
 private void ValidatePlayers()
 {
     PlayerValidator v = new PlayerValidator(mTool.GetKey(listAttributesToolStripMenuItem.Checked, listApperanceToolStripMenuItem.Checked));
     v.ValidatePlayers(mTextBox.Text);
     List<String> warnings = v.GetWarnings();
     if (warnings.Count > 0)
     {
         StringBuilder builder = new StringBuilder();
         foreach (string w in warnings)
         {
             builder.Append(w);
             builder.Append("\n");
         }
         MessageForm ef = new MessageForm(SystemIcons.Warning);
         ef.TextClicked += new EventHandler(validatorForm_TextClicked);
         ef.ShowCancelButton = false;
         ef.MessageText = builder.ToString();
         ef.Text = "Warning, verify player attributes";
         ef.Closed += new EventHandler(validatorForm_Closed);
         ef.Show(this);
     }
     else
     {
         MessageBox.Show("No Issues Found", "Player Validation", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }