Example #1
0
        private void RightClickMenuItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            rightClickMenu.Hide();
            switch (e.ClickedItem.Text)
            {
            case "Save Image":
                SaveFileDialog savefile = new SaveFileDialog();
                savefile.FileName = "ScottPlot.png";
                savefile.Filter   = "PNG Files (*.png)|*.png;*.png";
                savefile.Filter  += "|JPG Files (*.jpg, *.jpeg)|*.jpg;*.jpeg";
                savefile.Filter  += "|BMP Files (*.bmp)|*.bmp;*.bmp";
                savefile.Filter  += "|TIF files (*.tif, *.tiff)|*.tif;*.tiff";
                savefile.Filter  += "|All files (*.*)|*.*";
                if (savefile.ShowDialog() == DialogResult.OK)
                {
                    plt.SaveFig(savefile.FileName);
                }
                break;

            case "Settings":
                var formSettings = new UserControls.FormSettings(plt);
                formSettings.ShowDialog();
                Render();
                break;

            case "Help":
                var formHelp = new UserControls.FormHelp();
                formHelp.ShowDialog();
                break;

            default:
                throw new NotImplementedException();
            }
        }
Example #2
0
        private void RightClickMenuItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            rightClickMenu.Hide();
            switch (e.ClickedItem.Text)
            {
            case "Save Image":
                Tools.SaveImageDialog(plt);
                break;

            case "Settings":
                var formSettings = new UserControls.FormSettings(plt);
                formSettings.ShowDialog();
                break;

            case "Help":
                var formHelp = new UserControls.FormHelp();
                formHelp.ShowDialog();
                break;

            default:
                throw new NotImplementedException();
            }
        }