private void ReleaseAndDeleteValueMatrixShort(ValueMatrixShort vms) { if (vms != null) { if (vms.MatrixBlockArr != null) { foreach (ValueMatrixBlock block in vms.MatrixBlockArr) { if (block.ShortMatrix != null) { if (block.ShortMatrix.IsOpen) { block.ShortMatrix.Close(true); } block.ShortMatrix = null; } } } if (vms.IsOpen) { vms.Close(true); } vms = null; } }
private void ThroughputShow(PredictionGroup pg, PredictionStudy ps) { this.ClearDiscreteMapLayer(ps); string savePath = this.GetSavePath(ps); this.m_ValueCollectionInt = ps.StudyValueMatrix as ValueMatrixIntCollection; this.m_ValueCollectionInt.Open(this.m_SubSysInterface.ProjectManager); Dictionary<short, Color> discreteColorDict = new Dictionary<short, Color>(); this.m_DefaultColor = Color.FromArgb(0, Color.White); List<MaxMinValue> maxMinValueList = this.GenerateColorDict(ps, discreteColorDict); foreach (ValueMatrixInt num in this.m_ValueCollectionInt.Values) { ValueMatrixShort throughputValueMatrix = new ValueMatrixShort(savePath, string.Empty, num.RowsCount, num.ColumnsCount); throughputValueMatrix.SetParam(num.NorthwestX, num.NorthwestY, (float) num.Resolution); throughputValueMatrix.SetValue(num.InvalidValue, num.NotCalcValue, num.DefaultValue); this.GenerateValueMatrixForGeo(maxMinValueList, num, throughputValueMatrix); string str2 = Enum.GetName(typeof(PredictionStudyType), ps.StudyType).Replace('_', ' '); GeoDiscreteEventArgs args = new GeoDiscreteEventArgs(throughputValueMatrix, discreteColorDict, this.m_DefaultColor); args.m_PolygonRegion = this.m_PredictionGroup.Region; int layerId = this.m_SubSysInterface.AnalyDispEvent.AnalyGeoDiscreteLayerMsgChanged(args); ps.StudyLegend.MapLever = layerId; this.UpdateTreeNodeTag(pg, ps, layerId); throughputValueMatrix.Close(false); } this.m_ValueCollectionInt.Close(false); }