/// <summary>
        /// Initializes a new instance of the <see cref="BaseController" /> class.
        /// </summary>
        /// <param name="visualStudioService">The visual studio service.</param>
        /// <param name="settingsService">The settings service.</param>
        /// <param name="messageBoxService">The message box service.</param>
        /// <param name="resolverService">The resolver service.</param>
        /// <param name="readMeService">The read me service.</param>
        protected BaseController(
            IVisualStudioService visualStudioService,
            ISettingsService settingsService,
            IMessageBoxService messageBoxService,
            IResolverService resolverService,
            IReadMeService readMeService)
        {
            //// init the tracing service first!
            TraceService.Initialize(
                settingsService.LogToTrace,
                false, //// log to console.
                settingsService.LogToFile,
                settingsService.ExtendedLogging,
                settingsService.LogFilePath,
                settingsService.DisplayErrors,
                settingsService.ErrorFilePath);

            TraceService.WriteLine("BaseController::Constructor");

            this.VisualStudioService = visualStudioService;
            this.SettingsService     = settingsService;
            this.MessageBoxService   = messageBoxService;
            this.ResolverService     = resolverService;
            this.ReadMeService       = readMeService;
        }
        /// <summary>
        /// Shows the options.
        /// </summary>
        public void ShowOptions()
        {
            TraceService.WriteLine("ApplicationController::ShowOptions");

            OptionsView view = new OptionsView();

            ResourceDictionary resourceDictionary = this.GetLanguageDictionary();

            OptionsViewModel viewModel = this.ResolverService.Resolve <OptionsViewModel>();

            viewModel.LanguageDictionary = resourceDictionary;

            view.DataContext = viewModel;

            view.ShowDialog();

            //// in case any of the setting have changed to do with logging reset them!
            TraceService.Initialize(
                this.SettingsService.LogToTrace,
                false,  //// log to console.
                this.SettingsService.LogToFile,
                this.SettingsService.ExtendedLogging,
                this.SettingsService.LogFilePath,
                this.SettingsService.DisplayErrors,
                this.SettingsService.ErrorFilePath);
        }
示例#3
0
        /// <summary>
        /// Shows the options.
        /// </summary>
        public void ShowOptions()
        {
            OptionsForm form = new OptionsForm(this.SettingsService.DisplayLogo);

            form.ShowDialog();

            //// in case any of the setting have changed to do with logging reset them!
            TraceService.Initialize(
                this.SettingsService.LogToTrace,
                this.SettingsService.LogToFile,
                this.SettingsService.LogFilePath,
                this.SettingsService.DisplayErrors);
        }
示例#4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ZipperService" /> class.
        /// </summary>
        /// <param name="fileSystem">The file system.</param>
        public ZipperService(IFileSystem fileSystem)
        {
            //// init the tracing service first!
            TraceService.Initialize(
                false,
                true, //// log to console.
                false,
                false,
                string.Empty,
                false,
                string.Empty);

            TraceService.WriteLine("ZipperService::Constructor");

            this.fileSystem = fileSystem;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="BaseController" /> class.
        /// </summary>
        /// <param name="visualStudioService">The visual studio service.</param>
        /// <param name="readMeService">The read me service.</param>
        /// <param name="settingsService">The settings service.</param>
        protected BaseController(
            IVisualStudioService visualStudioService,
            IReadMeService readMeService,
            ISettingsService settingsService)
        {
            //// init the tracing service first!
            TraceService.Initialize(
                settingsService.LogToTrace,
                settingsService.LogToFile,
                settingsService.LogFilePath,
                settingsService.DisplayErrors);

            TraceService.WriteLine("BaseController::Constructor");

            this.VisualStudioService = visualStudioService;
            this.ReadMeService       = readMeService;
            this.SettingsService     = settingsService;
        }