Beispiel #1
0
        public static void LoadShapeFromResource(C1VectorLayer vl, string resname, string dbfname, bool clear, ProcessShapeItem pv)
        {
            using (Stream shapeStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resname))
            {
            using (Stream dbfStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(dbfname))
            {
                if (shapeStream != null)
                {
                    if (clear)
                        vl.Children.Clear();

                    vl.LoadShape(shapeStream, dbfStream, true, pv);
                }
            }
            }
        }
Beispiel #2
0
        public static void LoadShapeFromResource(C1VectorLayer vl, string resname, string dbfname, Location location, bool clear, ProcessShapeItem pv)
        {
            using (Stream shapeStream = typeof(Utils).GetTypeInfo().Assembly.GetManifestResourceStream(resname))
            {
                using (Stream dbfStream = typeof(Utils).GetTypeInfo().Assembly.GetManifestResourceStream(dbfname))
                {
                    if (shapeStream != null)
                    {
                        if (clear)
                        {
                            vl.Children.Clear();
                        }

                        vl.LoadShape(shapeStream, dbfStream, location, true, pv);
                    }
                }
            }
        }