Process.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using CCWin;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Data;
  6. using System.Drawing;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Windows.Forms;
  10. namespace UAS_KanBan
  11. {
  12. public partial class Process : CCSkinMain
  13. {
  14. AutoSizeFormClass asc = new AutoSizeFormClass();
  15. DataHelper dh = new DataHelper();
  16. string Linecode;
  17. string Wccode;
  18. public Process(string LineCode,string WcCode)
  19. {
  20. InitializeComponent();
  21. Linecode = LineCode;
  22. Wccode = WcCode;
  23. }
  24. private void Process_Load(object sender, EventArgs e)
  25. {
  26. asc.controllInitializeSize(this);
  27. Refresh.Tick += Refresh_Tick;
  28. Refresh.Interval = Setting.RefreshRate * 1000;
  29. Refresh.Start();
  30. }
  31. private void Refresh_Tick(object sender, EventArgs e)
  32. {
  33. dh.ExecuteSql("select KBI_LINE_ZTL('"+Linecode+"','"+Wccode+"') from dual", "select");
  34. }
  35. private void Process_SizeChanged(object sender, EventArgs e)
  36. {
  37. asc.controlAutoSize(this);
  38. Line1.Size = new Size(2, BottomLine.Location.Y - TopLine.Location.Y);
  39. Line2.Size = new Size(2, BottomLine.Location.Y - TopLine.Location.Y);
  40. Line3.Size = new Size(2, BottomLine.Location.Y - TopLine.Location.Y);
  41. }
  42. private void Process_FormClosing(object sender, FormClosingEventArgs e)
  43. {
  44. Refresh.Stop();
  45. }
  46. }
  47. }