Example #1
0
        private void toolBar_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
        {
            switch (this.toolBar.Buttons.IndexOf(e.Button))
            {
            case 0:
                if (this.CloseDelegate != null && this.CloseDelegate())
                {
                    this.imageControl.Image = null;
                    this.ImageWrapper       = null;
                }
                break;

            case 2:
                this.AutoFit = !this.autoFit;
                break;

            case 3:
                this.imageControl.SelectionActive = !this.imageControl.SelectionActive;
                e.Button.Pushed = !e.Button.Pushed;
                break;

            case 5:
                var flipRotateDialog = new FlipRotateWindow(this.ImageWrapper);
                flipRotateDialog.Show();
                break;

            case 6:
                var stretchResizeDialog = new StretchResizeWindow(this.ImageWrapper);
                stretchResizeDialog.Show();
                break;

            case 8:
                var window = new BasicFilterWindow(this.ImageWrapper, this.colorFilters[this.currentColorFilter].filter);
                window.ShowDialog(this);
                break;
            }
        }
Example #2
0
        private void menuItem_Image_FlipRotate_Click(object sender, EventArgs e)
        {
            var window = new FlipRotateWindow(this.imageComponent.ImageWrapper);

            window.ShowDialog(this);
        }