代码拉取完成,页面将自动刷新
using System;
using System.Collections.Generic;
using System.Text;
using GeoScene.Data;
using GeoScene.Globe;
using GeoScene.Engine;
namespace WorldGIS
{
public enum EnumDataTableType
{
/// <summary>
/// null
/// </summary>
nothing,
/// <summary>
/// 管线
/// </summary>
pipeline,
/// <summary>
/// 阀门
/// </summary>
valve,
/// <summary>
/// 工井
/// </summary>
workwell,
/// <summary>
/// 雨篦
/// </summary>
raingrate,
/// <summary>
/// 管件
/// </summary>
pipefitting,
/// <summary>
/// 附属物
/// </summary>
appendages
}
public class DatabaseConnectParams
{
public string ip;
public string port;
public string databaseName;
public string userName;
public string password;
public string dataSourceName;
public EnumDataSourceType databaseType;
public GSODataSource dataSource;
public Dictionary<string,EnumDataTableType> dictionaryDataTableType = new Dictionary<string,EnumDataTableType>();
public DatabaseConnectParams()
{ }
public DatabaseConnectParams(GSODataSource _dataSource,string _ip,string _port, string _databaseName, string _userName, string _password, string _dataSourceName, EnumDataSourceType _databaseType)
{
dataSource = _dataSource;
ip = _ip;
port = _port;
databaseName = _databaseName;
userName = _userName;
password = _password;
dataSourceName = _dataSourceName;
databaseType = _databaseType;
}
public string dataSourceFullName
{
get {
if (databaseType == EnumDataSourceType.SqlServer)
{
return "SqlServer:" + dataSourceName;
}
else if (databaseType == EnumDataSourceType.Oracle)
{
return "Oracle:" + dataSourceName;
}
else
{
return dataSourceName;
}
}
}
public EnumDataTableType getDataTableTypeByLayer(GSOLayer layer)
{
if (layer == null)
{
return EnumDataTableType.nothing;
}
if (dictionaryDataTableType.ContainsKey(layer.Name) == true)
{
return dictionaryDataTableType[layer.Name];
}
else
{
return EnumDataTableType.nothing;
}
}
public EnumDataTableType getDataTableTypeByLayer(string layerName)
{
if (layerName == "")
{
return EnumDataTableType.nothing;
}
if (dictionaryDataTableType.ContainsKey(layerName) == true)
{
return dictionaryDataTableType[layerName];
}
else
{
return EnumDataTableType.nothing;
}
}
public override string ToString()
{
return this.dataSourceFullName;
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。