Attribute VB_Name = "modMain"
Option Explicit

Sub Main()

    StartupTasks

    frmProjects.Show
    
End Sub

Sub StartupTasks()

    On Error Resume Next
    
    MakeDir FPath & "Projects"
    
End Sub

Sub CreateNewProject(sProjectName As String, bDefaultList As Boolean)

    Dim XMLProject As New ChilkatXml
    Dim XMLTask As ChilkatXml
    
    XMLProject.Tag = "Project Manager Project"
    XMLProject.AddAttribute "ProjectName", sProjectName
    
    If bDefaultList = True Then
        
        XMLProject.AddAttribute "NextTaskID", "11"
        
        Set XMLTask = XMLProject.NewChild("Task", "")
        XMLTask.AddAttribute "Description", "Purchase Domain Name"
        XMLTask.AddAttribute "Details", ""
        XMLTask.AddAttribute "Done", "0"
        XMLTask.AddAttribute "TaskID", "1"
        
        Set XMLTask = XMLProject.NewChild("Task", "")
        XMLTask.AddAttribute "Description", "Purchase Web Hosting"
        XMLTask.AddAttribute "Details", ""
        XMLTask.AddAttribute "Done", "0"
        XMLTask.AddAttribute "TaskID", "2"

        Set XMLTask = XMLProject.NewChild("Task", "")
        XMLTask.AddAttribute "Description", "Develop Info Product"
        XMLTask.AddAttribute "Details", ""
        XMLTask.AddAttribute "Done", "0"
        XMLTask.AddAttribute "TaskID", "3"
        
        Set XMLTask = XMLProject.NewChild("Task", "")
        XMLTask.AddAttribute "Description", "Write Web Sales Copy"
        XMLTask.AddAttribute "Details", ""
        XMLTask.AddAttribute "Done", "0"
        XMLTask.AddAttribute "TaskID", "4"
        
        Set XMLTask = XMLProject.NewChild("Task", "")
        XMLTask.AddAttribute "Description", "Header & Box Graphics"
        XMLTask.AddAttribute "Details", ""
        XMLTask.AddAttribute "Done", "0"
        XMLTask.AddAttribute "TaskID", "5"
        
        Set XMLTask = XMLProject.NewChild("Task", "")
        XMLTask.AddAttribute "Description", "Set Up Web Site Pages"
        XMLTask.AddAttribute "Details", ""
        XMLTask.AddAttribute "Done", "0"
        XMLTask.AddAttribute "TaskID", "6"
        
        Set XMLTask = XMLProject.NewChild("Task", "")
        XMLTask.AddAttribute "Description", "Gather Testimonials"
        XMLTask.AddAttribute "Details", ""
        XMLTask.AddAttribute "Done", "0"
        XMLTask.AddAttribute "TaskID", "7"
        
        Set XMLTask = XMLProject.NewChild("Task", "")
        XMLTask.AddAttribute "Description", "New ClickBank Account"
        XMLTask.AddAttribute "Details", ""
        XMLTask.AddAttribute "Done", "0"
        XMLTask.AddAttribute "TaskID", "8"
        
        Set XMLTask = XMLProject.NewChild("Task", "")
        XMLTask.AddAttribute "Description", "Solo & Affiliate Ads"
        XMLTask.AddAttribute "Details", ""
        XMLTask.AddAttribute "Done", "0"
        XMLTask.AddAttribute "TaskID", "9"
        
        Set XMLTask = XMLProject.NewChild("Task", "")
        XMLTask.AddAttribute "Description", "Send Mailing To Lists"
        XMLTask.AddAttribute "Details", ""
        XMLTask.AddAttribute "Done", "0"
        XMLTask.AddAttribute "TaskID", "10"
    Else
        XMLProject.AddAttribute "NextTaskID", "1"
    End If
    
    XMLProject.SaveXml FPath & "projects\" & sProjectName & ".pmp"

End Sub
