Esempio n. 1
0
 /// <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);
     }
 }
Esempio n. 2
0
        /// <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"])
            };
        }
Esempio n. 3
0
        /// <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);
        }
Esempio n. 4
0
 public ShadeColorsConfiguration(IImageConfiguration parent)
 {
     _parent = parent;
 }
Esempio n. 5
0
 public RemapPixelsConfiguration(IImageConfiguration parent)
 {
     _parent = parent;
 }
Esempio n. 6
0
 public PadSizeConfiguration(IImageConfiguration parent)
 {
     _parent = parent;
 }
 public FileOperationService()
 {
     Configuration = ConfigurationSettings.GetConfig("image") as ImageConfiguration;
     _fileOperations = new FileOperations();
 }