示例#1
0
        private void mcEditCopyModel_Click(object sender, System.EventArgs e)
        {
#if !DEMO
            MemoryStream ms = new MemoryStream();
            Metafile     mf = MetafileExporter.SaveMetafile(ms, this.pneEditor);

            // Copy to clipboard
            ClipboardMetafileHelper.PutEnhMetafileOnClipboard(this.Handle, mf);
#else
            MessageBox.Show("DEMO version doesn't have implemented Copy to Clipboard function!\nBuy a full version which is capable of Copying to Clipboard.", "Petri .NET Simulator 2.0 - Information", MessageBoxButtons.OK, MessageBoxIcon.Warning);
#endif
        }
示例#2
0
        private void mcFileExport_Click(object sender, System.EventArgs e)
        {
#if !DEMO
            sfdExportFile.FileName = "";

            if (DialogResult.OK == sfdExportFile.ShowDialog())
            {
                FileStream fs = File.Create(sfdExportFile.FileName);
                MetafileExporter.SaveMetafile(fs, this.pneEditor);

                fs.Close();
            }
#else
            MessageBox.Show("DEMO version doesn't have implemented Export function!\nBuy a full version which is capable of exporting models.", "Petri .NET Simulator 2.0 - Information", MessageBoxButtons.OK, MessageBoxIcon.Warning);
#endif
        }