public bool GenerateNew() { try { string appPath = System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().Location); Assembly uiAssembly = Assembly.LoadFrom(appPath + @"\gView.Interoperability.ArcXML.UI.dll"); IModalDialog dlg = uiAssembly.CreateInstance("gView.Interoperability.ArcXML.UI.FormSelectService") as IModalDialog; if (dlg is IConnectionString) { if (dlg.OpenModal()) { string connectionString = ((IConnectionString)dlg).ConnectionString; _dataset = new ArcIMSDataset(); _dataset.ConnectionString = connectionString; return(true); } } } catch { } return(false); }
public ArcIMSClass(ArcIMSDataset 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 ArcIMSDataset(); _dataset.ConnectionString = connectionString; } }
async public Task <object> GetInstanceAsync() { if (_class == null) { ArcIMSDataset dataset = new ArcIMSDataset(_connectionString, _name); await dataset.Open(); // kein open, weil sonst ein GET_SERVICE_INFO durchgeführt wird... var elements = await dataset.Elements(); if (elements.Count == 0) { dataset.Dispose(); return(null); } _class = elements[0].Class as ArcIMSClass; } return(_class); }