/// <summary>
        /// 高速修復材グラフのY軸の設定を行います。
        /// </summary>
        /// <param name="mostRepairTool">最も多い高速修復材の量</param>
        private void SetRepairToolYAxis(int mostRepairTool)
        {
            this.mostRepairTool = Math.Max(mostRepairTool, 10);
            var interval = ChartUtilities.GetInterval(0, this.mostRepairTool);

            YMax2 = ChartUtilities.GetYAxisMax(this.mostRepairTool, interval);
        }
        /// <summary>
        /// 資材グラフのY軸の設定を行います。
        /// </summary>
        /// <param name="mostMaterial">最も多い資材の量</param>
        private void SetMaterialYAxis(int mostMaterial)
        {
            this.mostMaterial = Math.Max(mostMaterial, 100);
            var interval = ChartUtilities.GetInterval(0, this.mostMaterial);

            YMax1 = ChartUtilities.GetYAxisMax(this.mostMaterial, interval);
        }
Example #3
0
 /// <summary>
 ///   Copies the chart to the clipboard
 /// </summary>
 /// <param name="element"></param>
 /// <param name="width"></param>
 /// <param name="height"></param>
 protected void CopyChartToClipboard(FrameworkElement element, double width, double height)
 {
     try
     {
         ChartUtilities.CopyChartToClipboard(plotToCopy, xyLineChart, width, height);
     }
     catch
     {
         // the above might throw a security exception is used in an xbap
         Trace.WriteLine("Error copying to clipboard");
     }
 }
Example #4
0
        protected void SaveToFile(FrameworkElement element, double width, double height)
        {
            var saveFile = new SaveFileDialog();

            saveFile.Filter          = "png files (*.png)|*.png";
            saveFile.AddExtension    = true;
            saveFile.OverwritePrompt = true;
            saveFile.Title           = "Save Chart To a File";
            saveFile.ValidateNames   = true;

            if (saveFile.ShowDialog() == true)
            {
                ChartUtilities.CopyFrameworkElemenToPNGFile(plotToCopy, width, height, saveFile.FileName);
            }
        }