PageOtherAbout.xaml.vb 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. Public Class PageOtherAbout
  2. Private Shadows IsLoaded As Boolean = False
  3. Private Sub PageOtherAbout_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
  4. '重复加载部分
  5. PanBack.ScrollToHome()
  6. '非重复加载部分
  7. If IsLoaded Then Return
  8. IsLoaded = True
  9. ItemAboutPcl.Info = ItemAboutPcl.Info.Replace("%VERSION%", VersionDisplay).Replace("%VERSIONCODE%", VersionCode).Replace("%BRANCH%", CInt(BuildType))
  10. Using AgreementStream = Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("PCL.CommunistAgreement.txt")
  11. Using Reader As New StreamReader(AgreementStream, Encoding.UTF8)
  12. TextCommunistAgreement.Text = Reader.ReadToEnd()
  13. End Using
  14. End Using
  15. Using LicenceStream = Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("PCL.Licence.txt")
  16. Using Reader As New StreamReader(LicenceStream, Encoding.UTF8)
  17. TextBundledLicence.Text = Reader.ReadToEnd()
  18. End Using
  19. End Using
  20. If BuildType = BuildTypes.Debug Then
  21. BtnDonateDonate.Visibility = Visibility.Collapsed
  22. BtnDonateOutput.Visibility = Visibility.Visible
  23. End If
  24. End Sub
  25. Public Shared Sub CopyIdentify() Handles BtnDonateCopy.Click
  26. ClipboardSet(Identify)
  27. End Sub
  28. Private Sub BtnDonateCodeInput_Click() Handles BtnDonateInput.Click
  29. InputPotatoCode(False)
  30. End Sub
  31. Private Sub BtnDonateOutput_Click(sender As Object, e As EventArgs) Handles BtnDonateOutput.Click
  32. GeneratePotatoCode()
  33. End Sub
  34. Private Sub BtnAboutUpdate_Click(sender As Object, e As MouseButtonEventArgs) Handles BtnAboutUpdate.Click
  35. UpdateCheckByButton()
  36. End Sub
  37. End Class