/// <summary>
        /// Export the currently draw canvas to a file
        /// </summary>
        private void Export(ICanvasExporter exporter)
        {
            if (exporter == null)
            {
                return;
            }

            //select save location
            var saveDlg = new SaveFileDialog()
            {
                FileName = "",
                Filter   = "png Image|*.png",
                Title    = "Save the diagram to an Image File"
            };

            if (saveDlg.ShowDialog() == true)
            {
                exporter.Export(saveDlg.FileName, _drawService.Canvas, Width, Height);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Export the currently draw canvas to a file
        /// </summary>
        private void Export(ICanvasExporter exporter)
        {
            if (exporter == null)
                return;

            //select save location
            var saveDlg = new SaveFileDialog()
            {
                FileName = "",
                Filter = "png Image|*.png",
                Title = "Save the diagram to an Image File"
            };

            if (saveDlg.ShowDialog() == true)
                exporter.Export(saveDlg.FileName, _drawService.Canvas,Width,Height);

        }