public void Func(string Params) { //获取数据 Project _prj = Globals.project; Domain _constructionDoamin2 = _prj.getDomain("Construction"); DGObjects _tfsiDGObjects2 = _constructionDoamin2.DGObjectsList.Where(x => x.definition.Type == "TFSI").FirstOrDefault(); //通知对象组改变事件 Globals.mainFrame.DGObjectsSelectionChangedListener(this, new DGObjectsSelectionChangedEvent() { newObjs = _tfsiDGObjects2 }); //二维视图改变 IMainFrame mainFrame = Globals.mainFrame; //获取要添加图元的视图view IView2D _inputView = (mainFrame.views.Where(x => x.name == "右幅剖面图").FirstOrDefault()) as IView2D; List <string> dynamiclayerlist = new List <string>() { "TFSI" }; _inputView.Opendynamiclayers(dynamiclayerlist, "地质剖面"); iS3Legned legeng_SPZL = new iS3Legned() { legndTitle = "地质预报图例", iS3SymbolList = new List <iS3Symbol>() { new iS3Symbol() { colorName = "Green", label = "地质预报", symbolType = SymbolType.Rectangle } } }; _inputView.holder.setlegend(legeng_SPZL); _inputView.holder.setLegendShow(true); _inputView = (mainFrame.views.Where(x => x.name == "左幅剖面图").FirstOrDefault()) as IView2D; dynamiclayerlist = new List <string>() { "TFSI" }; _inputView.Opendynamiclayers(dynamiclayerlist, "地质剖面"); legeng_SPZL = new iS3Legned() { legndTitle = "地质预报图例", iS3SymbolList = new List <iS3Symbol>() { new iS3Symbol() { colorName = "Green", label = "地质预报", symbolType = SymbolType.Rectangle } } }; _inputView.holder.setlegend(legeng_SPZL); _inputView.holder.setLegendShow(true); }
public void Func(string Params) { //二维视图改变 IMainFrame mainFrame = Globals.mainFrame; Project _prj = Globals.project; Domain _constructionDoamin2 = _prj.getDomain("Construction"); DGObjects _gprfDGObjects2 = _constructionDoamin2.DGObjectsList.Where(x => x.definition.Type == "TFSI").FirstOrDefault(); Globals.mainFrame.DGObjectsSelectionChangedListener(null, new DGObjectsSelectionChangedEvent() { newObjs = _gprfDGObjects2 }); //获取要添加图元的视图view IView2D _inputView = (mainFrame.views.Where(x => x.name == "右幅剖面图").FirstOrDefault()) as IView2D; List <string> dynamiclayerlist = new List <string>() { "RiskIdfy" }; _inputView.Opendynamiclayers(dynamiclayerlist, "施工进度"); iS3Legned legeng_risk = new iS3Legned() { legndTitle = "风险标识", iS3SymbolList = new List <iS3Symbol>() { new iS3Symbol() { label = "风险点", symbolType = SymbolType.Icon, refPath = "riskidfy_alert.png" } } }; _inputView.holder.setlegend(legeng_risk); _inputView.holder.setLegendShow(true); _inputView = (mainFrame.views.Where(x => x.name == "左幅剖面图").FirstOrDefault()) as IView2D; dynamiclayerlist = new List <string>() { "RiskIdfy" }; _inputView.Opendynamiclayers(dynamiclayerlist, "施工进度"); legeng_risk = new iS3Legned() { legndTitle = "风险标识", iS3SymbolList = new List <iS3Symbol>() { new iS3Symbol() { label = "风险点", symbolType = SymbolType.Icon, refPath = "riskidfy_alert.png" } } }; _inputView.holder.setlegend(legeng_risk); _inputView.holder.setLegendShow(true); }
public void Func(string Params) { //通知对象组改变事件 Globals.mainFrame.DGObjectsSelectionChangedListener(this, new DGObjectsSelectionChangedEvent() { newObjs = null }); //二维视图改变 IMainFrame mainFrame = Globals.mainFrame; //获取要添加图元的视图view IView2D _inputView = (mainFrame.views.Where(x => x.name == "右幅剖面图").FirstOrDefault()) as IView2D; List <string> dynamiclayerlist = new List <string>(); _inputView.Opendynamiclayers(dynamiclayerlist, "物探"); _inputView.holder.setLegendShow(false); _inputView = (mainFrame.views.Where(x => x.name == "左幅剖面图").FirstOrDefault()) as IView2D; dynamiclayerlist = new List <string>(); _inputView.Opendynamiclayers(dynamiclayerlist, "物探"); _inputView.holder.setLegendShow(false); }
public void Func(string Params) { //初始化三维事件 U3DViewModel model = Globals.mainFrame.views.Where(x => x.baseType == ViewBaseType.D3).FirstOrDefault() as U3DViewModel; SetPointEvent _event = new SetPointEvent(UnityEventType.SetPointEvent); _event.Domain = "Construction"; _event.ObjType = "TPZL"; _event.state = state; state = !state; //获取数据 Project _prj = Globals.project; Domain _constructionDoamin2 = _prj.getDomain("Construction"); DGObjects _gprfDGObjects2 = _constructionDoamin2.DGObjectsList.Where(x => x.definition.Type == "TPZL").FirstOrDefault(); foreach (DGObject obj in _gprfDGObjects2.objContainer) { TPZL tpzl = JsonConvert.DeserializeObject <TPZL>(JsonConvert.SerializeObject(obj)); if ((tpzl.TPZL_ZHQJ == null) || (tpzl.TPZL_ZHQJ.Length == 0)) { continue; } _event.TunnelPointList.Add(tpzl.TPZL_ZHQJ.Split('-')[0] + "#" + tpzl.ID.ToString()); _event.ImageList.Add("Panel_Image"); } model.ExcuteCommand(JsonConvert.SerializeObject(_event)); //通知对象组改变事件 Globals.mainFrame.DGObjectsSelectionChangedListener(this, new DGObjectsSelectionChangedEvent() { newObjs = _gprfDGObjects2 }); IMainFrame mainFrame = Globals.mainFrame; //获取要添加图元的视图view IView2D _inputView = (mainFrame.views.Where(x => x.name == "右幅剖面图").FirstOrDefault()) as IView2D; List <string> dynamiclayerlist = new List <string>() { "TPZL" }; _inputView.Opendynamiclayers(dynamiclayerlist, "施工进度"); iS3Legned legeng_TPZL = new iS3Legned() { legndTitle = "图片资料图例", iS3SymbolList = new List <iS3Symbol>() { new iS3Symbol() { label = "图片资料", symbolType = SymbolType.Icon, refPath = "picicon.png" } } }; _inputView.holder.setlegend(legeng_TPZL); _inputView.holder.setLegendShow(true); _inputView = (mainFrame.views.Where(x => x.name == "左幅剖面图").FirstOrDefault()) as IView2D; dynamiclayerlist = new List <string>() { "TPZL" }; _inputView.Opendynamiclayers(dynamiclayerlist, "施工进度"); legeng_TPZL = new iS3Legned() { legndTitle = "图片资料图例", iS3SymbolList = new List <iS3Symbol>() { new iS3Symbol() { label = "图片资料", symbolType = SymbolType.Icon, refPath = "picicon.png" } } }; _inputView.holder.setlegend(legeng_TPZL); _inputView.holder.setLegendShow(true); }
public void Func(string Params) { //初始化三维事件 U3DViewModel model = Globals.mainFrame.views.Where(x => x.baseType == ViewBaseType.D3).FirstOrDefault() as U3DViewModel; SetPointEvent _event = new SetPointEvent(UnityEventType.SetPointEvent); _event.Domain = "Construction"; _event.state = state; state = !state; _event.ObjType = "CHAG"; //获取数据 Project _prj = Globals.project; Domain _constructionDoamin2 = _prj.getDomain("Construction"); DGObjects _gprfDGObjects2 = _constructionDoamin2.DGObjectsList.Where(x => x.definition.Type == "CHAG").FirstOrDefault(); foreach (DGObject obj in _gprfDGObjects2.objContainer) { try { CHAG chag = JsonConvert.DeserializeObject <CHAG>(JsonConvert.SerializeObject(obj)); if ((chag.CHAG_CHAI == null) || (chag.CHAG_CHAI.Length == 0)) { continue; } _event.TunnelPointList.Add(chag.CHAG_CHAI.Split('-')[0] + "#" + chag.ID.ToString()); int before = findNum(chag.CHAG_PRIM); //原来的衬砌类型 int after = findNum(chag.CHAG_PRES); if (before == after) { _event.ImageList.Add("Panel_Keep"); } if (before > after) { _event.ImageList.Add("Panel_Decrease"); } if (before < after) { _event.ImageList.Add("Panel_Increase"); } } catch (Exception ex) { } } model.ExcuteCommand(JsonConvert.SerializeObject(_event)); //通知对象组改变事件 Globals.mainFrame.DGObjectsSelectionChangedListener(this, new DGObjectsSelectionChangedEvent() { newObjs = _gprfDGObjects2 }); //二维视图改变 IMainFrame mainFrame = Globals.mainFrame; //获取要添加图元的视图view 右幅 IView2D _inputView = (mainFrame.views.Where(x => x.name == "右幅剖面图").FirstOrDefault()) as IView2D; List <string> dynamiclayerlist = new List <string>() { "CHAG" }; _inputView.Opendynamiclayers(dynamiclayerlist, "施工进度"); iS3Legned legeng_CHAG = new iS3Legned() { legndTitle = "施工变更图例", iS3SymbolList = new List <iS3Symbol>() { new iS3Symbol() { colorName = "HotPink", label = "施工变更", symbolType = SymbolType.Rectangle } } }; _inputView.holder.setlegend(legeng_CHAG); _inputView.holder.setLegendShow(true); //左幅 _inputView = (mainFrame.views.Where(x => x.name == "左幅剖面图").FirstOrDefault()) as IView2D; dynamiclayerlist = new List <string>() { "CHAG" }; _inputView.Opendynamiclayers(dynamiclayerlist, "施工进度"); legeng_CHAG = new iS3Legned() { legndTitle = "施工变更图例", iS3SymbolList = new List <iS3Symbol>() { new iS3Symbol() { colorName = "HotPink", label = "施工变更", symbolType = SymbolType.Rectangle } } }; _inputView.holder.setlegend(legeng_CHAG); _inputView.holder.setLegendShow(true); }
public void Func(string Params) { if (_init == 0) { SetProgressEvent _event = new SetProgressEvent(UnityEventType.SetProgressEvent); _event.TunnelSectionList = new List <TunnelSection>(); List <Tuple <string, string> > list = Globals.tunnelSectionList; foreach (var data in Globals.tunnelSectionList) { _event.TunnelSectionList.Add(new TunnelSection() { startM = data.Item1, endM = data.Item2 }); } _event.TunnelPointList = new List <string>(); double zmax = 0; double zmin = 20000; double ymax = 0; double ymin = 20000; string zmaxStr = ""; string zminStr = ""; string ymaxStr = ""; string yminStr = ""; foreach (string str in Globals.tunnelPosList) { if (str.StartsWith("YK")) { double mi = getMileage(str); if ((mi < 7000) && (mi > ymax)) { ymax = mi; ymaxStr = str; } if ((mi > 7000) && (mi < ymin)) { ymin = mi; yminStr = str; } } if (str.StartsWith("ZK")) { double mi = getMileage(str); if ((mi < 7000) && (mi > zmax)) { zmax = mi; zmaxStr = str; } if ((mi > 7000) && (mi < zmin)) { zmin = mi; zminStr = str; } } } _event.TunnelPointList.Add(ymaxStr); _event.TunnelPointList.Add(zmaxStr); _event.TunnelPointList.Add(yminStr); _event.TunnelPointList.Add(zminStr); U3DViewModel model = Globals.mainFrame.views.Where(x => x.baseType == ViewBaseType.D3).FirstOrDefault() as U3DViewModel; model.ExcuteCommand(JsonConvert.SerializeObject(_event)); } else { _state = !_state; SetProgressEvent _event = new SetProgressEvent(UnityEventType.SetProgressEvent); _event.state = _state; U3DViewModel model = Globals.mainFrame.views.Where(x => x.baseType == ViewBaseType.D3).FirstOrDefault() as U3DViewModel; model.ExcuteCommand(JsonConvert.SerializeObject(_event)); } _init++; Project _prj = Globals.project; Domain _constructionDoamin = _prj.getDomain("Construction"); DGObjects _gprfDGObjects = _constructionDoamin.DGObjectsList.Where(x => x.definition.Type == "ACHE").FirstOrDefault(); Globals.mainFrame.DGObjectsSelectionChangedListener(this, new DGObjectsSelectionChangedEvent() { newObjs = _gprfDGObjects }); //二维视图改变 IMainFrame mainFrame = Globals.mainFrame; //获取要添加图元的视图view IView2D _inputView = (mainFrame.views.Where(x => x.name == "右幅剖面图").FirstOrDefault()) as IView2D; List <string> dynamiclayerlist = new List <string>() { "ACHE", "ACHE_EC", "ACHE_YG", "ACHE_ZZM" }; _inputView.Opendynamiclayers(dynamiclayerlist, "施工进度"); iS3Legned legeng_ACHE = new iS3Legned() { legndTitle = "施工进度图例", iS3SymbolList = new List <iS3Symbol>() { new iS3Symbol() { colorName = "Yellow", label = "初衬", symbolType = SymbolType.Rectangle }, new iS3Symbol() { colorName = "GreenYellow", label = "二衬", symbolType = SymbolType.Rectangle }, new iS3Symbol() { colorName = "Khaki", label = "仰拱", symbolType = SymbolType.Rectangle }, new iS3Symbol() { label = "掌子面", symbolType = SymbolType.Icon, refPath = "redflag.png" } //new iS3Symbol(){label="图片",symbolType=SymbolType.Icon,refPath="照片.png"} } }; _inputView.holder.setlegend(legeng_ACHE); _inputView.holder.setLegendShow(true); _inputView = (mainFrame.views.Where(x => x.name == "左幅剖面图").FirstOrDefault()) as IView2D; dynamiclayerlist = new List <string>() { "ACHE", "ACHE_EC", "ACHE_YG", "ACHE_ZZM" }; _inputView.Opendynamiclayers(dynamiclayerlist, "施工进度"); legeng_ACHE = new iS3Legned() { legndTitle = "施工进度图例", iS3SymbolList = new List <iS3Symbol>() { new iS3Symbol() { colorName = "Yellow", label = "初衬", symbolType = SymbolType.Rectangle }, new iS3Symbol() { colorName = "GreenYellow", label = "二衬", symbolType = SymbolType.Rectangle }, new iS3Symbol() { colorName = "Khaki", label = "仰拱", symbolType = SymbolType.Rectangle }, new iS3Symbol() { label = "掌子面", symbolType = SymbolType.Icon, refPath = "redflag.png" } //new iS3Symbol(){label="图片",symbolType=SymbolType.Icon,refPath="照片.png"} } }; _inputView.holder.setlegend(legeng_ACHE); _inputView.holder.setLegendShow(true); }