private void DecodeOrientation() { Refresh(); Application.DoEvents(); try { if (rbProtriate.Checked) { _PrintOrientationLandscape = false; if (cmboPaperSize.SelectedItem == null) { PaperMetricsHaveChanged?.Invoke(_psets.PaperSize, _PrintOrientationLandscape); } else { PaperMetricsHaveChanged?.Invoke(_PaperSize, _PrintOrientationLandscape); } } else { _PrintOrientationLandscape = true; if (cmboPaperSize.SelectedItem == null) { PaperMetricsHaveChanged?.Invoke(_psets.PaperSize, _PrintOrientationLandscape); } else { PaperMetricsHaveChanged?.Invoke(_PaperSize, _PrintOrientationLandscape); } } } catch (Exception ex) { } Application.DoEvents(); }
private void cmboPaperSize_SelectedIndexChanged(object sender, EventArgs e) { Refresh(); Application.DoEvents(); try { _PaperSize = (System.Drawing.Printing.PaperSize)cmboPaperSize.SelectedItem; _psets.PaperSize = (System.Drawing.Printing.PaperSize)cmboPaperSize.SelectedItem; } catch (Exception ex) { } LogThis("Calling event handler with a papersize of " + _PaperSize.ToString()); PaperMetricsHaveChanged?.Invoke(_PaperSize, _PrintOrientationLandscape); Application.DoEvents(); }