public bool Execute(string[] args, string results) { ConfigFileData data = JsonConvertor.ConvertToConfigFileData(results); model.InputDirs = data.InputDirs; model.LogName = data.LogName; model.OutputDir = data.OutputDir; model.SourceDir = data.SourceDir; model.ThumnailSize = data.ThumnailSize; return(true); }
/// <summary> /// executes the command /// <param name= args> command's args </param> /// <param name= results> a string containing the necessary info /// from the appconfig</param> /// <return> true if successful, false for exception /// </summary> public bool Execute(string[] args, string results) { try { //gets the appsettings in order to update the values of the gui view ConfigFileData settings = JsonConvertor.ConvertToConfigFileData(results); this.model.OutputDirectory = settings.OutputDir; this.model.ServiceLogName = settings.LogName; this.model.ServiceSourceName = settings.SourceDir; this.model.ThumbSize = settings.ThumnailSize.ToString(); foreach (string handler in settings.InputDirs) { this.model.DirectoriesCollection.Add(handler); } return(true); } catch (Exception e) { return(false); } }