public MSCFeatureClass GetFeatureClass(MSCDataset ds) { if (this.IsFeatureService) { MSCFeatureService result = null; if (ds.FeatureServices.TryGetValue(this.fcName, out result)) { return(result); } return(null); } else if (this.ParentTag == null) { MSCFeatureClass result2 = null; if (ds.FeatureClasses.TryGetValue(this.fcName, out result2)) { return(result2); } return(null); } else { if (this.ParentTag != null) { return(this.GetFeatureClass(ds, this.ParentTag)); } return(null); } }
public ServicePropertyEditor(MSCFeatureService fs) { this.mscFeatureService = fs; AGSFeatureService parentService = fs.ParentService; if (parentService == null) { throw new Exception("Service not connected"); } this.InitializeComponent(); if (parentService == null) { return; } this.localFeatureService = (AGSFeatureService)Utility.CloneObject(parentService); this.localFeatureService.ExportOptions = (AGSExportOptions)Utility.CloneObject(fs.ExportOptions); this.localFeatureService.ExportOptions.Dynamic = !this.mscFeatureService.QueryOnly; AGSFeatureServiceLayer aGSFeatureServiceLayer = (AGSFeatureServiceLayer)parentService.MapLayers[fs.ServiceLayerID]; if (aGSFeatureServiceLayer != null) { this.spProps.SetService(aGSFeatureServiceLayer, fs.ExportOptions); } else { this.spProps.SetService(this.localFeatureService, fs.ExportOptions); } this.spProps.ExtentOptions.Add(AfaStrings.Current, fs.ExportOptions.BoundingBox); this.spProps.cbBoundingBoxTypes.SelectedIndex = this.spProps.ExtentOptions.Count - 1; }
public FeatureClassProperties(MSCFeatureService fs) { this._mColorList = this.InitColorList(); }
public object ESRI_FeatureService_Get(ResultBuffer rb) { object result; try { string argument = LspUtil.GetArgument(rb, 0, null); MSCFeatureService mSCFeatureService = null; if (!string.IsNullOrEmpty(argument)) { mSCFeatureService = this.GetFeatureService(argument); } else { mSCFeatureService = this.GetCurrentFeatureService(); } if (mSCFeatureService == null) { result = null; } else { List <TypedValue> list = new List <TypedValue>(); list.Add(new TypedValue(5016, null)); LspUtil.AppendDottedPair(ref list, "SERVICENAME", mSCFeatureService.Name); LspUtil.AppendDottedPair(ref list, "GEOMTYPE", MSCFeatureClass.GetGeomString(mSCFeatureService.GeometryType)); if (!string.IsNullOrEmpty(mSCFeatureService.TypeField)) { LspUtil.AppendDottedPair(ref list, "TYPEFIELD", mSCFeatureService.TypeField); } LspUtil.AppendDottedPair(ref list, "CADLAYER", mSCFeatureService.LayerName); LspUtil.AppendDottedPair(ref list, "LAYERID", mSCFeatureService.ServiceLayerID); if (mSCFeatureService.ExportOptions != null) { LspUtil.AppendDottedPair(ref list, 5005, "EDITMODE", 5003, mSCFeatureService.ExportOptions.Dynamic); try { if (mSCFeatureService.ExportOptions.BoundingBox.IsValid()) { LspUtil.AppendDottedPair(ref list, "EXT", mSCFeatureService.ExportOptions.BoundingBox); } } catch { } } LspUtil.AppendDottedPair(ref list, 5005, "NAME", 5005, mSCFeatureService.Name); if (!string.IsNullOrEmpty(mSCFeatureService.ConnectionURL)) { LspUtil.AppendDottedPair(ref list, 5005, "URL", 5005, mSCFeatureService.ConnectionURL); } try { AGSConnection parent = mSCFeatureService.ParentService.Parent; if (!string.IsNullOrEmpty(parent.Name)) { LspUtil.AppendDottedPair(ref list, 5005, "CONNECTION_NAME", 5005, parent.Name); } } catch { } try { mSCFeatureService.ParentService.GetWKT(); if (mSCFeatureService.ParentService != null) { foreach (KeyValuePair <string, object> current in mSCFeatureService.ParentService.Properties) { try { LspUtil.AppendDottedPair(ref list, current.Key, current.Value); } catch { } } } } catch { } list.Add(new TypedValue(5017, null)); ResultBuffer resultBuffer = new ResultBuffer(list.ToArray()); result = resultBuffer; } } catch { result = null; } return(result); }