/// <summary> /// /// </summary> /// <param name="parent"></param> public override DialogResult Show(Form parent = null, bool setup = false) { if (fm == null) { fm = new RotateForm(this); fm.host = Host; fm.Text = DisplayName; fm.FormBorderStyle = FormBorderStyle.FixedToolWindow; fm.MaximizeBox = false; fm.MinimizeBox = false; fm.ShowIcon = false; fm.ShowInTaskbar = false; fm.StartPosition = FormStartPosition.CenterParent; if (Params.Count == 0) { InitParams(); } if (Params.ContainsKey("Mode")) { fm.SetMode("Mode", Params["Mode"]); } if (Params.ContainsKey("Angle")) { fm.SetAngle("Angle", Params["Angle"]); } if (Params.ContainsKey("KeepSize")) { fm.SetKeepSize("KeepSize", Params["KeepSize"]); } Translate(fm); } var result = fm.ShowDialog(); if (result == DialogResult.OK) { _success = true; Params["Mode"] = fm.GetMode("Mode"); Params["Angle"] = fm.GetAngle("Angle"); Params["KeepSize"] = fm.GetKeepSize("KeepSize"); if (!setup) { ImgDst = Apply(ImgSrc); } } else { _success = false; } if (fm != null) { fm.Dispose(); fm = null; } return(result); }
private void zToolStripMenuItem_Click(object sender, EventArgs e) { RotateForm form = new RotateForm(); form.ShowDialog(); utils.RotateZ(form.Angle); pictureBox1.Invalidate(); }