Commit a95c6f04b1462a169043d986988290ebbf9fd1db

Authored by Schwirg László
1 parent 41698df2

v1.10.1

- hiba javítása és az interaktív argument paraméter érték megvalósítása
Vrh.Log4Pro.MaintenanceConsole/Manager - MaintenanceToolManager.cs
... ... @@ -63,7 +63,7 @@ namespace Vrh.Log4Pro.MaintenanceConsole.MaintenanceToolManagerNS
63 63 ExternalProcess.StartInfo.FileName = config.Exe;
64 64 ExternalProcess.StartInfo.WindowStyle = config.ProcessWindowsStyle;
65 65  
66   - ExternalProcess.StartInfo.Arguments = config.Arguments;
  66 + ExternalProcess.StartInfo.Arguments = config.ResolveArguments();
67 67 ExternalProcess.Start();
68 68 int waitingtime = config.WaitForExit ? -1 : 0;
69 69 ExternalProcess.WaitForExit(waitingtime);
... ... @@ -389,7 +389,7 @@ namespace Vrh.Log4Pro.MaintenanceConsole.MaintenanceToolManagerNS
389 389  
390 390 Key = VRH.Common.StringConstructor.ResolveConstructorR(ArgumentParametersDictionary, GetValue(nameof(XmlStructure.ExternalUtility.Attributes.Key), x, ""), "{}@@");
391 391 Description = VRH.Common.StringConstructor.ResolveConstructorR(ArgumentParametersDictionary, GetValue(nameof(XmlStructure.ExternalUtility.Attributes.Description), x, Exe), "{}@@");
392   - Arguments = VRH.Common.StringConstructor.ResolveConstructorR(ArgumentParametersDictionary, GetValue(nameof(XmlStructure.ExternalUtility.Attributes.Arguments), x, XmlStructure.ExternalUtility.Attributes.Arguments.Values.DEFAULT), "{}@@");
  392 + Arguments = GetValue(nameof(XmlStructure.ExternalUtility.Attributes.Arguments), x, XmlStructure.ExternalUtility.Attributes.Arguments.Values.DEFAULT);
393 393  
394 394 Exe = GetValue(nameof(XmlStructure.ExternalUtility.Attributes.Exe), x, "");
395 395 ProcessWindowsStyle = GetValue<ProcessWindowStyle>(nameof(XmlStructure.ExternalUtility.Attributes.WindowStyle), x, XmlStructure.ExternalUtility.Attributes.WindowStyle.Values.DEFAULT);
... ... @@ -418,6 +418,24 @@ namespace Vrh.Log4Pro.MaintenanceConsole.MaintenanceToolManagerNS
418 418 }
419 419 catch { return new KeyValuePair<string, string>(kvpk, null); }
420 420 }
  421 + public string ResolveArguments()
  422 + {
  423 + var resolveddictionary = new Dictionary<string, string>();
  424 + foreach (var kvp in ArgumentParametersDictionary)
  425 + {
  426 + if (!kvp.Value.StartsWith("?")) { resolveddictionary.Add(kvp.Key, kvp.Value); }
  427 + else
  428 + {
  429 + string prompt;
  430 + if (kvp.Value.Length == 1) { prompt = $"Enter value for {kvp.Key}:"; }
  431 + else { prompt = kvp.Value.Substring(1); }
  432 + string value = ColorConsole.ReadLine(prompt, ConsoleColor.Yellow);
  433 + if (value.ToLower() == "ex") { Valid = false; return null; }
  434 + resolveddictionary.Add(kvp.Key, value);
  435 + }
  436 + }
  437 + return VRH.Common.StringConstructor.ResolveConstructorR(resolveddictionary, Arguments, "{}@@");
  438 + }
421 439 }
422 440 public XElement RegexpTesterConfig;
423 441 public XElement PingerConfigXml;
... ...
Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs
... ... @@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
32 32 // You can specify all the values or you can default the Build and Revision Numbers
33 33 // by using the '*' as shown below:
34 34 // [assembly: AssemblyVersion("1.0.*")]
35   -[assembly: AssemblyVersion("1.10.0.0")]
36   -[assembly: AssemblyFileVersion("1.10.0.0")]
  35 +[assembly: AssemblyVersion("1.10.1.0")]
  36 +[assembly: AssemblyFileVersion("1.10.1.0")]
... ...