Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
         }
     }
 }
Ejemplo n.º 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);
                }
            }
        }
Ejemplo n.º 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();
                }
            }
        }
Ejemplo n.º 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();
         }
     }
 }