Ejemplo n.º 1
0
        /// <summary>
        /// Returns a dictionary of named range values in the XML spreadsheet to replace with stat values
        /// </summary>
        /// <param name="dodStat"></param>
        /// <returns></returns>
        private static Dictionary <string, string> GetStatValues(GCDConsoleLib.GCD.DoDStats dodStat)
        {
            Dictionary <string, string> StatValues = new Dictionary <string, string>();

            //get settings and options
            UnitsNet.Area            ca      = ProjectManager.Project.CellArea;
            DoDSummaryDisplayOptions options = new DoDSummaryDisplayOptions(ProjectManager.Project.Units);

            UnitsNet.Units.LengthUnit vunit = ProjectManager.Project.Units.VertUnit;

            //using same pattern as ucDoDSummary
            StatValues["ArealLoweringRaw"]         = dodStat.ErosionRaw.GetArea(ca).As(options.AreaUnits).ToString();
            StatValues["ArealLoweringThresholded"] = dodStat.ErosionThr.GetArea(ca).As(options.AreaUnits).ToString();
            StatValues["ArealRaisingRaw"]          = dodStat.DepositionRaw.GetArea(ca).As(options.AreaUnits).ToString();
            StatValues["ArealRaisingThresholded"]  = dodStat.DepositionThr.GetArea(ca).As(options.AreaUnits).ToString();

            StatValues["VolumeLoweringRaw"]         = dodStat.ErosionRaw.GetVolume(ca, vunit).As(options.VolumeUnits).ToString();
            StatValues["VolumeLoweringThresholded"] = dodStat.ErosionThr.GetVolume(ca, vunit).As(options.VolumeUnits).ToString();
            StatValues["VolumeErrorLowering"]       = dodStat.ErosionErr.GetVolume(ca, vunit).As(options.VolumeUnits).ToString();
            StatValues["VolumeRaisingRaw"]          = dodStat.DepositionRaw.GetVolume(ca, vunit).As(options.VolumeUnits).ToString();
            StatValues["VolumeRaisingThresholded"]  = dodStat.DepositionThr.GetVolume(ca, vunit).As(options.VolumeUnits).ToString();
            StatValues["VolumeErrorRaising"]        = dodStat.DepositionErr.GetVolume(ca, vunit).As(options.VolumeUnits).ToString();

            return(StatValues);
        }
Ejemplo n.º 2
0
        public void SetChartOptions(DoDSummaryDisplayOptions option)
        {
            chtData.Series[DEPOSIT_CHART_SERIES].Color = ProjectManager.ColorDeposition;
            chtData.Series[EROSION_CHART_SERIES].Color = ProjectManager.ColorErosion;

            chtData.Legends.ToList <Legend>().ForEach(x => x.Font = option.Font);

            foreach (ChartArea area in chtData.ChartAreas)
            {
                area.AxisX.TitleFont       = option.Font;
                area.AxisX.LabelStyle.Font = option.Font;
                area.AxisY.TitleFont       = option.Font;
                area.AxisY.LabelStyle.Font = option.Font;
            }
        }
Ejemplo n.º 3
0
        public frmBudgetSegResults(GCDCore.Project.BudgetSegregation BS)
        {
            // This call is required by the designer.
            InitializeComponent();

            BudgetSeg = BS;

            System.Drawing.Bitmap formImage = BudgetSeg.IsMaskDirectional ? Properties.Resources.DirectionalBudgetSeg : Properties.Resources.BudgetSeg;
            Icon = System.Drawing.Icon.FromHandle(formImage.GetHicon());

            ucProperties.Initialize(BudgetSeg.DoD);
            m_Options = new DoDSummaryDisplayOptions(ProjectManager.Project.Units);

            PieChartViewer = new Visualization.BudgetSegPieChartViewer(BudgetSeg.FilteredClasses.ToList(), chtPieCharts);
            cmsChart       = new UtilityForms.ChartContextMenu(BudgetSeg.Folder, "budget_seg");
        }