Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (transformationPopup.IsDisposed)
            {
                transformationPopup = new TransformationPopup();
                transformationPopup.transformCanceled += TransformationPopupOnTransformCanceled;
            }

            transformationPopup.percent = 0;
            transformationPopup.StartPosition = FormStartPosition.Manual;
            transformationPopup.Location = new Point(this.Location.X + (this.Width - transformationPopup.Width) / 2, this.Location.Y + (this.Height - transformationPopup.Height) / 2);
            transformationPopup.Show(this);
            this.Enabled = false;
            invertImageBackgroundWorker.RunWorkerAsync();
        }
Пример #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            DialogResult result = colorDialog.ShowDialog();
            // See if user pressed ok.
            if (result == DialogResult.OK)
            {
                // Set form background to the selected color.

                if (transformationPopup.IsDisposed)
                {
                    transformationPopup = new TransformationPopup();
                    transformationPopup.transformCanceled += TransformationPopupOnTransformCanceled;
                }

                transformationPopup.percent = 0;
                transformationPopup.StartPosition = FormStartPosition.Manual;
                transformationPopup.Location = new Point(this.Location.X + (this.Width - transformationPopup.Width) / 2, this.Location.Y + (this.Height - transformationPopup.Height) / 2);
                transformationPopup.Show(this);
                this.Enabled = false;
                filterColorImageBackgroundWorker.RunWorkerAsync();
            }
        }
Пример #3
0
        private void brightnessTrackbar_MouseUp(object sender, MouseEventArgs e)
        {
            if (transformationPopup.IsDisposed)
            {
                transformationPopup = new TransformationPopup();
                transformationPopup.transformCanceled += TransformationPopupOnTransformCanceled;
            }

            transformationPopup.percent = 0;
            transformationPopup.StartPosition = FormStartPosition.Manual;
            transformationPopup.Location = new Point(this.Location.X + (this.Width - transformationPopup.Width) / 2, this.Location.Y + (this.Height - transformationPopup.Height) / 2);
            transformationPopup.Show(this);
            this.Enabled = false;
            brightnessImageBackgroundWorker.RunWorkerAsync(brightnessTrackbar.Value);
        }