123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230 |
- /* ==============================================================================
- * 功能描述:MBIConst
- * 创 建 者:Garrett
- * 创建日期:2018/3/13 19:31:08
- * ==============================================================================*/
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using SAGA.DotNetUtils;
- using SAGA.DotNetUtils.Utilities;
- using SAGA.MBI.FileStream;
- namespace SAGA.MBI.Common
- {
- /// <summary>
- /// MBIConst
- /// </summary>
- public class MBIConst
- {
- //最少空间的面积. 0.4m 削减因子: 1
- public static readonly double SpacePerimeterTolerance = Math.Pow(0.4 * 1000 / 304.8, 2) / 1;
- //最小空间的周长. 0.4m 削减因子: 1
- public static readonly double SpaceAreaTolerance = (0.4 * 1000 / 304.8 * 4) / 1;
- public static readonly string ManageCur = "ManageCurLocalize.json";
- public static readonly string MBIAssistDBName = "MBIAssistData.db";
- public static readonly string MBIAssistDBVersion = "SqliteVersion.xml";
- public static readonly string MBITempSettingPath = Path.Combine(AppBaseInfo.AppTempFilePath, "MBI\\SettingsTemp");
- public static readonly string MBIImagePath = AppBaseInfo.ImagePath;
- public static readonly string MBIResourcePath = Path.Combine(AppBaseInfo.AppRunPath, "MBIResource");
- public static readonly string MBIDataDictionaryPath = Path.Combine(MBIResourcePath, "DataDictionary");
- public static readonly string EmptyFilePath = Path.Combine(MBIResourcePath, "EmptyFile\\EmptyProject.rvt");
- public static readonly string BeaconFamilyFilePath = Path.Combine(AppBaseInfo.FamilyPath, "Beacon.rfa");
- public static readonly string SpaceTagFamilyFilePath = Path.Combine(AppBaseInfo.FamilyPath, "空间标记.rfa");
- /// <summary>
- /// 幕墙编码
- /// </summary>
- public static readonly string CurtainWallCode = "CWPN";
- //访问数据的地址
- public static string SaasLocalHost
- {
- get
- {
- string key = nameof(SaasLocalHost);
- string url = ProjectDirOperate.GetConfigureInfo(key);
- if (url.IsNullOrEmpty())
- {
- //url = "http://192.168.30.96:8080/";
- url = "http://mbi.sagacloud.cn:8080/";
- ProjectDirOperate.SaveConfigureInfo(key, url);
- }
- return url;
- }
- }
- public static string DataPlatformLocalHost
- {
- get
- {
- string key = nameof(DataPlatformLocalHost);
- string url = ProjectDirOperate.GetConfigureInfo(key);
- if (url.IsNullOrEmpty())
- {
- //url = "http://192.168.20.225:8080/";
- url = "http://service.sagacloud.cn:28888/";
- ProjectDirOperate.SaveConfigureInfo(key, url);
- }
- return url;
- }
- }
- /// <summary>
- /// 图片服务器,线上地址更新,
- /// 之前与DataPlatflorm一致 190123
- /// </summary>
- public static string ImageServiceLocalHost
- {
- get
- {
- string key = nameof(ImageServiceLocalHost);
- string url = ProjectDirOperate.GetConfigureInfo(key);
- if (url.IsNullOrEmpty())
- {
- //url = "http://192.168.20.225:8080/";
- url = "47.93.33.207:28888/";
- ProjectDirOperate.SaveConfigureInfo(key, url);
- }
- return url;
- }
- }
- public static string GoodHandLocalHost
- {
- get
- {
- string key = nameof(GoodHandLocalHost);
- string url = ProjectDirOperate.GetConfigureInfo(key);
- if (url.IsNullOrEmpty())
- {
- //url = "http://192.168.20.225:8080/godhand/";
- url = "http://service.sagacloud.cn:28888/godhand/";
- ProjectDirOperate.SaveConfigureInfo(key, url);
- }
- return url;
- }
- }
- public static string ScanBuildingLocalHost
- {
- get
- {
- string key = nameof(ScanBuildingLocalHost);
- string url = ProjectDirOperate.GetConfigureInfo(key);
- if (url.IsNullOrEmpty())
- {
- // url = "http://172.16.0.141:8080/ScanBuilding/";
- url = "http://mbi.sagacloud.cn:8080/ScanBuilding/";
- ProjectDirOperate.SaveConfigureInfo(key, url);
- }
- return url;
- }
- }
- //html5的ulr地址,暂定
- public static string Html5DetailLocalHost
- {
- get
- {
- string key = nameof(Html5DetailLocalHost);
- string url = ProjectDirOperate.GetConfigureInfo(key);
- if (url.IsNullOrEmpty())
- {
- // url = "http://172.16.0.181:8889/#/";
- url = "http://mbi.sagacloud.cn:8889/#/";
- ProjectDirOperate.SaveConfigureInfo(key, url);
- }
- return url;
- }
- }
- public static string Html5ImageLocalHost
- {
- get
- {
- string key = nameof(Html5ImageLocalHost);
- string url = ProjectDirOperate.GetConfigureInfo(key);
- if (url.IsNullOrEmpty())
- {
- // url = "http://172.16.0.181:8890/";
- url = "http://mbi.sagacloud.cn:8890/";
- ProjectDirOperate.SaveConfigureInfo(key, url);
- }
- return url;
- }
- }
- public static string Html5ScanLocalHost
- {
- get
- {
- string key = nameof(Html5ScanLocalHost);
- string url = ProjectDirOperate.GetConfigureInfo(key);
- if (url.IsNullOrEmpty())
- {
- // url = "http://172.16.0.181:8888/#/";
- url = "http://mbi.sagacloud.cn:8888/#/";
- ProjectDirOperate.SaveConfigureInfo(key, url);
- }
- return url;
- }
- }
- /// <summary>
- /// 拓扑视图地址
- /// </summary>
- public static string GplotViewHost
- {
- get
- {
- string key = nameof(GplotViewHost);
- string url = ProjectDirOperate.GetConfigureInfo(key);
- if (url.IsNullOrEmpty())
- {
- url = "http://mbi.sagacloud.cn:8888/#/";
- ProjectDirOperate.SaveConfigureInfo(key, url);
- }
- return url;
- }
- }
- public static readonly string ProjectManageSecret = "A123456";
- public static string ProjectSecret => MBIControl.ProjectCur.Password;
- //revit文件服务器id和密码
- public static readonly string RevitServiceId = "revit";
- public static readonly string RevitServiceSecret = "63afbef6906c342b";
- //图片服务器id和密码
- public static readonly string DevServiceId = "dataPlatform";
- public static readonly string DevServiceSecret = "9e0891a7a8c8e885";
- public static string AccessKeyId = "LTAIQVvCRivyl3Dd";
- public static string AccessKeySecret = "hkGLC7RgWUntbAS2Zw5rWOVS8Xhj0G";
- public static string Endpoint = "oss-cn-beijing.aliyuncs.com";
- public static string BucketName = "saga-data";
- /// <summary>
- /// 使用ossclient上传的文件地址(测试和线上地址不一样)
- /// </summary>
- public static string OssClientFileKey
- {
- get
- {
- string key = nameof(OssClientFileKey);
- string url = ProjectDirOperate.GetConfigureInfo(key);
- if (url.IsNullOrEmpty())
- {
- // url = "test/files/revit/";
- url = "files/revit/";
- ProjectDirOperate.SaveConfigureInfo(key, url);
- }
- return url;
- }
- }
- /// <summary>
- /// 拓扑图文件存放文件夹地址
- /// </summary>
- public static string OssGplotFilePrefix => $"test/files/revit/GplotData/{ MBIControl.ProjectCur.Id}";
-
- //空间的code类型
- public static string SpaceCode = "ispace";
-
- }
- }
|