frmAbout.vb 2.3 KB
Newer Older
leaky114's avatar
21.12.3  
leaky114 已提交
1
Imports FSLib.App.SimpleUpdater
leaky114's avatar
leaky114 已提交
2

leaky114's avatar
leaky114 已提交
3
Public NotInheritable Class frmAbout
leaky114's avatar
leaky114 已提交
4

leaky114's avatar
leaky114 已提交
5
    Const GitWeb As String = "https://gitcode.net/leaky114/inventoraddin"
leaky114's avatar
leaky114 已提交
6

7

leaky114's avatar
leaky114 已提交
8
    Private Sub frmAbout_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
leaky114's avatar
leaky114 已提交
9 10 11 12 13 14 15 16 17
        ' 设置此窗体的标题。
        Dim ApplicationTitle As String
        If My.Application.Info.Title <> "" Then
            ApplicationTitle = My.Application.Info.Title
        Else
            ApplicationTitle = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
        End If
        Me.Text = String.Format("关于 {0}", ApplicationTitle)
        ' 初始化“关于”对话框显示的所有文字。
leaky114's avatar
21.12.3  
leaky114 已提交
18
        ' TODO: 在项目的“应用程序”窗格中自定义此应用程序的程序集信息
leaky114's avatar
leaky114 已提交
19
        '    属性对话框(在“项目”菜单下)。
leaky114's avatar
leaky114 已提交
20 21 22 23 24
        Me.lblProductName.Text = String.Format("产品 {0}", My.Application.Info.ProductName)
        Me.lblVersion.Text = String.Format("版本 {0}", My.Application.Info.Version.ToString)
        Me.lblCopyright.Text = String.Format("版权 {0}", My.Application.Info.Copyright)
        Me.lblCompanyName.Text = String.Format("公司 {0}", My.Application.Info.CompanyName)
        Me.txtDescription.Text = My.Application.Info.Description & vbCrLf & _
leaky114's avatar
leaky114 已提交
25
                                      vbCrLf & _
26
                                    My.Application.Info.DirectoryPath & "\" & My.Application.Info.AssemblyName & ".dll"
leaky114's avatar
leaky114 已提交
27 28 29 30 31 32

        '释放更新程序
        NewUpdater.CreateUpdate()

        NewUpdater.UpDater2(btnCheckUpdate)

leaky114's avatar
leaky114 已提交
33 34
    End Sub

leaky114's avatar
leaky114 已提交
35
    Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
leaky114's avatar
leaky114 已提交
36 37 38
        Me.Close()
    End Sub

leaky114's avatar
leaky114 已提交
39
    Private Sub btnCheckUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCheckUpdate.Click
leaky114's avatar
leaky114 已提交
40

leaky114's avatar
leaky114 已提交
41 42
        '启动更新程序
        NewUpdater.Update3()
leaky114's avatar
22.2.25  
leaky114 已提交
43

44 45 46 47
        'IsShowUpdateMsg = True
        'Dim frmupdate As New frmUpdate
        'frmupdate.ShowDialog()

leaky114's avatar
leaky114 已提交
48 49 50 51 52
        'If NewUpdater.CreateUpdate() = True Then
        'NewUpdater.Update3()
        ''End If
        Me.Close()

leaky114's avatar
leaky114 已提交
53
    End Sub
leaky114's avatar
leaky114 已提交
54

leaky114's avatar
leaky114 已提交
55
    Private Sub btnGit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGit.Click
leaky114's avatar
leaky114 已提交
56 57
        Process.Start(GitWeb)
    End Sub
leaky114's avatar
21.12.3  
leaky114 已提交
58
End Class