public ConvertPosition(ZoomPicBox picBox) : base(picBox) { }
/// <summary> /// Shows larger image. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// <param name="image">Image to be enlarged.</param> private void ShowLargeImage(object sender, MouseEventArgs e, Image image) { // zoom current image ZoomPicBox pb = new ZoomPicBox(); pb.Dock = DockStyle.Fill; pb.AutoScroll = true; pb.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High; pb.Image = image; pb.Zoom = 0.8f; pb.MouseWheel += new MouseEventHandler((sender_new, e_new) => { pb.Zoom += e_new.Delta > 0 ? 0.1f : -0.1f; }); // form to show large image Form imageWindow = new Form(); imageWindow.Width = 1280; imageWindow.Height = 768; imageWindow.Controls.Add(pb); imageWindow.ShowDialog(); }
public ClickToTileKeyConverter(ZoomPicBox picBox) { m_zoomPictBox = picBox; }