コード例 #1
0
        //--------------------------------------------------------------------------
        //
        //	Methods
        //
        //--------------------------------------------------------------------------

        #region Initialize
        /// <summary>
        /// monitor the log file for changes, set up the initial read
        /// </summary>
        /// <param name="filePath"></param>
        /// <param name="siteFileWatcherService"></param>
        public void Initialize(string logDirectory, ISiteFileWatcherService siteFileWatcherService, ITheme theme)
        {
            _logDirectory = new DirectoryInfo(logDirectory);
            _siteFileWatcherService = siteFileWatcherService;
                                    
            _siteFileWatcherService.RegisterForSiteNotifications(WatcherChangeTypes.Created | WatcherChangeTypes.Changed, new FileSystemEventHandler(FileSystemEvent), null);

            //outy.Foreground = theme.DefaultFormat.ForeColor;
            //outy.Background = theme.DefaultFormat.BackColor;
        }
コード例 #2
0
        //--------------------------------------------------------------------------
        //
        //	Methods
        //
        //--------------------------------------------------------------------------

        #region Initialize
        /// <summary>
        /// monitor the log file for changes, set up the initial read
        /// </summary>
        /// <param name="filePath"></param>
        /// <param name="siteFileWatcherService"></param>
        public void Initialize(string logDirectory, ISiteFileWatcherService siteFileWatcherService, ITheme theme)
        {
            _logDirectory           = new DirectoryInfo(logDirectory);
            _siteFileWatcherService = siteFileWatcherService;

            _siteFileWatcherService.RegisterForSiteNotifications(WatcherChangeTypes.Created | WatcherChangeTypes.Changed, new FileSystemEventHandler(FileSystemEvent), null);

            //outy.Foreground = theme.DefaultFormat.ForeColor;
            //outy.Background = theme.DefaultFormat.BackColor;
        }
コード例 #3
0
        /// <summary>
        /// monitor the log file for changes, set up the initial read
        /// </summary>
        /// <param name="filePath"></param>
        /// <param name="siteFileWatcherService"></param>
        public void Initialize(string filePath, ISiteFileWatcherService siteFileWatcherService, ITheme theme)
        {
            _filePath = Path.GetFullPath(filePath);
            _siteFileWatcherService = siteFileWatcherService;

            if (File.Exists(_filePath))
                this.PerformInitialRead();

            _siteFileWatcherService.RegisterForSiteNotifications(WatcherChangeTypes.All, new FileSystemEventHandler(FileSystemEvent), null);

            outy.Foreground = theme.DefaultFormat.ForeColor;
            outy.Background = theme.DefaultFormat.BackColor;
        }