diff --git a/AssemblyInfo.vb b/AssemblyInfo.vb index d6c82e7bf6ece9b4c544677ac182949ccfd1e9f3..283481591ad33a684bdf52ccad3ea85112a73e44 100644 --- a/AssemblyInfo.vb +++ b/AssemblyInfo.vb @@ -28,5 +28,5 @@ Imports System.Runtime.InteropServices ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: - - \ No newline at end of file + + \ No newline at end of file diff --git a/CHANGELOG b/CHANGELOG index d9be25f9b383e7caf54a3570bb4bc0b53074f8a4..2e479293cdb563ce7f8d51e45f9cad8778ca80e4 100644 Binary files a/CHANGELOG and b/CHANGELOG differ diff --git a/Form/frmAbout.vb b/Form/frmAbout.vb index 2eb8cb75c49a3cb468df041d8ba466ab5b6799f9..83e8468a98596b114c98e92a6ff45dc1fad169a3 100644 --- a/Form/frmAbout.vb +++ b/Form/frmAbout.vb @@ -42,9 +42,13 @@ Public NotInheritable Class frmAbout 'NewUpdater.UpDater2(True) - IsShowUpdateMsg = True - Dim frmupdate As New frmUpdate - frmupdate.ShowDialog() + 'IsShowUpdateMsg = True + 'Dim frmupdate As New frmUpdate + 'frmupdate.ShowDialog() + + If NewUpdater.CreateInAIUpdate() = True Then + NewUpdater.Update3() + End If End Sub Private Sub btnGit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGit.Click diff --git a/Module/NewUpdater.vb b/Module/NewUpdater.vb index 94245855fb9c408c5b845fe511992d411433e0b3..472b2948694e08a1b3d9ce2291018dba3f2f9098 100644 --- a/Module/NewUpdater.vb +++ b/Module/NewUpdater.vb @@ -4,7 +4,7 @@ Module NewUpdater Const InNewVisonTXT As String = "\\Likai-pc\发行版\2011\NewVersion.txt" Const GitWeb As String = "https://codechina.csdn.net/leaky114/inventoraddin" - Public Sub UpDater1() + Public Sub UpDate1() Try ' Updater.CheckUpdateSimple("\\likai-pc\发行版\更新包\{0}", "update.xml") @@ -32,7 +32,7 @@ Module NewUpdater End Try End Sub - Public Sub UpDater2(ByVal IsPutOutMsg As Boolean) + Public Sub UpDate2(ByVal IsPutOutMsg As Boolean) Try Dim fileReader As System.IO.StreamReader @@ -90,4 +90,42 @@ Module NewUpdater Return ShortVersion End Function + Public Function CreateInAIUpdate() As Boolean + Dim path As String = My.Application.Info.DirectoryPath & "\InAIUpdate.exe" '文件释放路径 + Dim resources As System.Resources.ResourceManager = My.Resources.ResourceManager + Dim b() As Byte = resources.GetObject("InAIUpdate") + Dim s As IO.Stream + Try + s = IO.File.Create(path) + s.Write(b, 0, b.Length) + s.Close() + 'MessageBox.Show("资源释放成功") + Return True + Catch ex As Exception + 'MessageBox.Show("资源释放失败!Result=" + ex.Message) + End Try + End Function + + Public Sub Update3() + Try + Dim path As String = My.Application.Info.DirectoryPath & "\InAIUpdate.exe" '文件释放路径 + + Dim DisplayVersion As String + DisplayVersion = ThisApplication.SoftwareVersion.DisplayVersion + + Dim MyVersion As String = _ + My.Application.Info.Version.Major & "." & _ + My.Application.Info.Version.Minor & "." & _ + Format(My.Application.Info.Version.Build, "00") & "." & _ + Format(My.Application.Info.Version.Revision, "00") + + Dim arguments As String + arguments = DisplayVersion & " " & MyVersion + + Process.Start(path, arguments) + Catch ex As Exception + + End Try + + End Sub End Module \ No newline at end of file diff --git a/My Project/Resources.Designer.vb b/My Project/Resources.Designer.vb index 1e81fbd6e1b3eccf108be1296e75e5aa6d75e211..0f2a5529f0ae03dc340c75adcc367fb195398992 100644 --- a/My Project/Resources.Designer.vb +++ b/My Project/Resources.Designer.vb @@ -60,6 +60,16 @@ Namespace My.Resources End Set End Property + ''' + ''' 查找 System.Byte[] 类型的本地化资源。 + ''' + Friend ReadOnly Property InAIUpdate() As Byte() + Get + Dim obj As Object = ResourceManager.GetObject("InAIUpdate", resourceCulture) + Return CType(obj,Byte()) + End Get + End Property + ''' ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 ''' diff --git a/My Project/Resources.resx b/My Project/Resources.resx index e9b4a699c31d654b5bdef7f6157d90e5b2b39f97..b44bd1a59b59bc87c6a2ef647eaee616f395b149 100644 --- a/My Project/Resources.resx +++ b/My Project/Resources.resx @@ -117,6 +117,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\InAIUpdate.exe;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + ..\Resources\inventor.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -238,7 +242,6 @@ ..\Resources\微信.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\快速打开161624 .ICO;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/Resources/InAIUpdate.exe b/Resources/InAIUpdate.exe new file mode 100644 index 0000000000000000000000000000000000000000..16b47d209e9c81ccfe196f069ad2a16026522340 Binary files /dev/null and b/Resources/InAIUpdate.exe differ diff --git a/StandardAddInServer.vb b/StandardAddInServer.vb index 2c3c236165fa2832e7d980f70b69a96a60c55505..c5412b9a688bcf52e3f91bb92ad600e9714b2b22 100644 Binary files a/StandardAddInServer.vb and b/StandardAddInServer.vb differ