/// <summary> /// Enables the zoom frame and also cleans it up depending on the checkbox value. /// </summary> /// <param name="b"></param> public void CheckboxChanged(bool b) { _zoomCheckbox = b; if (_zoomCheckbox) { _trackBar.Enabled = true; _view.Get("ListView").Enabled = false; // Disable listview when zooming _zoomView = new ZoomView(); UpdateZoom(); _zoomView.Show(); } else if (!_zoomCheckbox) { _panel.Invalidate(); _trackBar.Enabled = false; _view.Get("ListView").Enabled = true; // Enable listview when not zooming _zoomView?.Dispose(); } }
public void HandleCheckBoxEvent(object sender, EventArgs e) { CheckBox checkBox = (CheckBox)sender; zoomCheckboxChecked = checkBox.Checked; view.Get(ProductGrid.PropertyEnum.Trackbar).Enabled = zoomCheckboxChecked; if (zoomCheckboxChecked) { if (zoomView == null) { zoomView = new ZoomView(); } zoomView?.Show(); } else if (!zoomCheckboxChecked) { zoomView?.Hide(); view.Get(ProductGrid.PropertyEnum.Panel).Invalidate(); } }