public ZoomTo(RdlViewer.RdlViewer viewer) { // // Required for Windows Form Designer support // InitializeComponent(); _Viewer = viewer; // set the intial value for magnification if (_Viewer.ZoomMode == ZoomEnum.FitPage) { cbMagnify.Text = "Fit Page"; } else if (_Viewer.ZoomMode == ZoomEnum.FitWidth) { cbMagnify.Text = "Fit Width"; } else if (_Viewer.Zoom == 1) { cbMagnify.Text = "Actual Size"; } else { string formatted = string.Format("{0:#0.##}", _Viewer.Zoom * 100); if (formatted[formatted.Length - 1] == '.') { formatted = formatted.Substring(0, formatted.Length - 2); } formatted = formatted + "%"; cbMagnify.Text = formatted; } }
public ZoomTo(RdlViewer.RdlViewer viewer) { // // Required for Windows Form Designer support // InitializeComponent(); _Viewer = viewer; // set the intial value for magnification if (_Viewer.ZoomMode == ZoomEnum.FitPage) cbMagnify.Text = "Fit Page"; else if (_Viewer.ZoomMode == ZoomEnum.FitWidth) cbMagnify.Text = "Fit Width"; else if (_Viewer.Zoom == 1) cbMagnify.Text = "Actual Size"; else { string formatted = string.Format("{0:#0.##}", _Viewer.Zoom * 100); if (formatted[formatted.Length-1] == '.') formatted = formatted.Substring(0, formatted.Length-2); formatted = formatted + "%"; cbMagnify.Text = formatted; } }