public static ucToolBar GetInstance() { if (frm == null) { frm = new ucToolBar(); } return(frm); }
private void frmScreenShot_MouseUp(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { isDowned = false; RectReady = true; ucToolBar frm = ucToolBar.GetInstance(); int x = Rect.X + Rect.Width - frm.Width; int y = Rect.Y + Rect.Height + 3; if (lb_shot.Visible == true) { frm.Location = new Point(x, y); frm.Height = 20; frm.ShowDialog(); } this.Opacity = 0d; if (frm.DialogResult == DialogResult.OK) { cutImage(); } this.Opacity = 0.30d; } }