From fd325722595ca46db658ddd56d2f35767badcea6 Mon Sep 17 00:00:00 2001 From: leaky114 Date: Fri, 27 May 2022 16:59:36 +0800 Subject: [PATCH] =?UTF-8?q?22.5.27=E6=96=B0=E5=A2=9E=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E5=BA=8F=E5=8F=B7=E6=97=B6=E9=A2=9C=E8=89=B2=E6=8C=87=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AssemblyInfo.vb | 4 +- CHANGELOG | Bin 1940 -> 1998 bytes Form/frmAbout.vb | 16 ++++-- Form/frmAutoPartNumber.Designer.vb | 4 +- Form/frmAutoPartNumber.vb | 3 +- Form/frmInventoryCoding.vb | 2 +- Form/frmQuitOpen.Designer.vb | 12 ++--- Form/frmQuitOpen.vb | 13 ++++- Form/frmUpdate.vb | 2 +- Module/Inventorbasic.vb | 83 +++++++++++++++++++---------- Module/NewUpdater.vb | 21 ++++---- StandardAddInServer.vb | Bin 280604 -> 280752 bytes 12 files changed, 105 insertions(+), 55 deletions(-) diff --git a/AssemblyInfo.vb b/AssemblyInfo.vb index 27d6668..79adb2d 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 b6091048362b6d38a8a81403821e1816396f9315..ce6e8c4a547c43f8ce1648dae18f49778d98dcba 100644 GIT binary patch delta 79 zcmbQje~#bn|33wWFKHW6pQc`q=VjnxFl5kUFakn722(K0oB<>n&7jQ?%djDJUc`pf bUvd3$--ExU&Y4lv#GY(b36kH))4>h^*1#B3 delta 21 dcmX@dKZT#?|33wWFKHW6pQc`q-{{uC4ghaU3LgLf diff --git a/Form/frmAbout.vb b/Form/frmAbout.vb index 746dc62..26e06f4 100644 --- a/Form/frmAbout.vb +++ b/Form/frmAbout.vb @@ -1,4 +1,4 @@ -Imports FSLib.App.SimpleUpdater +'Imports FSLib.App.SimpleUpdater Public NotInheritable Class frmAbout @@ -26,9 +26,19 @@ Public NotInheritable Class frmAbout My.Application.Info.DirectoryPath & "\" & My.Application.Info.AssemblyName & ".dll" '释放更新程序 - NewUpdater.CreateUpdate() + NewUpdater.CreateUpdateExe() - NewUpdater.UpDater2(btnCheckUpdate) + '检查释放有新版本 + Select Case NewUpdater.CheckNewVesion() + Case "New" + With btnCheckUpdate + .Text = "当前为最新版" + .Visible = False + End With + + Case Else + btnCheckUpdate.Text = "检查到新版" & NewVersion + End Select End Sub diff --git a/Form/frmAutoPartNumber.Designer.vb b/Form/frmAutoPartNumber.Designer.vb index b34654f..b7fb698 100644 --- a/Form/frmAutoPartNumber.Designer.vb +++ b/Form/frmAutoPartNumber.Designer.vb @@ -102,8 +102,8 @@ Partial Class frmAutoPartNumber ' Me.lvwFile.AllowDrop = True Me.lvwFile.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.lvwFile.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.chOriginalFileName, Me.chType, Me.chNewFileName, Me.chFolder}) Me.lvwFile.FullRowSelect = True Me.lvwFile.Location = New System.Drawing.Point(13, 12) diff --git a/Form/frmAutoPartNumber.vb b/Form/frmAutoPartNumber.vb index 32903d5..44484ee 100644 --- a/Form/frmAutoPartNumber.vb +++ b/Form/frmAutoPartNumber.vb @@ -75,7 +75,8 @@ Public Class frmAutoPartNumber 999: Next - MsgBox("自动命名图号完成", MsgBoxStyle.Information + MsgBoxStyle.OkOnly, "自动命名图号") + SetStatusBarText("自动命名图号完成!") + 'MsgBox("自动命名图号完成", MsgBoxStyle.Information + MsgBoxStyle.OkOnly, "自动命名图号") btnStart.Enabled = True Catch ex As Exception diff --git a/Form/frmInventoryCoding.vb b/Form/frmInventoryCoding.vb index 4059d95..8e4e731 100644 --- a/Form/frmInventoryCoding.vb +++ b/Form/frmInventoryCoding.vb @@ -4,10 +4,10 @@ Imports Inventor.SelectTypeEnum Imports Inventor.DocumentTypeEnum Imports Inventor Imports Microsoft.Office.Interop +Imports stdole Public Class frmInventoryCoding - Private Sub btnLoadFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoadFile.Click btnLoadFile.Enabled = False diff --git a/Form/frmQuitOpen.Designer.vb b/Form/frmQuitOpen.Designer.vb index c039a73..9644054 100644 --- a/Form/frmQuitOpen.Designer.vb +++ b/Form/frmQuitOpen.Designer.vb @@ -31,7 +31,7 @@ Partial Class frmQuitOpen 'OK_Button ' Me.OK_Button.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.OK_Button.Location = New System.Drawing.Point(520, 136) + Me.OK_Button.Location = New System.Drawing.Point(667, 296) Me.OK_Button.Name = "OK_Button" Me.OK_Button.Size = New System.Drawing.Size(75, 28) Me.OK_Button.TabIndex = 2 @@ -41,7 +41,7 @@ Partial Class frmQuitOpen ' Me.Cancel_Button.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Cancel_Button.DialogResult = System.Windows.Forms.DialogResult.Cancel - Me.Cancel_Button.Location = New System.Drawing.Point(600, 136) + Me.Cancel_Button.Location = New System.Drawing.Point(747, 296) Me.Cancel_Button.Name = "Cancel_Button" Me.Cancel_Button.Size = New System.Drawing.Size(75, 28) Me.Cancel_Button.TabIndex = 3 @@ -50,7 +50,8 @@ Partial Class frmQuitOpen 'lvwFileListView ' Me.lvwFileListView.AllowColumnReorder = True - Me.lvwFileListView.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Me.lvwFileListView.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.lvwFileListView.AutoArrange = False Me.lvwFileListView.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1}) @@ -58,7 +59,7 @@ Partial Class frmQuitOpen Me.lvwFileListView.Location = New System.Drawing.Point(12, 12) Me.lvwFileListView.MultiSelect = False Me.lvwFileListView.Name = "lvwFileListView" - Me.lvwFileListView.Size = New System.Drawing.Size(663, 118) + Me.lvwFileListView.Size = New System.Drawing.Size(810, 266) Me.lvwFileListView.Sorting = System.Windows.Forms.SortOrder.Ascending Me.lvwFileListView.TabIndex = 37 Me.lvwFileListView.UseCompatibleStateImageBehavior = False @@ -73,11 +74,10 @@ Partial Class frmQuitOpen ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(687, 176) + Me.ClientSize = New System.Drawing.Size(834, 336) Me.Controls.Add(Me.lvwFileListView) Me.Controls.Add(Me.OK_Button) Me.Controls.Add(Me.Cancel_Button) - Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "frmQuitOpen" diff --git a/Form/frmQuitOpen.vb b/Form/frmQuitOpen.vb index e94bc85..d45cc5f 100644 --- a/Form/frmQuitOpen.vb +++ b/Form/frmQuitOpen.vb @@ -9,9 +9,18 @@ Public Class frmQuitOpen Private Sub OK_Button_Click(sender As System.Object, e As System.EventArgs) Handles OK_Button.Click If lvwFileListView.SelectedItems.Count <> 0 Then - ThisApplication.Documents.Open(lvwFileListView.SelectedItems(0).Text) + 'ThisApplication.Documents.Open(lvwFileListView.SelectedItems(0).Text) + Process.Start(lvwFileListView.SelectedItems(0).Text) End If Me.DialogResult = System.Windows.Forms.DialogResult.OK - me.close + Me.Close() + End Sub + + Private Sub lvwFileListView_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lvwFileListView.SelectedIndexChanged + If lvwFileListView.SelectedItems.Count <> 0 Then + 'ThisApplication.Documents.Open(lvwFileListView.SelectedItems(0).Text) + Process.Start(lvwFileListView.SelectedItems(0).Text) + End If + Me.Close() End Sub End Class diff --git a/Form/frmUpdate.vb b/Form/frmUpdate.vb index c909f8a..f0e1781 100644 --- a/Form/frmUpdate.vb +++ b/Form/frmUpdate.vb @@ -1,5 +1,5 @@ Imports System.Windows.Forms -Imports FSLib.App.SimpleUpdater +'Imports FSLib.App.SimpleUpdater Imports System.IO Public Class frmUpdate diff --git a/Module/Inventorbasic.vb b/Module/Inventorbasic.vb index c37153c..1270684 100644 --- a/Module/Inventorbasic.vb +++ b/Module/Inventorbasic.vb @@ -1351,37 +1351,66 @@ Module InventorBasic partslistrow.Item(1).Value = 0 End If Next - ' - ' '点击每个序号组 - ' Dim oBalloon As Balloon - ' For i = 1 To oActiveSheet.PartsLists.Item(1).PartsListRows.Count - ' oBalloon = ThisApplication.CommandManager.Pick(kDrawingBalloonFilter, "选择引出序号") - ' '遍历序号组中的序号,不为0就设置序号,并加1,设置下一个,有序号则跳过 - ' For Each oBalloonValueSet As BalloonValueSet In oBalloon.BalloonValueSets - ' If oBalloonValueSet.Value = 0 Then - ' oBalloonValueSet.Value = i - ' i = i + 1 - ' End If - ' Next - ' '多加的1要减去 - ' i = i - 1 - ' Next + + '获取当前balloon的textstyle + Dim OldBalloonTextStyl As String = oDrawingDocument.StylesManager.ActiveStandardStyle.ActiveObjectDefaults.BalloonStyle.TextStyle.Name + + '获取当前balloonstyle + Dim oActiveBalloonStyle As BalloonStyle = oDrawingDocument.StylesManager.ActiveStandardStyle.ActiveObjectDefaults.BalloonStyle + + '新建 ZeroBalloonText + Try + If oDrawingDocument.StylesManager.TextStyles.Item("ZeroBalloonText") Is Nothing Then + + End If + Catch ex As Exception + Dim oZeroBalloonText As TextStyle + oZeroBalloonText = oDrawingDocument.StylesManager.TextStyles.Item(OldBalloonTextStyl).Copy("ZeroBalloonText") + + Dim oZeroBalloonTextColor As Color = ThisApplication.TransientObjects.CreateColor(255, 0, 128) + oZeroBalloonText.Color = oZeroBalloonTextColor + End Try + + '设置当前balloon style 为新的 zeroballoonstyle + oActiveBalloonStyle.TextStyle = oDrawingDocument.StylesManager.TextStyles.Item("ZeroBalloonText") + + ' '' '' + ' '' '' '点击每个序号组 + ' '' '' Dim oBalloon As Balloon + ' '' '' For i = 1 To oActiveSheet.PartsLists.Item(1).PartsListRows.Count + ' '' '' oBalloon = ThisApplication.CommandManager.Pick(kDrawingBalloonFilter, "选择引出序号") + ' '' '' '遍历序号组中的序号,不为0就设置序号,并加1,设置下一个,有序号则跳过 + ' '' '' For Each oBalloonValueSet As BalloonValueSet In oBalloon.BalloonValueSets + ' '' '' If oBalloonValueSet.Value = 0 Then + ' '' '' oBalloonValueSet.Value = i + ' '' '' i = i + 1 + ' '' '' End If + ' '' '' Next + ' '' '' '多加的1要减去 + ' '' '' i = i - 1 + ' '' '' Next '点击每个序号组 - Dim oBalloon As Balloon - Do - oBalloon = ThisApplication.CommandManager.Pick(kDrawingBalloonFilter, "选择引出序号") + Try + Dim oBalloon As Balloon + Do + oBalloon = ThisApplication.CommandManager.Pick(kDrawingBalloonFilter, "选择引出序号") + + For Each oBalloonValueSet As BalloonValueSet In oBalloon.BalloonValueSets + 'If (oBalloonValueSet.Value >= FirstBalloonNumber) Then + If oBalloonValueSet.Value = 0 Then + oBalloonValueSet.Value = BalloonNumber + BalloonNumber = BalloonNumber + 1 + End If + Next + Loop While True + Catch ex As Exception - For Each oBalloonValueSet As BalloonValueSet In oBalloon.BalloonValueSets - 'If (oBalloonValueSet.Value >= FirstBalloonNumber) Then - If oBalloonValueSet.Value = 0 Then - oBalloonValueSet.Value = BalloonNumber - BalloonNumber = BalloonNumber + 1 - End If - Next - Loop While True + 'esc 退出后,还原balloon style + oActiveBalloonStyle.TextStyle = oDrawingDocument.StylesManager.TextStyles.Item(OldBalloonTextStyl) - Return True + Return True + End Try End Function '检查序号完整性 diff --git a/Module/NewUpdater.vb b/Module/NewUpdater.vb index 99a49d3..186796f 100644 --- a/Module/NewUpdater.vb +++ b/Module/NewUpdater.vb @@ -1,4 +1,4 @@ -Imports FSLib.App.SimpleUpdater +'Imports FSLib.App.SimpleUpdater Imports System.Windows.Forms Module NewUpdater @@ -30,7 +30,7 @@ Module NewUpdater ' End Try 'End Sub - Public Sub UpDater2(ByVal btnCheckUpDate As Button) + Public Function CheckNewVesion() As String Try Dim NewVersionInfo As String = "\\Likai-pc\发行版\2011\NewVersion.txt" @@ -62,21 +62,22 @@ Module NewUpdater 'simupdate = My.Application.Info.DirectoryPath & "\simupdater.exe" 'Process.Start(simupdate) - btnCheckUpDate.Text = "检查到新版" & NewVersion + 'btnCheckUpDate.Text = "检查到新版" & NewVersion + + Return NewVersion Else - With btnCheckUpDate - .Text = "当前为最新版" - .Visible = False - End With + Return "New" End If + Else + Return "Null" End If Catch ex As Exception 'MsgBox(ex.Message) - + Return "Null" End Try - End Sub + End Function Public Function ShortVersion(ByVal LongVesion As String) As Long @@ -109,7 +110,7 @@ Module NewUpdater End Try End Sub - Public Function CreateUpdate() As Boolean + Public Function CreateUpdateExe() As Boolean Try Dim path As String = ThisApplication.InstallPath & "Bin\SimpleUpdater.exe" '文件释放路径 diff --git a/StandardAddInServer.vb b/StandardAddInServer.vb index dcb35644f666085c97afecc4e640124a4a43c852..b22d5bd1d4dae6a05f417bc7db900452f13e0d74 100644 GIT binary patch delta 314 zcmbO;L2$!F!3{@rraxe1k=y)0=Yjon2TK-?$%k^pG&2}d8Il>Y8T^2BIYStbEM~}L z$Y;o7P++iOumh4x5V`3ar!ZMgK9Hlw?8;CveWE3c_QVMsK)%@Iyeu9@H8mG~1rAfU!#vi~KohG{NaWO&pG+5Tz)V~-*s#SPNYV5g0X_N?KNZDYo=|lnPnJZzLS_{!&C)#DKOk5rj;`pOmC=R7Mkw! NmRV}M(Oc%aXaHu`gE#;H -- GitLab