Beispiel #1
0
 private void backgroundPropertiesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ResizePreviewForm resizeForm = new ResizePreviewForm(previewForm.Preview.Background.Width,
                                                          previewForm.Preview.Background.Height);
     if (resizeForm.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
         previewForm.Preview.ResizeBackground(resizeForm.Width, resizeForm.Height);
     }
 }
Beispiel #2
0
        private void backgroundPropertiesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ResizePreviewForm resizeForm = new ResizePreviewForm(previewForm.Preview.Background.Width, previewForm.Preview.Background.Height);

            if (resizeForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                previewForm.Preview.ResizeBackground(resizeForm.Width, resizeForm.Height);
            }
        }
Beispiel #3
0
 private void backgroundPropertiesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ResizePreviewForm resizeForm = new ResizePreviewForm(previewForm.Preview.Background.Width,
                                                          previewForm.Preview.Background.Height);
     if (resizeForm.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
         if (resizeForm.Height > 10 && resizeForm.Width > 10)
         {
             previewForm.Preview.ResizeBackground(resizeForm.Width, resizeForm.Height);
             previewForm.Refresh();
         }
         else
         {
             MessageBox.Show("An invalid image size was specified!", "Invalid Size", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
         }
     }
 }
Beispiel #4
0
        private void backgroundPropertiesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ResizePreviewForm resizeForm = new ResizePreviewForm(previewForm.Preview.Background.Width,
                                                                 previewForm.Preview.Background.Height);

            if (resizeForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                if (resizeForm.Height > 10 && resizeForm.Width > 10)
                {
                    previewForm.Preview.ResizeBackground(resizeForm.Width, resizeForm.Height);
                    previewForm.Refresh();
                }
                else
                {
                    MessageBox.Show("An invalid image size was specified!", "Invalid Size", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
                }
            }
        }
Beispiel #5
0
        private void backgroundPropertiesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ResizePreviewForm resizeForm = new ResizePreviewForm(previewForm.Preview.Background.Width,
                                                                 previewForm.Preview.Background.Height);

            if (resizeForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                if (resizeForm.Height > 10 && resizeForm.Width > 10)
                {
                    previewForm.Preview.ResizeBackground(resizeForm.Width, resizeForm.Height);
                    previewForm.Refresh();
                }
                else
                {
                    //messageBox Arguments are (Text, Title, No Button Visible, Cancel Button Visible)
                    MessageBoxForm.msgIcon = SystemIcons.Error;                     //this is used if you want to add a system icon to the message form.
                    var messageBox = new MessageBoxForm("An invalid image size was specified!", "Invalid Size", false, true);
                    messageBox.ShowDialog();
                }
            }
        }
Beispiel #6
0
 private void backgroundPropertiesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ResizePreviewForm resizeForm = new ResizePreviewForm(previewForm.Preview.Background.Width,
                                                          previewForm.Preview.Background.Height);
     if (resizeForm.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
         if (resizeForm.Height > 10 && resizeForm.Width > 10)
         {
             previewForm.Preview.ResizeBackground(resizeForm.Width, resizeForm.Height);
             previewForm.Refresh();
         }
         else
         {
             //messageBox Arguments are (Text, Title, No Button Visible, Cancel Button Visible)
             MessageBoxForm.msgIcon = SystemIcons.Error; //this is used if you want to add a system icon to the message form.
             var messageBox = new MessageBoxForm("An invalid image size was specified!", "Invalid Size", false, true);
             messageBox.ShowDialog();
         }
     }
 }