예제 #1
0
        private void _exportToImageButton_Click(Object sender, EventArgs e)
        {
            Canvas activeCanvas = _tabbedMdi.ActiveCanvas;

            if (activeCanvas != null)
            {
                Control schema = activeCanvas.Schema;

                using (Bitmap bmp = new Bitmap(schema.Width, schema.Height))
                {
                    NuGenControlPaint.DrawToBitmap(schema, bmp);
                    Application.DoEvents();

                    using (NuGenSmoothImageExportBlock imageExport = new NuGenSmoothImageExportBlock())
                    {
                        Application.DoEvents();
                        imageExport.ThumbnailMode = NuGenThumbnailMode.LoupeView;
                        imageExport.Images.Add(bmp);

                        StringCollection exportPathCollection = Settings.Default.MainForm_ExportPathCollection;

                        if (exportPathCollection != null)
                        {
                            foreach (String path in exportPathCollection)
                            {
                                imageExport.ExportPathCollection.Add(path);
                            }
                        }

                        imageExport.ShowDialog(this);
                        Settings.Default.MainForm_ExportPathCollection = imageExport.ExportPathCollection;
                    }
                }
            }
        }
예제 #2
0
        private void _exportToImageButton_Click(Object sender, EventArgs e)
        {
            Canvas activeCanvas = _tabbedMdi.ActiveCanvas;

            if (activeCanvas != null)
            {
                Control schema = activeCanvas.Schema;

                using (Bitmap bmp = new Bitmap(schema.Width, schema.Height))
                {
                    NuGenControlPaint.DrawToBitmap(schema, bmp);
                    NuGenSmoothImageExportBlock imageExport = new NuGenSmoothImageExportBlock();
                    imageExport.ThumbnailMode = NuGenThumbnailMode.LoupeView;
                    imageExport.Images.Add(bmp);
                    imageExport.ShowDialog(this);
                }
            }
        }