Exemple #1
0
 private void ButtonOk_Click(object sender, RoutedEventArgs e)
 {
     if (MacroName.Contains(':') || MacroName.Contains(';') || Commands.Contains(':') || Commands.Contains(';'))
     {
         MessageBox.Show("Name and Commands can't include ':' or ';'");
         return;
     }
     Ok = true;
     Close();
 }
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 11;
         hash = (hash * 37) + MacroName.GetHashCode();
         hash = (hash * 37) + MacroValue.GetHashCode();
         return(hash);
     }
 }
Exemple #3
0
 private void MacroName_Validating(object sender, CancelEventArgs e)
 {
     if (!Configurations.IsNameUnique(MacroName.Text, this))
     {
         e.Cancel = true;
         MacroName.Focus();
         errorProvider.SetError(MacroName, "Excecutable name cannot be the same as another macro");
     }
     else
     {
         e.Cancel = false;
         errorProvider.SetError(MacroName, string.Empty);
     }
 }