mirror of
https://github.com/greenshot/greenshot
synced 2025-07-30 11:40:40 -07:00
Some small fixes for different parts of code.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2087 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
3411432a0e
commit
a5f900f92e
5 changed files with 79 additions and 29 deletions
|
@ -39,7 +39,10 @@ namespace ExternalCommand {
|
|||
|
||||
[IniProperty("Argument", Description="The arguments for the output command.")]
|
||||
public Dictionary<string, string> arguments;
|
||||
|
||||
|
||||
[IniProperty("RunInbackground", Description = "Should the command be started in the background.")]
|
||||
public Dictionary<string, bool> runInbackground;
|
||||
|
||||
private const string MSPAINT = "MS Paint";
|
||||
private static string paintPath;
|
||||
private static bool hasPaint = false;
|
||||
|
@ -84,11 +87,22 @@ namespace ExternalCommand {
|
|||
return commandlineDefaults;
|
||||
case "Argument":
|
||||
Dictionary<string, string> argumentDefaults = new Dictionary<string, string>();
|
||||
argumentDefaults.Add(PAINTDOTNET, "\"{0}\"");
|
||||
if (hasPaintDotNet) {
|
||||
argumentDefaults.Add(PAINTDOTNET, "\"{0}\"");
|
||||
}
|
||||
if (hasPaint) {
|
||||
argumentDefaults.Add(MSPAINT, "\"{0}\"");
|
||||
}
|
||||
return argumentDefaults;
|
||||
return argumentDefaults;
|
||||
case "RunInBackground":
|
||||
Dictionary<string, bool> runInBackground = new Dictionary<string, bool>();
|
||||
if (hasPaintDotNet) {
|
||||
runInBackground.Add(PAINTDOTNET, true);
|
||||
}
|
||||
if (hasPaint) {
|
||||
runInBackground.Add(MSPAINT, true);
|
||||
}
|
||||
return runInBackground;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue