Form1.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Drawing.Drawing2D;
  7. using System.Runtime.InteropServices;
  8. using System.Text;
  9. using System.Text.RegularExpressions;
  10. using System.Windows.Forms;
  11. using System.Windows.Forms.DataVisualization.Charting;
  12. using System.Web.ClientServices;
  13. using UAS_MES.CustomControl.DataGrid_View;
  14. using UAS_MES.DataOperate;
  15. using UAS_MES.PublicForm;
  16. using UAS_MES.PublicMethod;
  17. using System.Net;
  18. using System.IO;
  19. using System.Reflection;
  20. using System.Threading;
  21. using UAS_MES.CustomControl;
  22. using System.IO.Ports;
  23. using System.Net.Sockets;
  24. namespace UAS_MES
  25. {
  26. public partial class Form1 : Form
  27. {
  28. public Form1()
  29. {
  30. InitializeComponent();
  31. timer1.Interval = 1000;
  32. timer1.Tick += Timer1_Tick;
  33. }
  34. private void Form1_Load(object sender, EventArgs e)
  35. {
  36. document.Load(@"H:\PDFView4NET 5.0.1 WinForms Edition\SupportFiles\multicolumntextandimages.pdf");
  37. pageView.PageDisplayLayout = 0;
  38. timer1.Start();
  39. }
  40. private void Timer1_Tick(object sender, EventArgs e)
  41. {
  42. pageView.GoToNextPage();
  43. if (document.PageCount - 1 == pageView.PageNumber)
  44. {
  45. pageView.GoToFirstPage();
  46. //设置滚动的范围
  47. //pageView.ScrollPosition;
  48. Thread.Sleep(1000);
  49. }
  50. }
  51. }
  52. }