private void Partition_MouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button == System.Windows.Forms.MouseButtons.Right)
            {
                // contextMenuStrip1.Items[2].Enabled = vhd.footer.Changed;
                this.contextMenuStrip1.Show((sender as Control).PointToScreen(e.Location));
            }

            if (e.Button == System.Windows.Forms.MouseButtons.Left)
            {
                if (sender is BlackProgressBar)
                {
                    if (zoomform == null || zoomform.IsDisposed)
                    {
                        // (sender as Control).MouseLeave +=new EventHandler(PartitionRoundedPanel_MouseLeaveCancelZoom);
                        zoomform          = new ZoomOverlayForm();
                        zoomform.Location = new Point(0, PointToScreen(Location).Y - 100);
                        zoomform.Width    = Screen.PrimaryScreen.Bounds.Width;
                        zoomform.maximumX = (sender as Control).Width - 10;
                        zoomform.Image    = (sender as BlackProgressBar).BitArrayBarBitmapFull;
                    }

                    zoomform.offsetX = e.X;
                    if (zoomform.Visible)
                    {
                        zoomform.Invalidate(true);
                    }
                    else
                    {
                        zoomform.Show();
                    }
                }
            }
        }
Example #2
0
 private void VhdPartitionView_MouseLeave(object sender, EventArgs e)
 {
     if (zoomform != null)
     {
         zoomform.Close();
         zoomform = null;
     }
     Invalidate(true);
 }
 private void PartitionRoundedPanel_MouseLeave(object sender, EventArgs e)
 {
     // this.RectangleFillColor = RectangleFillColorWas;
     if (zoomform != null)
     {
         zoomform.Close();
         zoomform = null;
     }
     Invalidate(true);
 }