public bool GenerateNew() { try { string appPath = System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().Location); Assembly uiAssembly = Assembly.LoadFrom(appPath + @"\gView.Interoperability.AGS.UI.dll"); IModalDialog dlg = uiAssembly.CreateInstance("gView.Interoperability.AGS.UI.FormSelectService") as IModalDialog; if (dlg is IConnectionString) { if (dlg.OpenModal()) { string connectionString = ((IConnectionString)dlg).ConnectionString; _dataset = new AGSDataset(); _dataset.ConnectionString = connectionString; return(true); } } } catch { } return(false); }
public AGSClass(AGSDataset dataset) { _dataset = dataset; if (_dataset != null) { _name = _dataset._name; } }
public void Load(gView.Framework.IO.IPersistStream stream) { _dataset = null; string connectionString = (string)stream.Load("ConnectionString", String.Empty); if (connectionString != String.Empty) { _dataset = new AGSDataset(); _dataset.ConnectionString = connectionString; } }
public AGSThemeFeatureClass(AGSDataset dataset, MapLayerInfo layerInfo, geometryType geomType) { if (dataset is IFeatureDataset) { _envelope = ((IFeatureDataset)dataset).Envelope; _sRef = ((IFeatureDataset)dataset).SpatialReference; } _dataset = dataset; _name = layerInfo.Name; _id = layerInfo.LayerID.ToString(); _geomType = geomType; #region Fields foreach (Proxy.Field fieldInfo in layerInfo.Fields.FieldArray) { gView.Framework.Data.Field field = new gView.Framework.Data.Field(fieldInfo.Name); switch (fieldInfo.Type) { case esriFieldType.esriFieldTypeBlob: field.type = FieldType.binary; break; case esriFieldType.esriFieldTypeDate: field.type = FieldType.Date; break; case esriFieldType.esriFieldTypeDouble: field.type = FieldType.Double; break; case esriFieldType.esriFieldTypeGeometry: _shapeFieldName = field.name; field.type = FieldType.Shape; break; case esriFieldType.esriFieldTypeGlobalID: field.type = FieldType.unknown; break; case esriFieldType.esriFieldTypeGUID: field.type = FieldType.guid; break; case esriFieldType.esriFieldTypeInteger: field.type = FieldType.integer; break; case esriFieldType.esriFieldTypeOID: _idFieldName = field.name; field.type = FieldType.ID; break; case esriFieldType.esriFieldTypeRaster: field.type = FieldType.binary; break; case esriFieldType.esriFieldTypeSingle: field.type = FieldType.Float; break; case esriFieldType.esriFieldTypeSmallInteger: field.type = FieldType.smallinteger; break; case esriFieldType.esriFieldTypeString: case esriFieldType.esriFieldTypeXML: field.type = FieldType.String; break; } _fields.Add(field); } #endregion }