Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
CSEGroup22SDP/SimulationAnimator/SimulationAnimator/Form1.vb
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
25 lines (24 sloc)
1.14 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit On | |
Imports System.Diagnostics | |
Imports System.Drawing | |
Public Class Form1 | |
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load | |
Dim PythonInstalled As Boolean | |
Dim PythonVersion As String = GetPythonVersion(PythonInstalled) | |
If PythonInstalled = False Then | |
Dim ErrMsg As String = "Either you did not install Python, or Python is not added to PATH environment variable" & vbCrLf | |
ErrMsg &= "Would you like to install Python right now?" & vbCrLf & vbCrLf | |
ErrMsg &= "Select Yes to download and install Python." & vbCrLf | |
ErrMsg &= "Select No to locate Python on your own." & vbCrLf | |
ErrMsg &= "Select Cancel to quit this program." | |
Dim QueryResult As MsgBoxResult = MsgBox(ErrMsg, vbQuestion + vbYesNoCancel, "Python Error") | |
If QueryResult = vbYes Then | |
' Download and Install Python | |
Form2.Show() | |
ElseIf QueryResult = vbNo Then | |
ElseIf QueryResult = vbCancel Then | |
End | |
End If | |
End If | |
End Sub | |
End Class |