Private Sub runRyl(Optional ByVal game As CGameItem = Nothing)
Dim ryldir As String = ""
If Not game Is Nothing Then
ryldir = Ryl2.Items(game.OwnerID).directory
ElseIf game Is Nothing AndAlso Ryl2.Items.Length > 1 Then
Dim frm As New frmSelectRyl
If frm.ShowDialog = Windows.Forms.DialogResult.OK Then
ryldir = Ryl2.Items(frm.selectedId).directory
End If
ElseIf game Is Nothing AndAlso Ryl2.Items.Length = 1 Then
ryldir = Ryl2.Items(0).directory
End If
If ryldir <> "" Then
Try
Shell(ryldir & "login.exe", AppWinStyle.NormalFocus, False)
Catch ex As System.IO.FileNotFoundException
Me.LabStatus.Text = "Login.exe not found in ryl2 directory"
Catch ex As System.Exception
MsgBox(ex.Message)
End Try
End If
End Sub