コード例 #1
0
        /// <summary>
        /// Load the module into memory.
        /// </summary>
        /// <param name="filename">Module location (.fmb, .olb, .mmb or .pll file)</param>
        /// <returns>Loaded module reference.</returns>
        public static NdapiModule Open(string filename)
        {
            var extension = Path.GetExtension(filename).ToUpperInvariant();

            switch (extension)
            {
            case ".FMB":
                return(FormModule.Open(filename));

            case ".OLB":
                return(ObjectLibrary.Open(filename));

            case ".MMB":
                return(MenuModule.Open(filename));

            case ".PLL":
                return(LibraryModule.Open(filename));

            default:
                throw new NdapiException($"The file {filename} does not have a valid extension.");
            }
        }
コード例 #2
0
 /// <summary>
 /// Creates a property class.
 /// </summary>
 /// <param name="library">Property class owner.</param>
 /// <param name="name">Property class name.</param>
 public PropertyClass(LibraryModule library, string name) : base(name, ObjectType.PropertyClass, library)
 {
 }