Example #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.");
            }
        }
Example #2
0
 internal NdapiObjectLibraryObjectList(ObjectLibrary objectLibrary)
 {
     _objectLibrary = objectLibrary;
     _count         = _objectLibrary.GetNumberProperty(NdapiConstants.D2FP_OBJ_COUNT);
 }
Example #3
0
 /// <summary>
 /// Creates an object library tab..
 /// </summary>
 /// <param name="library">Object library.</param>
 /// <param name="name">Tab name.</param>
 public ObjectLibraryTab(ObjectLibrary library, string name) : base(name, ObjectType.ObjectLibraryTab, library)
 {
     ObjectLibrary = library;
 }