Foxtable(狐表)用户栏目专家坐堂 → 图片管理


  共有6320人关注过本帖平板打印复制链接

主题:图片管理

帅哥哟,离线,有人找我吗?
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106603 积分:542186 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/5/23 9:37:00 [只看该作者]

Dim dlg As New OpenFileDialog
Dim piv As WinForm.PictureViewer = e.Form.Controls("PictureViewer1")
dlg.Filter= "图形文件|*.bmp;*.jpg;*.gif"
If dlg.ShowDialog = DialogResult.OK Then
    Dim pth As String = ProjectPath & "Attachments\"
    Dim name As String = FileSys.GetName(dlg.FileName)
    Dim Result As DialogResult = DialogResult.Yes
    If FileSys.FileExists(pth & "文件\商品图片\" & name) Then
        Result = Messagebox.Show("文件已经存在!覆盖选'是',重命名选'否'","提示", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question)
        If Result = DialogResult.No Then
            If InputValue(name, "重命名","请输入新名称") = False Then
                Return ""
            End If
        ElseIf Result = DialogResult.cancel Then
            Return ""
        End If
    End If
    
    FileSys.CopyFile(dlg.FileName, pth & "文件\商品图片\" & name)
    piv.AddFile("文件\商品图片\" & name)
    
End If

 回到顶部
总数 47 1 2 3 4 5 下一页