private void gridRules_CellEndEdit(object sender, DataGridViewCellEventArgs e)
        {
            gridRules.CurrentCell.ReadOnly = true;

            cellRenameUpdatedName = gridRules.CurrentCell.Value;

            Spy.Print("rule name original: '{0}'   updated: '{1}'", cellRenameOriginalName, cellRenameUpdatedName);

            // If the rename fails, then we will "roll back" the Rule name in the grid.
            if (MonkeyIO.RenameRule(cellRenameOriginalName.ToString(), cellRenameUpdatedName.ToString()) == false)
            {
                MonkeySound.PlayErrorSound();
                gridRules.CurrentCell.Value = cellRenameOriginalName;
                FireErrorMessage("An error occurred attempting to rename rule.");
            }
        }
Beispiel #2
0
 private void Button_Click_3(object sender, RoutedEventArgs e)
 {
     MonkeySound.Play();
 }