Ejemplo n.º 1
0
        async public Task <bool> DeleteFeatureClass(string fcName)
        {
            string filename = _directoryName + @"/" + fcName + ".gml";

            FileInfo fi = new FileInfo(filename);

            if (fi.Exists)
            {
                GMLFile file = await GMLFile.Create(fi.FullName);

                return(file.Delete());
            }
            return(false);
        }
Ejemplo n.º 2
0
        async internal Task <GMLFile> GetGMLFile()
        {
            try
            {
                if (_state != DatasetState.opened)
                {
                    return(null);
                }

                FileInfo fi = new FileInfo(_connectionString);
                if (fi.Exists)
                {
                    return(await GMLFile.Create(_connectionString));
                }
                return(null);
            }
            catch
            {
                return(null);
            }
        }
Ejemplo n.º 3
0
        public int CreateFeatureClass(string dsname, string fcname, gView.Framework.Geometry.IGeometryDef geomDef, IFields fields)
        {
            if (geomDef == null || fields == null)
            {
                return(-1);
            }

            string filename = _directoryName + @"\" + fcname + ".gml";
            Fields f        = new Fields();

            foreach (IField field in fields)
            {
                f.Add(field);
            }

            if (!GMLFile.Create(filename, geomDef, f, _gmlVersion))
            {
                return(-1);
            }

            return(0);
        }