| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Drawing;
- using System.Data;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using O2S.Components.PDFView4NET;
- namespace UAS_MES.CustomControl
- {
- public partial class PDFOperater : UserControl
- {
- private PDFPageView PageView1;
- public PDFPageView PageView
- {
- get
- {
- return PageView1;
- }
- set
- {
- PageView1 = value;
- }
- }
- public PDFOperater()
- {
- InitializeComponent();
- for (int i = 1; i <= 20; i++)
- {
- ZoomComBox.Items.Add(i * 10);
- }
- }
- private void ZoomComBox_SelectedIndexChanged(object sender, EventArgs e)
- {
- PageView1.Zoom = double.Parse(ZoomComBox.Text);
- }
- private void ZoomComBox_KeyDown(object sender, KeyEventArgs e)
- {
- if (e.KeyCode == Keys.Enter)
- {
- PageView1.Zoom = double.Parse(ZoomComBox.Text);
- }
- }
- }
- }
|