Пример #1
0
        /// <summary>
        /// Writes the text strings into an easily editable text file and handles caching.
        /// </summary>
        /// <returns>A value indicating whether the file was successfully exported.</returns>
        public bool Export()
        {
            if (!this.ExportText())
            {
                return(false);
            }

            this.timestamp = StreamHelper.GetTimestamp(this.TextFileName);
            if (!this.isModified)
            {
                this.game.SetTimestamp(this.fileName, this.timestamp);
            }

            return(true);
        }
Пример #2
0
        /// <summary>
        /// Reads in the replacement text strings from the text file and handles caching.
        /// </summary>
        /// <returns>A value indicating whether the file was successfully imported.</returns>
        public bool Import()
        {
            long newTimestamp = StreamHelper.GetTimestamp(this.TextFileName);

            if (newTimestamp == this.timestamp)
            {
                return(false);
            }

            if (!this.ImportText())
            {
                return(false);
            }

            this.timestamp  = newTimestamp;
            this.isModified = true;
            return(true);
        }