Exemplo n.º 1
0
        /// <summary>
        /// Opens the log file using the current values of various properties.  Raises the Opening and Opened events.
        /// </summary>
        public override bool Open()
        {
            bool result = base.Open();

            if (result)
            {
                if (AddToListOfRecentlyCreatedFiles)
                {
                    // Update the list of recently created files in a worker thread, but don't use a
                    // ThreadPool thread because they are background threads, and some apps
                    // terminate so quickly that a background thread won't finish before being
                    // killed.

                    Thread thread = new Thread(() => RecentlyCreated.AddToRecentlyCreated(FullPath));
                    thread.IsBackground = false;
                    thread.Start();
                }
            }

            return(result);
        }