frmQuitOpen.vb 1.1 KB
Newer Older
leaky114's avatar
leaky114 已提交
1 2 3 4 5 6 7 8 9 10 11
Imports System.Windows.Forms

Public Class frmQuitOpen

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) 
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

    Private Sub OK_Button_Click(sender As System.Object, e As System.EventArgs) Handles OK_Button.Click
        If lvwFileListView.SelectedItems.Count <> 0 Then
12 13
            'ThisApplication.Documents.Open(lvwFileListView.SelectedItems(0).Text)
            Process.Start(lvwFileListView.SelectedItems(0).Text)
leaky114's avatar
leaky114 已提交
14 15
        End If
         Me.DialogResult = System.Windows.Forms.DialogResult.OK
16 17 18 19 20 21 22 23 24
        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()
leaky114's avatar
leaky114 已提交
25 26
    End Sub
End Class