/// <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)); }
/// <summary> /// Disposer. Release resources and cleanup. /// </summary> /// <param name="disposing">true to dispose managed resources</param> protected virtual void Dispose(bool disposing) { // Check to see if Dispose has already been called. if (!_disposed) { Log.Debug(); if (disposing) { Context.EvtCultureChanged -= Context_EvtCultureChanged; if (Abbreviations != null) { Abbreviations.Dispose(); Abbreviations = null; } } // Release unmanaged resources. } _disposed = true; }
/// <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; }