public TSIWindow() { InitializeComponent(); _selectedSLsDict = new Dictionary<string, IEnumerable<DGObject>>(); _selectedTunnelsDict = new Dictionary<string, IEnumerable<DGObject>>(); _slsGrade = new Dictionary<int, int>(); _slsGraphics = new Dictionary<int, IGraphicCollection>(); _mainFrame = Globals.mainframe; _prj = Globals.project; _structureDomain = _prj.getDomain(DomainType.Structure); _allSLs = _structureDomain.getObjects("SegmentLining"); _slLayerIDs = new List<string>(); foreach (DGObjects objs in _allSLs) _slLayerIDs.Add(objs.definition.GISLayerName); _allTunnels = _structureDomain.getObjects("Tunnel"); _tunnelLayerIDs = new List<string>(); foreach (DGObjects objs in _allTunnels) _tunnelLayerIDs.Add(objs.definition.GISLayerName); Loaded += TSIWindow_Loaded; Unloaded += TSIWindow_Unloaded; }
public static HashSet<IGraphicsLayer> GetAllLayerID(IView view, Domain domain, string typeName) { HashSet<IGraphicsLayer> graphicLayers = new HashSet<IGraphicsLayer>(); DGObjectsCollection dgObjColl = domain.getObjects(typeName); List<DGObject> objList = dgObjColl.merge(); foreach (DGObject obj in objList) { string layerID = obj.parent.definition.GISLayerName; IGraphicsLayer gLayer = HelperFunction.GetLayer(view, layerID); graphicLayers.Add(gLayer); } return graphicLayers; }
public DrawTunnelsWindow() { InitializeComponent(); //Initialize ISimpleLineSymbol linesymbol = Runtime.graphicEngine.newSimpleLineSymbol( Colors.Red, Core.Graphics.SimpleLineStyle.Solid, 1.0); _symbol = Runtime.graphicEngine.newSimpleFillSymbol( Colors.Blue, SimpleFillStyle.Solid, linesymbol); _tunnelsGraphics = new Dictionary<int, IGraphicCollection>(); _selectedTunnelsDict = new Dictionary<string, IEnumerable<DGObject>>(); _lpResults = new List<DGObject>(); _settings = new DrawTunnelsSettings(); SettingsHolder.DataContext = _settings; Loaded += DrawTunnelsWindow_Loaded; Unloaded += DrawTunnelsWindow_Unloaded; _mainFrame = Globals.mainframe; _prj = Globals.project; if (_mainFrame == null || _prj == null) { _initFailed = true; return; } _structureDomain = _prj.getDomain(DomainType.Structure); if (_structureDomain == null) { _initFailed = true; return; } _allTunnels = _structureDomain.getObjects("Tunnel"); _tunnelLayerIDs = new HashSet<string>(); foreach (DGObjects objs in _allTunnels) _tunnelLayerIDs.Add(objs.definition.GISLayerName); _allAxes = _structureDomain.getObjects("TunnelAxis"); if (_allAxes == null) { _initFailed = true; return; } }
Domain _structureDomain; // the structure domain of the project #endregion Fields #region Constructors public TunnelCSLoadWindow() { InitializeComponent(); ISimpleLineSymbol outline = Runtime.graphicEngine.newSimpleLineSymbol( Colors.Black, Core.Graphics.SimpleLineStyle.Solid, 1.0); _fillSymbol = Runtime.graphicEngine.newSimpleFillSymbol( Colors.Cyan, SimpleFillStyle.Solid, outline); _lineSymbol = Runtime.graphicEngine.newSimpleLineSymbol( Colors.Blue, Core.Graphics.SimpleLineStyle.Solid, 1.0); _arrowFillSymbol = Runtime.graphicEngine.newSimpleFillSymbol( Colors.Blue, SimpleFillStyle.Solid, outline); _IniStress = new SoilInitalStress(); _slsGraphics = new Dictionary<string, IGraphicCollection>(); Loaded += TunnelCSLoadWindow_Loaded; Unloaded += TunnelCSLoadWindow_Unloaded; _mainFrame = Globals.mainframe; _prj = Globals.project; if (_mainFrame == null || _prj == null) { _initFailed = true; return; } _structureDomain = _prj.getDomain(DomainType.Structure); if (_structureDomain == null) { _initFailed = true; return; } _geologyDomain = _prj.getDomain(DomainType.Geology); if (_geologyDomain == null) { _initFailed = true; return; } _allSLs = _structureDomain.getObjects("SegmentLining"); _slLayerIDs = new List<string>(); foreach (DGObjects objs in _allSLs) _slLayerIDs.Add(objs.definition.GISLayerName); }
List<string> _tunnelLayerIDs; // tunnel layer IDs #endregion Fields #region Constructors public SimpleProfileAnalysisWindow() { InitializeComponent(); _settings = new GeoProjSettings(); SettingsHolder.DataContext = _settings; Loaded += SimpleProfileAnalysisWindow_Loaded; Unloaded += SimpleProfileAnalysisWindow_Unloaded; _mainFrame = Globals.mainframe; _prj = Globals.project; if (_mainFrame == null || _prj == null) { _initFailed = true; return; } _geologyDomain = _prj.getDomain(DomainType.Geology); _structureDomain = _prj.getDomain(DomainType.Structure); if (_geologyDomain == null || _structureDomain == null) { _initFailed = true; return; } // set the input view _inputView = _mainFrame.activeView; if (_inputView == null || _inputView.eMap.MapType != EngineeringMapType.FootPrintMap) _inputView = _mainFrame.views.FirstOrDefault( x => x.eMap.MapType == EngineeringMapType.FootPrintMap); if (_inputView == null) { _initFailed = true; return; } InputViewTB.DataContext = _inputView; _allBhs = _geologyDomain.getObjects("Borehole"); _allSts = _geologyDomain.getObjects("Stratum"); _bhLayerIDs = new List<string>(); foreach (DGObjects objs in _allBhs) _bhLayerIDs.Add(objs.definition.GISLayerName); _allTunnels = _structureDomain.getObjects("Tunnel"); _tunnelLayerIDs = new List<string>(); foreach (DGObjects objs in _allTunnels) _tunnelLayerIDs.Add(objs.definition.GISLayerName); // add borehole layer as selectable layer _inputView.removeSelectableLayer("_ALL"); _inputView.addSeletableLayer("0"); // "0" is the drawing layer ID foreach (string layerID in _bhLayerIDs) _inputView.addSeletableLayer(layerID); foreach (string layerID in _tunnelLayerIDs) _inputView.addSeletableLayer(layerID); // add a listener to object selection changed event _inputView.objSelectionChangedTrigger += _inputView_objSelectionChangedListener; // add a listener to drawing graphics changed event _inputView.drawingGraphicsChangedTrigger += _inputView_drawingGraphicsChangedListener; }
public DrawSLWindow() { InitializeComponent(); //Initialize ISimpleLineSymbol linesymbol = Runtime.graphicEngine.newSimpleLineSymbol( Colors.Black, Core.Graphics.SimpleLineStyle.Solid, 1.0); _fillSymbol = Runtime.graphicEngine.newSimpleFillSymbol( Color.FromArgb(150, 0, 0, 255), SimpleFillStyle.Solid, linesymbol); _whiteFillSymbol = Runtime.graphicEngine.newSimpleFillSymbol( Color.FromArgb(150, 255, 255, 255), SimpleFillStyle.Solid, linesymbol); _selectedSLsDict = new Dictionary<string, IEnumerable<DGObject>>(); _slsGraphics = new Dictionary<int, IGraphicCollection>(); _lsGraphics = new Dictionary<string, LSGraphics>(); _csGraphics = new Dictionary<string, CSGraphics>(); Loaded += DrawSLWindow_Loaded; Unloaded += DrawSLWindow_Unloaded; _mainFrame = Globals.mainframe; _prj = Globals.project; if (_mainFrame == null || _prj == null) { _initFailed = true; return; } _structureDomain = _prj.getDomain(DomainType.Structure); if (_structureDomain == null) { _initFailed = true; return; } _allSLs = _structureDomain.getObjects("SegmentLining"); _slLayerIDs = new List<string>(); foreach (DGObjects objs in _allSLs) _slLayerIDs.Add(objs.definition.GISLayerName); }
public LoadStructureModelWindow() { InitializeComponent(); ISimpleLineSymbol outline = Runtime.graphicEngine.newSimpleLineSymbol( Colors.Black, Core.Graphics.SimpleLineStyle.Solid, 1.0); _whitefillSymbol = Runtime.graphicEngine.newSimpleFillSymbol( Colors.White, SimpleFillStyle.Solid, outline); _lineSymbol = Runtime.graphicEngine.newSimpleLineSymbol( Color.FromArgb(255, 0, 0, 0), Core.Graphics.SimpleLineStyle.Solid, 1.0); _arrowFillSymbol = Runtime.graphicEngine.newSimpleFillSymbol( Colors.Blue, SimpleFillStyle.Solid, outline); SLMomentGraphics = new Dictionary<int, IGraphicCollection>(); SLAxialGraphics = new Dictionary<int, IGraphicCollection>(); SLShearGraphics = new Dictionary<int, IGraphicCollection>(); SLDisplacementGraphics = new Dictionary<int, IGraphicCollection>(); _loadStructure = new LoadStructure(); Loaded += LoadStructureModelWindow_Loaded; Unloaded += LoadStructureModelWindow_Unloaded; _mainFrame = Globals.mainframe; _prj = Globals.project; if (_mainFrame == null || _prj == null) { _initFailed = true; return; } _structureDomain = _prj.getDomain(DomainType.Structure); if (_structureDomain == null) { _initFailed = true; return; } _geologyDomain = _prj.getDomain(DomainType.Geology); if (_geologyDomain == null) { _initFailed = true; return; } _allSLs = _structureDomain.getObjects("SegmentLining"); _slLayerIDs = new List<string>(); foreach (DGObjects objs in _allSLs) _slLayerIDs.Add(objs.definition.GISLayerName); _ansysPath = Runtime.rootPath + "//Conf//ansysPath.xml"; }
HashSet<string> _tunnelLayerIDs; // tunnel layer IDs #endregion Fields #region Constructors public TunnelDepthAnalysisWindow() { InitializeComponent(); //Initialize _linesymbol = Runtime.graphicEngine.newSimpleLineSymbol( Colors.Blue, Core.Graphics.SimpleLineStyle.Solid, 1.0); _selectedTunnelsDict = new Dictionary<string, IEnumerable<DGObject>>(); _depthGraphics = new Dictionary<int, IGraphicCollection>(); Loaded += TunnelDepthAnalysisWindow_Loaded; Unloaded += TunnelDepthAnalysisWindow_Unloaded; _mainFrame = Globals.mainframe; _prj = Globals.project; if (_mainFrame == null || _prj == null) { _initFailed = true; return; } _structureDomain = _prj.getDomain(DomainType.Structure); if (_structureDomain == null) { _initFailed = true; return; } _allTunnels = _structureDomain.getObjects("Tunnel"); _tunnelLayerIDs = new HashSet<string>(); foreach (DGObjects objs in _allTunnels) _tunnelLayerIDs.Add(objs.definition.GISLayerName); }