Ingen beskrivning
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

考勤打卡主機.vb 1.8KB

1234567891011121314151617181920212223242526
  1. Public Class 考勤打卡主機
  2. ReadOnly QRCODE As DotNetBarcode = New DotNetBarcode
  3. Private Sub 考勤打卡主機_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  4. 重讀_bt.PerformClick() : 讀秒.Enabled = True
  5. End Sub
  6. Private Sub 考勤打卡主機_Closed(sender As Object, e As EventArgs) Handles MyBase.Closed
  7. 讀秒.Enabled = False : LoginForm1.Close()
  8. End Sub
  9. Private Sub 讀秒_Tick(sender As Object, e As EventArgs) Handles 讀秒.Tick
  10. If Label2.Text = "5 S" Then : Label2.Text = "4 S" : 時間_DTP.Value = 時間_DTP.Value.AddSeconds(1)
  11. ElseIf Label2.Text = "4 S" Then : Label2.Text = "3 S" : 時間_DTP.Value = 時間_DTP.Value.AddSeconds(1)
  12. ElseIf Label2.Text = "3 S" Then : Label2.Text = "2 S" : 時間_DTP.Value = 時間_DTP.Value.AddSeconds(1)
  13. ElseIf Label2.Text = "2 S" Then : Label2.Text = "1 S" : 時間_DTP.Value = 時間_DTP.Value.AddSeconds(1)
  14. ElseIf Label2.Text = "1 S" Then : Label2.Text = "0 S" : 時間_DTP.Value = 時間_DTP.Value.AddSeconds(1)
  15. ElseIf Label2.Text = "0 S" Then : Label2.Text = "5 S" : 時間_DTP.Value = 時間_DTP.Value.AddSeconds(1) : 重讀_bt.PerformClick() : End If
  16. End Sub
  17. Private Sub 重讀_bt_Click(sender As Object, e As EventArgs) Handles 重讀_bt.Click
  18. QRCode_pb.Image = Nothing
  19. QRCode_pb.Image = New Bitmap(QRCode_pb.Width, QRCode_pb.Height)
  20. Dim GP As Graphics = Graphics.FromImage(QRCode_pb.Image)
  21. QRCODE.Type = DotNetBarcode.Types.QRCode : QRCODE.QRQuitZone = 0
  22. Dim 驗證 As String = Strings.Format(日期_DTP.Value, "yyyy/MM/dd") & "-" & Strings.Format(時間_DTP.Value, "HH:mm:ss") & ",gcmsmart"
  23. QRCODE.QRWriteBar(驗證, 5, 5, 17, GP)
  24. QRCode_pb.SizeMode = 4
  25. End Sub
  26. End Class