
        #region Static Helper Methods

        /// <summary>
        /// reads text file from ressource
        /// </summary>
        /// <param name="fileName">relative ressource path</param>
        /// <returns>ressource string</returns>
        protected internal static string ReadResourceFile(string fileName)
        {
            Assembly assembly = typeof(Addin).Assembly;
            System.IO.Stream ressourceStream = assembly.GetManifestResourceStream(assembly.GetName().Name + "." + fileName);
            if (ressourceStream == null)
                throw (new System.IO.IOException("Error accessing resource Stream."));

            System.IO.StreamReader textStreamReader = new System.IO.StreamReader(ressourceStream);
            if (textStreamReader == null)
                throw (new System.IO.IOException("Error accessing resource File."));

            string text = textStreamReader.ReadToEnd();
			textStreamReader.Close();
            ressourceStream.Close();
            textStreamReader.Dispose();            
            ressourceStream.Dispose();

            return text;
        }

        #endregion