private void applyEffectButton_Click(object sender, EventArgs e) { closingFromCode = true; if (flipbookReference != null && checkBox3.Checked) { Rectangle oldSelection = workspaceManager.Selection; workspaceManager.SuspendDrawing = true; workspaceManager.CancelEffect(); Bitmap oldSource = workspaceManager.Source; workspaceManager.Source = flipbookReference; workspaceManager.InitializeWorkspace(); workspaceManager.Selection = new Rectangle(0, 0, flipbookReference.Width, flipbookReference.Height); updateEffect(); workspaceManager.CommitEffect(); workspaceManager.Source = oldSource; workspaceManager.SuspendDrawing = false; workspaceManager.Selection = new Rectangle(-1, -1, -1, -1); workspaceManager.InitializeWorkspace(); workspaceManager.Selection = oldSelection; updateEffect(); workspaceManager.CommitEffect(); //workspaceManager.Redraw(); } else { workspaceManager.CommitEffect(); } this.Close(); }
private void applyEffectButton_Click(object sender, EventArgs e) { closingFromCode = true; workspace.CommitEffect(); this.Close(); }