Imports System.IO


Public Class Form1
    Dim file1 As String = "C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\GPSimulation\SaveFilesFSX\SceneryCustom1.XML"
    Dim file2 As String = "C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\GPSimulation\SaveFilesFSX\SceneryCustom2.XML"
    Dim file3 As String = "C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\GPSimulation\SaveFilesFSX\SceneryCustom3.XML"
    Dim Copy1 As String = "C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\GPSimulation\Scenery\SceneryCustom1.XML"
    Dim Copy2 As String = "C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\GPSimulation\Scenery\SceneryCustom2.XML"
    Dim Copy3 As String = "C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\GPSimulation\Scenery\SceneryCustom3.XML"
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        If CheckBox1.Checked = True Then
        ElseIf My.Computer.FileSystem.FileExists("C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\GPSimulation\Scenery\SceneryCustom1.XML") = True Then
            My.Computer.FileSystem.DeleteFile("C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\GPSimulation\Scenery\SceneryCustom1.XML")
        End If

        If CheckBox1.Checked = False Then
        ElseIf My.Computer.FileSystem.FileExists("C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\GPSimulation\Scenery\SceneryCustom1.XML") = False Then
            My.Computer.FileSystem.CopyFile(file1, Copy1)
        End If

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        If CheckBox2.Checked = True Then
        ElseIf My.Computer.FileSystem.FileExists("C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\GPSimulation\Scenery\SceneryCustom2.XML") = True Then
            My.Computer.FileSystem.DeleteFile("C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\GPSimulation\Scenery\SceneryCustom2.XML")
        End If


        If CheckBox2.Checked = False Then
        ElseIf My.Computer.FileSystem.FileExists("C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\GPSimulation\Scenery\SceneryCustom2.XML") = False Then
            My.Computer.FileSystem.CopyFile(file2, Copy2)
        End If
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

        If CheckBox3.Checked = True Then
        ElseIf My.Computer.FileSystem.FileExists("C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\GPSimulation\Scenery\SceneryCustom3.XML") = True Then
            My.Computer.FileSystem.DeleteFile("C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\GPSimulation\Scenery\SceneryCustom3.XML")
        End If


        If CheckBox3.Checked = False Then
        ElseIf My.Computer.FileSystem.FileExists("C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\GPSimulation\Scenery\SceneryCustom3.XML") = False Then
            My.Computer.FileSystem.CopyFile(file3, Copy3)
        End If

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class
