Beispiel #1
0
 private void btnImageEffects_Click(object sender, EventArgs e)
 {
     using (ImageEffectsForm imageEffectsForm = new ImageEffectsForm(ShareXResources.Logo, TaskSettings.ImageSettings.ImageEffects))
     {
         if (imageEffectsForm.ShowDialog() == DialogResult.OK)
         {
             TaskSettings.ImageSettings.ImageEffects = imageEffectsForm.Effects;
         }
     }
 }
Beispiel #2
0
        public static void OpenImageEffects()
        {
            string filePath = ImageHelpers.OpenImageFileDialog();

            if (!string.IsNullOrEmpty(filePath))
            {
                Image            img  = ImageHelpers.LoadImage(filePath);
                ImageEffectsForm form = new ImageEffectsForm(img);
                form.EditorMode();
                form.Show();
            }
        }
Beispiel #3
0
        public static Image AddImageEffects(Image img, TaskSettings taskSettings)
        {
            if (taskSettings.ImageSettings.ShowImageEffectsWindowAfterCapture)
            {
                using (ImageEffectsForm imageEffectsForm = new ImageEffectsForm(img, taskSettings.ImageSettings.ImageEffects))
                {
                    if (imageEffectsForm.ShowDialog() == DialogResult.OK)
                    {
                        taskSettings.ImageSettings.ImageEffects = imageEffectsForm.Effects;
                    }
                }
            }

            using (img)
            {
                return(ImageEffectManager.ApplyEffects(img, taskSettings.ImageSettings.ImageEffects));
            }
        }