Inheritance: System.Windows.Forms.Form
Ejemplo n.º 1
0
        private void menuFileExport_Click(object sender, EventArgs e)
        {
            if (mesh != null)
            {
                FormExport export = new FormExport();

                string file = settings.OfdDirectory;

                if (!file.EndsWith("\\"))
                {
                    file += "\\";
                }

                file += settings.CurrentFile;

                export.ImageName = Path.ChangeExtension(file, ".png");

                if (export.ShowDialog() == DialogResult.OK)
                {
                    int  format   = export.ImageFormat;
                    int  size     = export.ImageSize;
                    bool compress = export.UseCompression;

                    var writer = new ImageWriter();

                    writer.Export(this.mesh, export.ImageName, format, size, compress);
                }
            }
        }
Ejemplo n.º 2
0
        private void menuFileExport_Click(object sender, EventArgs e)
        {
            if (mesh != null)
            {
                FormExport export = new FormExport();

                string file = settings.OfdDirectory;

                if (!file.EndsWith("\\"))
                {
                    file += "\\";
                }

                file += settings.CurrentFile;

                export.ImageName = Path.ChangeExtension(file, ".png");

                if (export.ShowDialog() == DialogResult.OK)
                {
                    int format = export.ImageFormat;
                    int size   = export.ImageSize;

                    if (format == 1)
                    {
                        EpsImage eps = new EpsImage();
                        eps.Export(this.mesh, export.ImageName, size);
                    }
                    else if (format == 2)
                    {
                        SvgImage svg = new SvgImage();
                        svg.Export(this.mesh, export.ImageName, size);
                    }
                    else
                    {
                        RasterImage img = new RasterImage();
                        img.ColorScheme = ColorManager.LightScheme();
                        img.Export(this.mesh, export.ImageName, size);
                    }
                }
            }
        }
Ejemplo n.º 3
0
        private void menuFileExport_Click(object sender, EventArgs e)
        {
            if (mesh != null)
            {
                FormExport export = new FormExport();

                string file = settings.OfdDirectory;

                if (!file.EndsWith("\\"))
                {
                    file += "\\";
                }

                file += settings.CurrentFile;

                export.ImageName = Path.ChangeExtension(file, ".png");

                if (export.ShowDialog() == DialogResult.OK)
                {
                    int format = export.ImageFormat;
                    int size = export.ImageSize;

                    if (format == 1)
                    {
                        EpsImage eps = new EpsImage();
                        eps.Export(this.mesh, export.ImageName, size);
                    }
                    else if (format == 2)
                    {
                        SvgImage svg = new SvgImage();
                        svg.Export(this.mesh, export.ImageName, size);
                    }
                    else
                    {
                        RasterImage img = new RasterImage();
                        img.ColorScheme = ColorManager.LightScheme();
                        img.Export(this.mesh, export.ImageName, size);
                    }
                }
            }
        }
Ejemplo n.º 4
0
        private void menuFileExport_Click(object sender, EventArgs e)
        {
            if (mesh != null)
            {
                FormExport export = new FormExport();

                string file = settings.OfdDirectory;

                if (!file.EndsWith("\\"))
                {
                    file += "\\";
                }

                file += settings.CurrentFile;

                export.ImageName = Path.ChangeExtension(file, ".png");

                if (export.ShowDialog() == DialogResult.OK)
                {
                    int format = export.ImageFormat;
                    int size = export.ImageSize;
                    bool compress = export.UseCompression;

                    var writer = new ImageWriter();

                    writer.Export(this.mesh, export.ImageName, format, size, compress);
                }
            }
        }