示例#1
0
文件: Boot.cs 项目: And-G/Magellan
        private static IIDConvertor[] GetConvertorInstances()
        {
            Assembly source = Assembly.GetAssembly(typeof(IIDConvertor));
            if ( source == null ) return new IIDConvertor[] { new Inferis2IDConvertor() };

            // Look for IIDConvertor classes
            ArrayList list = new ArrayList();
            IEnumerator iter = source.GetExportedTypes().GetEnumerator();
            while ( iter.MoveNext() ) {
                if ( ((Type)iter.Current).GetInterface( typeof(IIDConvertor).Name ) != null ) {
                    list.Add( System.Activator.CreateInstance(((Type)iter.Current)) );
                }
            }

            // Assign result
            IIDConvertor[] result = new IIDConvertor[list.Count];
            list.TrimToSize();
            list.CopyTo( result, 0 );
            return result;
        }
示例#2
0
文件: MapInfo.cs 项目: And-G/Magellan
        public MapInfo( int zoom, int x, int y, int width, int height, string origin, string export, IIDConvertor convertor )
        {
            this.signature = 0xE2E1;
            this.version = 1;
            this.zoom = zoom;

            this.x = x;
            this.y = y;
            this.width = width;
            this.height = height;

            // reserved buffer
            buffer = new byte[44];

            // strings
            originfile = new char[512];
            exportfile = new char[512];
            idconvertor = new char[128];

            SetString( ref originfile, origin );
            SetString( ref exportfile, export );
            IDConvertor = convertor.GetType();
        }
示例#3
0
 public IDShader( IIDConvertor idconvertor )
 {
     idc = idconvertor;
 }
示例#4
0
 public IDMapShader( IDMap idmap, bool diff )
 {
     this.idmap = idmap;
     this.diff = diff;
     this.idc = null;
 }
示例#5
0
 public IDMapShader( IDMap idmap, IIDConvertor idconvertor )
 {
     idc = idconvertor;
     this.idmap = idmap;
     this.diff = false;
 }
示例#6
0
文件: MapInfo.cs 项目: And-G/Magellan
 public MapInfo( int zoom, Point location, Size size, string origin, string export, IIDConvertor convertor )
     : this(zoom, location.X, location.Y, size.Width, size.Height, origin, export, convertor)
 {
 }