mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
Code quality changes [skip ci]
This commit is contained in:
parent
61cfe004c5
commit
798ca503a5
108 changed files with 1981 additions and 2258 deletions
|
@ -47,7 +47,7 @@ namespace ExternalCommand {
|
|||
textBox_name.Text = commando;
|
||||
textBox_commandline.Text = config.commandlines[commando];
|
||||
textBox_arguments.Text = config.arguments[commando];
|
||||
_commandIndex = config.commands.FindIndex(delegate(string s) { return s == commando; });
|
||||
_commandIndex = config.Commands.FindIndex(delegate(string s) { return s == commando; });
|
||||
} else {
|
||||
textBox_arguments.Text = "\"{0}\"";
|
||||
}
|
||||
|
@ -59,13 +59,13 @@ namespace ExternalCommand {
|
|||
string commandLine = textBox_commandline.Text;
|
||||
string arguments = textBox_arguments.Text;
|
||||
if(_commando != null) {
|
||||
config.commands[_commandIndex] = commandName;
|
||||
config.Commands[_commandIndex] = commandName;
|
||||
config.commandlines.Remove(_commando);
|
||||
config.commandlines.Add(commandName, commandLine);
|
||||
config.arguments.Remove(_commando);
|
||||
config.arguments.Add(commandName, arguments);
|
||||
} else {
|
||||
config.commands.Add(commandName);
|
||||
config.Commands.Add(commandName);
|
||||
config.commandlines.Add(commandName, commandLine);
|
||||
config.arguments.Add(commandName, arguments);
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ namespace ExternalCommand {
|
|||
buttonOk.Enabled = false;
|
||||
}
|
||||
// Check if commandname is unique
|
||||
if(_commando == null && !string.IsNullOrEmpty(textBox_name.Text) && config.commands.Contains(textBox_name.Text)) {
|
||||
if(_commando == null && !string.IsNullOrEmpty(textBox_name.Text) && config.Commands.Contains(textBox_name.Text)) {
|
||||
buttonOk.Enabled = false;
|
||||
textBox_name.BackColor = Color.Red;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue