Load() public method

Loads abbreviations from the specified file. If filename is null, loads from the default file. Parses the XML file and populates the sorted list
public Load ( String abbreviationsFile = null ) : bool
abbreviationsFile String name of the abbreviations file
return bool
Esempio n. 1
0
        /// <summary>
        /// Loads abbreviations from the abbreviations file
        /// </summary>
        /// <returns></returns>
        public bool Init(String abbreviationsFile = null)
        {
            if (Abbreviations != null)
            {
                Abbreviations.Dispose();
            }

            Abbreviations = new Abbreviations();

            return(Abbreviations.Load(abbreviationsFile));
        }
Esempio n. 2
0
File: Context.cs Progetto: glwu/acat
        /// <summary>
        /// Creates the singleton instance of the Abbreviations manager
        /// </summary>
        /// <returns>true on success</returns>
        private static bool createAbbreviationsManager()
        {
            bool retVal = true;

            if (isEnabled(StartupFlags.Abbreviations))
            {
                AppAbbreviations = new Abbreviations();
                retVal = AppAbbreviations.Load();

                if (!retVal)
                {
                    setCompletionStatus("Abbreviations load error.  Abbreviations will be disabled", false);
                }
            }

            return retVal;
        }