升级到20220524版 项目静默升级后Application.ReStart 重启 提示窗口指定的所有者表不存在,无法打开此窗口……
Dim File As String = ProjectPath & "\Attachments\Connect.Ini"
Dim ErrMsg As String
Dim Conn As String = FileSys.ReadAllText(File)
If Connections.TryConnect(Conn,ErrMsg) = False Then
MessageBox.Show("数据源无法连通" & vbcrlf & "原因:" & ErrMsg & vbcrlf & "点击确定,退出当前系统,请重新启动程序!" ,"温馨提示")
vars("数据源状态")=False
Syscmd.Project.Exit()
'Syscmd.Project.Open(ProjectFile)
Else
If Connections.Contains("无纸化会议")=True Then
Else
Connections.Add("无纸化会议",Conn)
End If
vars("数据源状态")=True
……
Dim ipFile As String = ProjectPath & "\Attachments\ip.txt"
Dim up As Boolean
If Filesys.FileExists(ipFile) Then
Dim ip As String = FileSys.ReadAllText(ipFile)
If TryConnectHost(ip) = True Then
Dim hc As New HttpClient(UpdatePath & "/update.txt")
hc.SkipError = True
If hc.GetFile(ProjectPath &"update.txt") Then
up = Syscmd.Project.Update(False,False)
End If
End If
End If
If up = False Then '如果没有升级
MainTable = Tables("表A")
TableCaptionVisible = False
basemainform.text = "【无纸化会议】"
AddHandler nfi.DoubleClick, AddressOf Icon_DoubleClick '为通知区域图标添加双击事件
Dim tsmi1 As new System.Windows.Forms.ToolStripMenuItem("返回主界面",GetImage(projectpath & "\BrowseMode.ico")) '定义一个菜单选项(带图标)
AddHandler tsmi1 .Click, AddressOf Menu1_Click '为这个菜单选项添加点击事件
Dim tsmi3 As New System.Windows.Forms.ToolStripMenuItem("退出程序") '定义一个菜单选项
AddHandler tsmi3 .Click, AddressOf Menu3_Click '为这个菜单选项添加点击事件
cms.Items.Add(tsmi1) '为全局变量CMS 也就是右键菜单添加 "菜单一"
cms.Items.Add(tsmi3) '为全局变量CMS 也就是右键菜单添加 "菜单三"
nfi.ContextMenuStrip = cms
nfi.Text = "无纸化会议服务端" '鼠标移上去显示的文本
nfi.Icon = new Icon(ProjectPath & "Attachments\001.ico") '图标地址
nfi.Visible = True '设置为显示
Forms("会议系统").open
basemainform.WindowState = 1
baseMainform.visible = False '显示主项目'
If FileSys.DirectoryExists(ProjectPath & "下载文件") Then
Else
FileSys.CreateDirectory(ProjectPath & "下载文件")
End If
If FileSys.DirectoryExists(ProjectPath & "上传文件") Then
Else
FileSys.CreateDirectory(ProjectPath & "上传文件")
End If
Else '如果升级成功
Application.ReStart '小版本升级完成后自动重启项目'
End If
End If