Ejemplo n.º 1
0
        public static void LoadShapeFromResource(VectorLayer vl, string resname, string dbfname, Location location, 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, location, true, pv);
                    }
                }
            }
        }