Example #1
0
        private void useDirect2DPreviewRenderingToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var msg = MessageBox.Show("Preview will be restarted. This is a system-wide change that will apply to all previews. Are you sure you want to do this?", "Change Preview", MessageBoxButtons.YesNo);

            if (msg == System.Windows.Forms.DialogResult.Yes)
            {
                Properties.Settings settings = new Properties.Settings();
                settings.UseGDIRendering = !useDirect2DPreviewRenderingToolStripMenuItem.Checked;
                settings.Save();
            }
        }
Example #2
0
        private void useDirect2DPreviewRenderingToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //messageBox Arguments are (Text, Title, No Button Visible, Cancel Button Visible)
            MessageBoxForm.msgIcon = SystemIcons.Question;             //this is used if you want to add a system icon to the message form.
            var messageBox = new MessageBoxForm("Preview will be restarted. This is a system-wide change that will apply to all previews. Are you sure you want to do this?", "Change Preview", true, false);

            messageBox.ShowDialog();
            if (messageBox.DialogResult == DialogResult.OK)
            {
                Properties.Settings settings = new Properties.Settings();
                settings.UseGDIRendering = !useDirect2DPreviewRenderingToolStripMenuItem.Checked;
                settings.Save();
            }
        }