/// <summary> /// Parses the app.config into an IImageConfiguration object. /// </summary> private void ParseAppConfigFile() { try { ConfigurationParser parser = ConfigurationParser.GetParse(); _configuration = parser.Configuration; } catch (Exception e) { _eventLog.WriteEntry(e.Message, EventLogEntryType.Error); } }
/// <summary> /// The c'tor for a ConfigParser /// </summary> public ConfigurationParser() { string handlerName = ConfigurationManager.AppSettings["Handler"]; Configuration = new ImageConfiguration { // Configure according to the following settings in AppConfig: Handlers = handlerName.Split(';'), LogName = ConfigurationManager.AppSettings["LogName"], SourceName = ConfigurationManager.AppSettings["SourceName"], OutputDir = ConfigurationManager.AppSettings["OutputDir"], ThumbnailSize = int.Parse(ConfigurationManager.AppSettings["ThumbnailSize"]) }; }
/// <summary> /// Returns the current appconfig parameters. /// </summary> /// <returns>CommandRecievedEventArgs object</returns> public CommandRecievedEventArgs GetCurrentConfig() { ConfigurationParser parser = ConfigurationParser.GetParse(); IImageConfiguration config = parser.Configuration; string[] configArray = new string[5]; configArray[0] = config.OutputDir; configArray[1] = config.SourceName; configArray[2] = config.LogName; configArray[3] = config.ThumbnailSize.ToString(); configArray[4] = GetHandlersString(); CommandRecievedEventArgs configArgs = new CommandRecievedEventArgs((int)CommandEnum.GetConfigCommand, configArray, ""); return(configArgs); }
public ShadeColorsConfiguration(IImageConfiguration parent) { _parent = parent; }
public RemapPixelsConfiguration(IImageConfiguration parent) { _parent = parent; }
public PadSizeConfiguration(IImageConfiguration parent) { _parent = parent; }
public FileOperationService() { Configuration = ConfigurationSettings.GetConfig("image") as ImageConfiguration; _fileOperations = new FileOperations(); }