Windows Form File /FormMain.vb (VB.NET)
1: Option Strict Off  
2: Option Explicit On  
3: Imports VB = Microsoft.VisualBasic  
4: Friend Class FormMain  
5:     Inherits System.Windows.Forms.Form  
6: #Region "Windows Form Designer generated code "  
7:     Public Sub New()  
8:         MyBase.New()  
9:         If m_vb6FormDefInstance Is Nothing Then  
10:             If m_InitializingDefInstance Then  
11:                 m_vb6FormDefInstance = Me  
12:             Else  
13:                 Try  
14:                     'For the start-up form, the first instance created is the default instance.  
15:                     If System.Reflection.Assembly.GetExecutingAssembly.EntryPoint.DeclaringType Is Me.GetType Then  
16:                         m_vb6FormDefInstance = Me  
17:                     End If  
18:                 Catch  
19:                 End Try  
20:             End If  
21:         End If  
22:         'This call is required by the Windows Form Designer.  
23:         InitializeComponent()  
24:     End Sub  
25:     'Form overrides dispose to clean up the component list.  
26:     Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)  
27:         If Disposing Then  
28:             If Not components Is Nothing Then  
29:                 components.Dispose()  
30:             End If  
31:         End If  
32:         MyBase.Dispose(Disposing)  
33:     End Sub  
34:     'Required by the Windows Form Designer  
35:     Private components As System.ComponentModel.IContainer  
36:     Public ToolTip1 As System.Windows.Forms.ToolTip  
37:     Public WithEvents CommandUpgrade As System.Windows.Forms.Button  
38:     Public WithEvents CommandQuit As System.Windows.Forms.Button  
39:     Public WithEvents FrameOptions As System.Windows.Forms.GroupBox  
40:     Public WithEvents CommandViewOutputHTML As System.Windows.Forms.Button  
41:     Public WithEvents CommandViewOutputHTMLHelp As System.Windows.Forms.Button  
42:     Public WithEvents CommandViewOutputFolder As System.Windows.Forms.Button  
43:     Public WithEvents FrameOutput As System.Windows.Forms.GroupBox  
44:     Public WithEvents CommandEditProject As System.Windows.Forms.Button  
45:     Public WithEvents CommandConnections As System.Windows.Forms.Button  
46:     Public WithEvents FrameOtherSettings As System.Windows.Forms.GroupBox  
47:     Public WithEvents ListParses As System.Windows.Forms.ListBox  
48:     Public WithEvents FrameProjectParses As System.Windows.Forms.GroupBox  
49:     Public WithEvents TextCurrentItem As System.Windows.Forms.TextBox  
50:     Public WithEvents TextStatus As System.Windows.Forms.TextBox  
51:     Public WithEvents LabelStatusActivity As System.Windows.Forms.Label  
52:     Public WithEvents LabelStatusItem As System.Windows.Forms.Label  
53:     Public WithEvents FrameStatus As System.Windows.Forms.GroupBox  
54:     Public WithEvents ListProjects As System.Windows.Forms.ListBox  
55:     Public WithEvents FrameProjects As System.Windows.Forms.GroupBox  
56:     Public WithEvents CommandViewLogs As System.Windows.Forms.Button  
57:     Public WithEvents CommandDocumentProject As System.Windows.Forms.Button  
58:     Public WithEvents CommandExtractProjectData As System.Windows.Forms.Button  
59:     Public WithEvents FrameJobManager As System.Windows.Forms.GroupBox  
60:     Public WithEvents Line1 As System.Windows.Forms.Label  
61:     Public WithEvents Line2 As System.Windows.Forms.Label  
62:     Public WithEvents AddNewProject As System.Windows.Forms.MenuItem  
63:     Public WithEvents DeleteProject As System.Windows.Forms.MenuItem  
64:     Public WithEvents DeleteParse As System.Windows.Forms.MenuItem  
65:     Public WithEvents Exit_Renamed As System.Windows.Forms.MenuItem  
66:     Public WithEvents File As System.Windows.Forms.MenuItem  
67:     Public WithEvents PurgeData As System.Windows.Forms.MenuItem  
68:     Public WithEvents PurgeAll As System.Windows.Forms.MenuItem  
69:     Public WithEvents Tools As System.Windows.Forms.MenuItem  
70:     Public WithEvents Documentation As System.Windows.Forms.MenuItem  
71:     Public WithEvents About As System.Windows.Forms.MenuItem  
72:     Public WithEvents Help As System.Windows.Forms.MenuItem  
73:     Public MainMenu1 As System.Windows.Forms.MainMenu  
74:     'NOTE: The following procedure is required by the Windows Form Designer  
75:     'It can be modified using the Windows Form Designer.  
76:     'Do not modify it using the code editor.  
77:     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()  
78:         Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(FormMain))  
79:         Me.components = New System.ComponentModel.Container()  
80:         Me.ToolTip1 = New System.Windows.Forms.ToolTip(components)  
81:         Me.ToolTip1.Active = True  
82:         Me.CommandUpgrade = New System.Windows.Forms.Button  
83:         Me.FrameOptions = New System.Windows.Forms.GroupBox  
84:         Me.CommandQuit = New System.Windows.Forms.Button  
85:         Me.FrameOutput = New System.Windows.Forms.GroupBox  
86:         Me.CommandViewOutputHTML = New System.Windows.Forms.Button  
87:         Me.CommandViewOutputHTMLHelp = New System.Windows.Forms.Button  
88:         Me.CommandViewOutputFolder = New System.Windows.Forms.Button  
89:         Me.FrameOtherSettings = New System.Windows.Forms.GroupBox  
90:         Me.CommandEditProject = New System.Windows.Forms.Button  
91:         Me.CommandConnections = New System.Windows.Forms.Button  
92:         Me.FrameProjectParses = New System.Windows.Forms.GroupBox  
93:         Me.ListParses = New System.Windows.Forms.ListBox  
94:         Me.FrameStatus = New System.Windows.Forms.GroupBox  
95:         Me.TextCurrentItem = New System.Windows.Forms.TextBox  
96:         Me.TextStatus = New System.Windows.Forms.TextBox  
97:         Me.LabelStatusActivity = New System.Windows.Forms.Label  
98:         Me.LabelStatusItem = New System.Windows.Forms.Label  
99:         Me.FrameProjects = New System.Windows.Forms.GroupBox  
100:         Me.ListProjects = New System.Windows.Forms.ListBox  
101:         Me.FrameJobManager = New System.Windows.Forms.GroupBox  
102:         Me.CommandViewLogs = New System.Windows.Forms.Button  
103:         Me.CommandDocumentProject = New System.Windows.Forms.Button  
104:         Me.CommandExtractProjectData = New System.Windows.Forms.Button  
105:         Me.Line1 = New System.Windows.Forms.Label  
106:         Me.Line2 = New System.Windows.Forms.Label  
107:         Me.MainMenu1 = New System.Windows.Forms.MainMenu  
108:         Me.File = New System.Windows.Forms.MenuItem  
109:         Me.AddNewProject = New System.Windows.Forms.MenuItem  
110:         Me.DeleteProject = New System.Windows.Forms.MenuItem  
111:         Me.DeleteParse = New System.Windows.Forms.MenuItem  
112:         Me.Exit_Renamed = New System.Windows.Forms.MenuItem  
113:         Me.Tools = New System.Windows.Forms.MenuItem  
114:         Me.PurgeData = New System.Windows.Forms.MenuItem  
115:         Me.PurgeAll = New System.Windows.Forms.MenuItem  
116:         Me.Help = New System.Windows.Forms.MenuItem  
117:         Me.Documentation = New System.Windows.Forms.MenuItem  
118:         Me.About = New System.Windows.Forms.MenuItem  
119:         Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle  
120:         Me.Text = "SQL Documentation Tool"  
121:         Me.ClientSize = New System.Drawing.Size(615, 392)  
122:         Me.Location = New System.Drawing.Point(10, 48)  
123:         Me.Icon = CType(resources.GetObject("FormMain.Icon"), System.Drawing.Icon)  
124:         Me.MaximizeBox = False  
125:         Me.StartPosition = System.Windows.Forms.FormStartPosition.WindowsDefaultLocation  
126:         Me.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
127:         Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)  
128:         Me.BackColor = System.Drawing.SystemColors.Control  
129:         Me.ControlBox = True  
130:         Me.Enabled = True  
131:         Me.KeyPreview = False  
132:         Me.MinimizeBox = True  
133:         Me.Cursor = System.Windows.Forms.Cursors.Default  
134:         Me.RightToLeft = System.Windows.Forms.RightToLeft.No  
135:         Me.ShowInTaskbar = True  
136:         Me.HelpButton = False  
137:         Me.WindowState = System.Windows.Forms.FormWindowState.Normal  
138:         Me.Name = "FormMain"  
139:         Me.CommandUpgrade.TextAlign = System.Drawing.ContentAlignment.MiddleCenter  
140:         Me.CommandUpgrade.Text = "Upgrade to full version"  
141:         Me.CommandUpgrade.Size = New System.Drawing.Size(129, 25)  
142:         Me.CommandUpgrade.Location = New System.Drawing.Point(472, 224)  
143:         Me.CommandUpgrade.TabIndex = 18  
144:         Me.ToolTip1.SetToolTip(Me.CommandUpgrade, "Upgrade to full version of the SQL Documentation Tool")  
145:         Me.CommandUpgrade.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
146:         Me.CommandUpgrade.BackColor = System.Drawing.SystemColors.Control  
147:         Me.CommandUpgrade.CausesValidation = True  
148:         Me.CommandUpgrade.Enabled = True  
149:         Me.CommandUpgrade.ForeColor = System.Drawing.SystemColors.ControlText  
150:         Me.CommandUpgrade.Cursor = System.Windows.Forms.Cursors.Default  
151:         Me.CommandUpgrade.RightToLeft = System.Windows.Forms.RightToLeft.No  
152:         Me.CommandUpgrade.TabStop = True  
153:         Me.CommandUpgrade.Name = "CommandUpgrade"  
154:         Me.FrameOptions.Text = "Options"  
155:         Me.FrameOptions.Size = New System.Drawing.Size(145, 113)  
156:         Me.FrameOptions.Location = New System.Drawing.Point(464, 176)  
157:         Me.FrameOptions.TabIndex = 16  
158:         Me.FrameOptions.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
159:         Me.FrameOptions.BackColor = System.Drawing.SystemColors.Control  
160:         Me.FrameOptions.Enabled = True  
161:         Me.FrameOptions.ForeColor = System.Drawing.SystemColors.ControlText  
162:         Me.FrameOptions.RightToLeft = System.Windows.Forms.RightToLeft.No  
163:         Me.FrameOptions.Visible = True  
164:         Me.FrameOptions.Name = "FrameOptions"  
165:         Me.CommandQuit.TextAlign = System.Drawing.ContentAlignment.MiddleCenter  
166:         Me.CommandQuit.Text = "Exit"  
167:         Me.CommandQuit.Size = New System.Drawing.Size(129, 25)  
168:         Me.CommandQuit.Location = New System.Drawing.Point(8, 16)  
169:         Me.CommandQuit.TabIndex = 17  
170:         Me.ToolTip1.SetToolTip(Me.CommandQuit, "Leave the SQL Documentation Tool")  
171:         Me.CommandQuit.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
172:         Me.CommandQuit.BackColor = System.Drawing.SystemColors.Control  
173:         Me.CommandQuit.CausesValidation = True  
174:         Me.CommandQuit.Enabled = True  
175:         Me.CommandQuit.ForeColor = System.Drawing.SystemColors.ControlText  
176:         Me.CommandQuit.Cursor = System.Windows.Forms.Cursors.Default  
177:         Me.CommandQuit.RightToLeft = System.Windows.Forms.RightToLeft.No  
178:         Me.CommandQuit.TabStop = True  
179:         Me.CommandQuit.Name = "CommandQuit"  
180:         Me.FrameOutput.Text = "View Output"  
181:         Me.FrameOutput.Size = New System.Drawing.Size(145, 113)  
182:         Me.FrameOutput.Location = New System.Drawing.Point(312, 176)  
183:         Me.FrameOutput.TabIndex = 12  
184:         Me.FrameOutput.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
185:         Me.FrameOutput.BackColor = System.Drawing.SystemColors.Control  
186:         Me.FrameOutput.Enabled = True  
187:         Me.FrameOutput.ForeColor = System.Drawing.SystemColors.ControlText  
188:         Me.FrameOutput.RightToLeft = System.Windows.Forms.RightToLeft.No  
189:         Me.FrameOutput.Visible = True  
190:         Me.FrameOutput.Name = "FrameOutput"  
191:         Me.CommandViewOutputHTML.TextAlign = System.Drawing.ContentAlignment.MiddleCenter  
192:         Me.CommandViewOutputHTML.Text = "HTML Output"  
193:         Me.CommandViewOutputHTML.Size = New System.Drawing.Size(129, 25)  
194:         Me.CommandViewOutputHTML.Location = New System.Drawing.Point(8, 48)  
195:         Me.CommandViewOutputHTML.TabIndex = 15  
196:         Me.ToolTip1.SetToolTip(Me.CommandViewOutputHTML, "View the documentation for the selected project")  
197:         Me.CommandViewOutputHTML.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
198:         Me.CommandViewOutputHTML.BackColor = System.Drawing.SystemColors.Control  
199:         Me.CommandViewOutputHTML.CausesValidation = True  
200:         Me.CommandViewOutputHTML.Enabled = True  
201:         Me.CommandViewOutputHTML.ForeColor = System.Drawing.SystemColors.ControlText  
202:         Me.CommandViewOutputHTML.Cursor = System.Windows.Forms.Cursors.Default  
203:         Me.CommandViewOutputHTML.RightToLeft = System.Windows.Forms.RightToLeft.No  
204:         Me.CommandViewOutputHTML.TabStop = True  
205:         Me.CommandViewOutputHTML.Name = "CommandViewOutputHTML"  
206:         Me.CommandViewOutputHTMLHelp.TextAlign = System.Drawing.ContentAlignment.MiddleCenter  
207:         Me.CommandViewOutputHTMLHelp.Text = "HTML Help Output"  
208:         Me.CommandViewOutputHTMLHelp.Size = New System.Drawing.Size(129, 25)  
209:         Me.CommandViewOutputHTMLHelp.Location = New System.Drawing.Point(8, 80)  
210:         Me.CommandViewOutputHTMLHelp.TabIndex = 14  
211:         Me.ToolTip1.SetToolTip(Me.CommandViewOutputHTMLHelp, "View the documentation for the selected project")  
212:         Me.CommandViewOutputHTMLHelp.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
213:         Me.CommandViewOutputHTMLHelp.BackColor = System.Drawing.SystemColors.Control  
214:         Me.CommandViewOutputHTMLHelp.CausesValidation = True  
215:         Me.CommandViewOutputHTMLHelp.Enabled = True  
216:         Me.CommandViewOutputHTMLHelp.ForeColor = System.Drawing.SystemColors.ControlText  
217:         Me.CommandViewOutputHTMLHelp.Cursor = System.Windows.Forms.Cursors.Default  
218:         Me.CommandViewOutputHTMLHelp.RightToLeft = System.Windows.Forms.RightToLeft.No  
219:         Me.CommandViewOutputHTMLHelp.TabStop = True  
220:         Me.CommandViewOutputHTMLHelp.Name = "CommandViewOutputHTMLHelp"  
221:         Me.CommandViewOutputFolder.TextAlign = System.Drawing.ContentAlignment.MiddleCenter  
222:         Me.CommandViewOutputFolder.Text = "Open Output Folder"  
223:         Me.CommandViewOutputFolder.Size = New System.Drawing.Size(129, 25)  
224:         Me.CommandViewOutputFolder.Location = New System.Drawing.Point(8, 16)  
225:         Me.CommandViewOutputFolder.TabIndex = 13  
226:         Me.ToolTip1.SetToolTip(Me.CommandViewOutputFolder, "View the documentation for the selected project")  
227:         Me.CommandViewOutputFolder.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
228:         Me.CommandViewOutputFolder.BackColor = System.Drawing.SystemColors.Control  
229:         Me.CommandViewOutputFolder.CausesValidation = True  
230:         Me.CommandViewOutputFolder.Enabled = True  
231:         Me.CommandViewOutputFolder.ForeColor = System.Drawing.SystemColors.ControlText  
232:         Me.CommandViewOutputFolder.Cursor = System.Windows.Forms.Cursors.Default  
233:         Me.CommandViewOutputFolder.RightToLeft = System.Windows.Forms.RightToLeft.No  
234:         Me.CommandViewOutputFolder.TabStop = True  
235:         Me.CommandViewOutputFolder.Name = "CommandViewOutputFolder"  
236:         Me.FrameOtherSettings.Text = "Settings"  
237:         Me.FrameOtherSettings.Size = New System.Drawing.Size(145, 113)  
238:         Me.FrameOtherSettings.Location = New System.Drawing.Point(160, 176)  
239:         Me.FrameOtherSettings.TabIndex = 9  
240:         Me.FrameOtherSettings.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
241:         Me.FrameOtherSettings.BackColor = System.Drawing.SystemColors.Control  
242:         Me.FrameOtherSettings.Enabled = True  
243:         Me.FrameOtherSettings.ForeColor = System.Drawing.SystemColors.ControlText  
244:         Me.FrameOtherSettings.RightToLeft = System.Windows.Forms.RightToLeft.No  
245:         Me.FrameOtherSettings.Visible = True  
246:         Me.FrameOtherSettings.Name = "FrameOtherSettings"  
247:         Me.CommandEditProject.TextAlign = System.Drawing.ContentAlignment.MiddleCenter  
248:         Me.CommandEditProject.Text = "Edit Project Settings"  
249:         Me.CommandEditProject.Size = New System.Drawing.Size(129, 25)  
250:         Me.CommandEditProject.Location = New System.Drawing.Point(8, 16)  
251:         Me.CommandEditProject.TabIndex = 11  
252:         Me.ToolTip1.SetToolTip(Me.CommandEditProject, "Edit the selected project")  
253:         Me.CommandEditProject.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
254:         Me.CommandEditProject.BackColor = System.Drawing.SystemColors.Control  
255:         Me.CommandEditProject.CausesValidation = True  
256:         Me.CommandEditProject.Enabled = True  
257:         Me.CommandEditProject.ForeColor = System.Drawing.SystemColors.ControlText  
258:         Me.CommandEditProject.Cursor = System.Windows.Forms.Cursors.Default  
259:         Me.CommandEditProject.RightToLeft = System.Windows.Forms.RightToLeft.No  
260:         Me.CommandEditProject.TabStop = True  
261:         Me.CommandEditProject.Name = "CommandEditProject"  
262:         Me.CommandConnections.TextAlign = System.Drawing.ContentAlignment.MiddleCenter  
263:         Me.CommandConnections.Text = "Edit Connections"  
264:         Me.CommandConnections.Size = New System.Drawing.Size(129, 25)  
265:         Me.CommandConnections.Location = New System.Drawing.Point(8, 48)  
266:         Me.CommandConnections.TabIndex = 10  
267:         Me.ToolTip1.SetToolTip(Me.CommandConnections, "Edit Database Connections")  
268:         Me.CommandConnections.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
269:         Me.CommandConnections.BackColor = System.Drawing.SystemColors.Control  
270:         Me.CommandConnections.CausesValidation = True  
271:         Me.CommandConnections.Enabled = True  
272:         Me.CommandConnections.ForeColor = System.Drawing.SystemColors.ControlText  
273:         Me.CommandConnections.Cursor = System.Windows.Forms.Cursors.Default  
274:         Me.CommandConnections.RightToLeft = System.Windows.Forms.RightToLeft.No  
275:         Me.CommandConnections.TabStop = True  
276:         Me.CommandConnections.Name = "CommandConnections"  
277:         Me.FrameProjectParses.Text = "Project Parses"  
278:         Me.FrameProjectParses.Size = New System.Drawing.Size(297, 161)  
279:         Me.FrameProjectParses.Location = New System.Drawing.Point(312, 8)  
280:         Me.FrameProjectParses.TabIndex = 7  
281:         Me.FrameProjectParses.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
282:         Me.FrameProjectParses.BackColor = System.Drawing.SystemColors.Control  
283:         Me.FrameProjectParses.Enabled = True  
284:         Me.FrameProjectParses.ForeColor = System.Drawing.SystemColors.ControlText  
285:         Me.FrameProjectParses.RightToLeft = System.Windows.Forms.RightToLeft.No  
286:         Me.FrameProjectParses.Visible = True  
287:         Me.FrameProjectParses.Name = "FrameProjectParses"  
288:         Me.ListParses.Size = New System.Drawing.Size(281, 137)  
289:         Me.ListParses.Location = New System.Drawing.Point(8, 16)  
290:         Me.ListParses.TabIndex = 8  
291:         Me.ListParses.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
292:         Me.ListParses.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D  
293:         Me.ListParses.BackColor = System.Drawing.SystemColors.Window  
294:         Me.ListParses.CausesValidation = True  
295:         Me.ListParses.Enabled = True  
296:         Me.ListParses.ForeColor = System.Drawing.SystemColors.WindowText  
297:         Me.ListParses.IntegralHeight = True  
298:         Me.ListParses.Cursor = System.Windows.Forms.Cursors.Default  
299:         Me.ListParses.SelectionMode = System.Windows.Forms.SelectionMode.One  
300:         Me.ListParses.RightToLeft = System.Windows.Forms.RightToLeft.No  
301:         Me.ListParses.Sorted = False  
302:         Me.ListParses.TabStop = True  
303:         Me.ListParses.Visible = True  
304:         Me.ListParses.MultiColumn = False  
305:         Me.ListParses.Name = "ListParses"  
306:         Me.FrameStatus.Text = "Status"  
307:         Me.FrameStatus.Size = New System.Drawing.Size(601, 89)  
308:         Me.FrameStatus.Location = New System.Drawing.Point(8, 296)  
309:         Me.FrameStatus.TabIndex = 4  
310:         Me.FrameStatus.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
311:         Me.FrameStatus.BackColor = System.Drawing.SystemColors.Control  
312:         Me.FrameStatus.Enabled = True  
313:         Me.FrameStatus.ForeColor = System.Drawing.SystemColors.ControlText  
314:         Me.FrameStatus.RightToLeft = System.Windows.Forms.RightToLeft.No  
315:         Me.FrameStatus.Visible = True  
316:         Me.FrameStatus.Name = "FrameStatus"  
317:         Me.TextCurrentItem.AutoSize = False  
318:         Me.TextCurrentItem.BackColor = System.Drawing.SystemColors.Control  
319:         Me.TextCurrentItem.Size = New System.Drawing.Size(545, 25)  
320:         Me.TextCurrentItem.Location = New System.Drawing.Point(48, 47)  
321:         Me.TextCurrentItem.TabIndex = 20  
322:         Me.TextCurrentItem.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
323:         Me.TextCurrentItem.AcceptsReturn = True  
324:         Me.TextCurrentItem.TextAlign = System.Windows.Forms.HorizontalAlignment.Left  
325:         Me.TextCurrentItem.CausesValidation = True  
326:         Me.TextCurrentItem.Enabled = True  
327:         Me.TextCurrentItem.ForeColor = System.Drawing.SystemColors.WindowText  
328:         Me.TextCurrentItem.HideSelection = True  
329:         Me.TextCurrentItem.ReadOnly = False  
330:         Me.TextCurrentItem.Maxlength = 0  
331:         Me.TextCurrentItem.Cursor = System.Windows.Forms.Cursors.IBeam  
332:         Me.TextCurrentItem.MultiLine = False  
333:         Me.TextCurrentItem.RightToLeft = System.Windows.Forms.RightToLeft.No  
334:         Me.TextCurrentItem.ScrollBars = System.Windows.Forms.ScrollBars.None  
335:         Me.TextCurrentItem.TabStop = True  
336:         Me.TextCurrentItem.Visible = True  
337:         Me.TextCurrentItem.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D  
338:         Me.TextCurrentItem.Name = "TextCurrentItem"  
339:         Me.TextStatus.AutoSize = False  
340:         Me.TextStatus.BackColor = System.Drawing.SystemColors.Control  
341:         Me.TextStatus.Size = New System.Drawing.Size(545, 25)  
342:         Me.TextStatus.Location = New System.Drawing.Point(48, 16)  
343:         Me.TextStatus.TabIndex = 5  
344:         Me.TextStatus.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
345:         Me.TextStatus.AcceptsReturn = True  
346:         Me.TextStatus.TextAlign = System.Windows.Forms.HorizontalAlignment.Left  
347:         Me.TextStatus.CausesValidation = True  
348:         Me.TextStatus.Enabled = True  
349:         Me.TextStatus.ForeColor = System.Drawing.SystemColors.WindowText  
350:         Me.TextStatus.HideSelection = True  
351:         Me.TextStatus.ReadOnly = False  
352:         Me.TextStatus.Maxlength = 0  
353:         Me.TextStatus.Cursor = System.Windows.Forms.Cursors.IBeam  
354:         Me.TextStatus.MultiLine = False  
355:         Me.TextStatus.RightToLeft = System.Windows.Forms.RightToLeft.No  
356:         Me.TextStatus.ScrollBars = System.Windows.Forms.ScrollBars.None  
357:         Me.TextStatus.TabStop = True  
358:         Me.TextStatus.Visible = True  
359:         Me.TextStatus.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D  
360:         Me.TextStatus.Name = "TextStatus"  
361:         Me.LabelStatusActivity.Text = "Activity:"  
362:         Me.LabelStatusActivity.Size = New System.Drawing.Size(49, 17)  
363:         Me.LabelStatusActivity.Location = New System.Drawing.Point(8, 20)  
364:         Me.LabelStatusActivity.TabIndex = 22  
365:         Me.LabelStatusActivity.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
366:         Me.LabelStatusActivity.TextAlign = System.Drawing.ContentAlignment.TopLeft  
367:         Me.LabelStatusActivity.BackColor = System.Drawing.SystemColors.Control  
368:         Me.LabelStatusActivity.Enabled = True  
369:         Me.LabelStatusActivity.ForeColor = System.Drawing.SystemColors.ControlText  
370:         Me.LabelStatusActivity.Cursor = System.Windows.Forms.Cursors.Default  
371:         Me.LabelStatusActivity.RightToLeft = System.Windows.Forms.RightToLeft.No  
372:         Me.LabelStatusActivity.UseMnemonic = True  
373:         Me.LabelStatusActivity.Visible = True  
374:         Me.LabelStatusActivity.AutoSize = False  
375:         Me.LabelStatusActivity.BorderStyle = System.Windows.Forms.BorderStyle.None  
376:         Me.LabelStatusActivity.Name = "LabelStatusActivity"  
377:         Me.LabelStatusItem.Text = "Item:"  
378:         Me.LabelStatusItem.Size = New System.Drawing.Size(33, 17)  
379:         Me.LabelStatusItem.Location = New System.Drawing.Point(22, 51)  
380:         Me.LabelStatusItem.TabIndex = 21  
381:         Me.LabelStatusItem.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
382:         Me.LabelStatusItem.TextAlign = System.Drawing.ContentAlignment.TopLeft  
383:         Me.LabelStatusItem.BackColor = System.Drawing.SystemColors.Control  
384:         Me.LabelStatusItem.Enabled = True  
385:         Me.LabelStatusItem.ForeColor = System.Drawing.SystemColors.ControlText  
386:         Me.LabelStatusItem.Cursor = System.Windows.Forms.Cursors.Default  
387:         Me.LabelStatusItem.RightToLeft = System.Windows.Forms.RightToLeft.No  
388:         Me.LabelStatusItem.UseMnemonic = True  
389:         Me.LabelStatusItem.Visible = True  
390:         Me.LabelStatusItem.AutoSize = False  
391:         Me.LabelStatusItem.BorderStyle = System.Windows.Forms.BorderStyle.None  
392:         Me.LabelStatusItem.Name = "LabelStatusItem"  
393:         Me.FrameProjects.Text = "Projects"  
394:         Me.FrameProjects.Size = New System.Drawing.Size(297, 161)  
395:         Me.FrameProjects.Location = New System.Drawing.Point(8, 8)  
396:         Me.FrameProjects.TabIndex = 1  
397:         Me.FrameProjects.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
398:         Me.FrameProjects.BackColor = System.Drawing.SystemColors.Control  
399:         Me.FrameProjects.Enabled = True  
400:         Me.FrameProjects.ForeColor = System.Drawing.SystemColors.ControlText  
401:         Me.FrameProjects.RightToLeft = System.Windows.Forms.RightToLeft.No  
402:         Me.FrameProjects.Visible = True  
403:         Me.FrameProjects.Name = "FrameProjects"  
404:         Me.ListProjects.Size = New System.Drawing.Size(281, 137)  
405:         Me.ListProjects.Location = New System.Drawing.Point(8, 16)  
406:         Me.ListProjects.TabIndex = 2  
407:         Me.ListProjects.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
408:         Me.ListProjects.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D  
409:         Me.ListProjects.BackColor = System.Drawing.SystemColors.Window  
410:         Me.ListProjects.CausesValidation = True  
411:         Me.ListProjects.Enabled = True  
412:         Me.ListProjects.ForeColor = System.Drawing.SystemColors.WindowText  
413:         Me.ListProjects.IntegralHeight = True  
414:         Me.ListProjects.Cursor = System.Windows.Forms.Cursors.Default  
415:         Me.ListProjects.SelectionMode = System.Windows.Forms.SelectionMode.One  
416:         Me.ListProjects.RightToLeft = System.Windows.Forms.RightToLeft.No  
417:         Me.ListProjects.Sorted = False  
418:         Me.ListProjects.TabStop = True  
419:         Me.ListProjects.Visible = True  
420:         Me.ListProjects.MultiColumn = False  
421:         Me.ListProjects.Name = "ListProjects"  
422:         Me.FrameJobManager.Text = "Job Manager"  
423:         Me.FrameJobManager.Size = New System.Drawing.Size(145, 113)  
424:         Me.FrameJobManager.Location = New System.Drawing.Point(8, 176)  
425:         Me.FrameJobManager.TabIndex = 0  
426:         Me.FrameJobManager.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
427:         Me.FrameJobManager.BackColor = System.Drawing.SystemColors.Control  
428:         Me.FrameJobManager.Enabled = True  
429:         Me.FrameJobManager.ForeColor = System.Drawing.SystemColors.ControlText  
430:         Me.FrameJobManager.RightToLeft = System.Windows.Forms.RightToLeft.No  
431:         Me.FrameJobManager.Visible = True  
432:         Me.FrameJobManager.Name = "FrameJobManager"  
433:         Me.CommandViewLogs.TextAlign = System.Drawing.ContentAlignment.MiddleCenter  
434:         Me.CommandViewLogs.Text = "View Logs"  
435:         Me.CommandViewLogs.Size = New System.Drawing.Size(129, 25)  
436:         Me.CommandViewLogs.Location = New System.Drawing.Point(8, 80)  
437:         Me.CommandViewLogs.TabIndex = 19  
438:         Me.ToolTip1.SetToolTip(Me.CommandViewLogs, "Leave the SQL Documentation Tool")  
439:         Me.CommandViewLogs.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
440:         Me.CommandViewLogs.BackColor = System.Drawing.SystemColors.Control  
441:         Me.CommandViewLogs.CausesValidation = True  
442:         Me.CommandViewLogs.Enabled = True  
443:         Me.CommandViewLogs.ForeColor = System.Drawing.SystemColors.ControlText  
444:         Me.CommandViewLogs.Cursor = System.Windows.Forms.Cursors.Default  
445:         Me.CommandViewLogs.RightToLeft = System.Windows.Forms.RightToLeft.No  
446:         Me.CommandViewLogs.TabStop = True  
447:         Me.CommandViewLogs.Name = "CommandViewLogs"  
448:         Me.CommandDocumentProject.TextAlign = System.Drawing.ContentAlignment.MiddleCenter  
449:         Me.CommandDocumentProject.Text = "Create Documentation"  
450:         Me.CommandDocumentProject.Size = New System.Drawing.Size(129, 25)  
451:         Me.CommandDocumentProject.Location = New System.Drawing.Point(8, 48)  
452:         Me.CommandDocumentProject.TabIndex = 6  
453:         Me.ToolTip1.SetToolTip(Me.CommandDocumentProject, "Creates documentation for the selected parse of the specified project")  
454:         Me.CommandDocumentProject.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
455:         Me.CommandDocumentProject.BackColor = System.Drawing.SystemColors.Control  
456:         Me.CommandDocumentProject.CausesValidation = True  
457:         Me.CommandDocumentProject.Enabled = True  
458:         Me.CommandDocumentProject.ForeColor = System.Drawing.SystemColors.ControlText  
459:         Me.CommandDocumentProject.Cursor = System.Windows.Forms.Cursors.Default  
460:         Me.CommandDocumentProject.RightToLeft = System.Windows.Forms.RightToLeft.No  
461:         Me.CommandDocumentProject.TabStop = True  
462:         Me.CommandDocumentProject.Name = "CommandDocumentProject"  
463:         Me.CommandExtractProjectData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter  
464:         Me.CommandExtractProjectData.Text = "Extract Data"  
465:         Me.CommandExtractProjectData.Size = New System.Drawing.Size(129, 25)  
466:         Me.CommandExtractProjectData.Location = New System.Drawing.Point(8, 16)  
467:         Me.CommandExtractProjectData.TabIndex = 3  
468:         Me.ToolTip1.SetToolTip(Me.CommandExtractProjectData, "Extract the database data for the selected project")  
469:         Me.CommandExtractProjectData.Font = New System.Drawing.Font("Arial", 8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
470:         Me.CommandExtractProjectData.BackColor = System.Drawing.SystemColors.Control  
471:         Me.CommandExtractProjectData.CausesValidation = True  
472:         Me.CommandExtractProjectData.Enabled = True  
473:         Me.CommandExtractProjectData.ForeColor = System.Drawing.SystemColors.ControlText  
474:         Me.CommandExtractProjectData.Cursor = System.Windows.Forms.Cursors.Default  
475:         Me.CommandExtractProjectData.RightToLeft = System.Windows.Forms.RightToLeft.No  
476:         Me.CommandExtractProjectData.TabStop = True  
477:         Me.CommandExtractProjectData.Name = "CommandExtractProjectData"  
478:         Me.Line1.BackColor = System.Drawing.SystemColors.InactiveCaption  
479:         Me.Line1.Visible = True  
480:         Me.Line1.Location = New System.Drawing.Point(0, 0)  
481:         Me.Line1.Width = 607  
482:         Me.Line1.Height = 1  
483:         Me.Line1.Name = "Line1"  
484:         Me.Line2.BackColor = System.Drawing.SystemColors.Window  
485:         Me.Line2.Visible = True  
486:         Me.Line2.Location = New System.Drawing.Point(0, 1)  
487:         Me.Line2.Width = 607  
488:         Me.Line2.Height = 1  
489:         Me.Line2.Name = "Line2"  
490:         Me.File.Text = "&File"  
491:         Me.File.Checked = False  
492:         Me.File.Enabled = True  
493:         Me.File.Visible = True  
494:         Me.File.MDIList = False  
495:         Me.AddNewProject.Text = "Add &New Project"  
496:         Me.AddNewProject.Checked = False  
497:         Me.AddNewProject.Enabled = True  
498:         Me.AddNewProject.Visible = True  
499:         Me.AddNewProject.MDIList = False  
500:         Me.DeleteProject.Text = "&Delete Selected Project"  
501:         Me.DeleteProject.Checked = False  
502:         Me.DeleteProject.Enabled = True  
503:         Me.DeleteProject.Visible = True  
504:         Me.DeleteProject.MDIList = False  
505:         Me.DeleteParse.Text = "Delete Selected Parse of Project"  
506:         Me.DeleteParse.Checked = False  
507:         Me.DeleteParse.Enabled = True  
508:         Me.DeleteParse.Visible = True  
509:         Me.DeleteParse.MDIList = False  
510:         Me.Exit_Renamed.Text = "E&xit"  
511:         Me.Exit_Renamed.Checked = False  
512:         Me.Exit_Renamed.Enabled = True  
513:         Me.Exit_Renamed.Visible = True  
514:         Me.Exit_Renamed.MDIList = False  
515:         Me.Tools.Text = "&Tools"  
516:         Me.Tools.Checked = False  
517:         Me.Tools.Enabled = True  
518:         Me.Tools.Visible = True  
519:         Me.Tools.MDIList = False  
520:         Me.PurgeData.Text = "Purge &Data From DataStore"  
521:         Me.PurgeData.Checked = False  
522:         Me.PurgeData.Enabled = True  
523:         Me.PurgeData.Visible = True  
524:         Me.PurgeData.MDIList = False  
525:         Me.PurgeAll.Text = "Purge &Everything From DataStore"  
526:         Me.PurgeAll.Checked = False  
527:         Me.PurgeAll.Enabled = True  
528:         Me.PurgeAll.Visible = True  
529:         Me.PurgeAll.MDIList = False  
530:         Me.Help.Text = "&Help"  
531:         Me.Help.Checked = False  
532:         Me.Help.Enabled = True  
533:         Me.Help.Visible = True  
534:         Me.Help.MDIList = False  
535:         Me.Documentation.Text = "&Documentation"  
536:         Me.Documentation.Checked = False  
537:         Me.Documentation.Enabled = True  
538:         Me.Documentation.Visible = True  
539:         Me.Documentation.MDIList = False  
540:         Me.About.Text = "&About"  
541:         Me.About.Checked = False  
542:         Me.About.Enabled = True  
543:         Me.About.Visible = True  
544:         Me.About.MDIList = False  
545:         Me.Controls.Add(CommandUpgrade)  
546:         Me.Controls.Add(FrameOptions)  
547:         Me.Controls.Add(FrameOutput)  
548:         Me.Controls.Add(FrameOtherSettings)  
549:         Me.Controls.Add(FrameProjectParses)  
550:         Me.Controls.Add(FrameStatus)  
551:         Me.Controls.Add(FrameProjects)  
552:         Me.Controls.Add(FrameJobManager)  
553:         Me.Controls.Add(Line1)  
554:         Me.Controls.Add(Line2)  
555:         Me.FrameOptions.Controls.Add(CommandQuit)  
556:         Me.FrameOutput.Controls.Add(CommandViewOutputHTML)  
557:         Me.FrameOutput.Controls.Add(CommandViewOutputHTMLHelp)  
558:         Me.FrameOutput.Controls.Add(CommandViewOutputFolder)  
559:         Me.FrameOtherSettings.Controls.Add(CommandEditProject)  
560:         Me.FrameOtherSettings.Controls.Add(CommandConnections)  
561:         Me.FrameProjectParses.Controls.Add(ListParses)  
562:         Me.FrameStatus.Controls.Add(TextCurrentItem)  
563:         Me.FrameStatus.Controls.Add(TextStatus)  
564:         Me.FrameStatus.Controls.Add(LabelStatusActivity)  
565:         Me.FrameStatus.Controls.Add(LabelStatusItem)  
566:         Me.FrameProjects.Controls.Add(ListProjects)  
567:         Me.FrameJobManager.Controls.Add(CommandViewLogs)  
568:         Me.FrameJobManager.Controls.Add(CommandDocumentProject)  
569:         Me.FrameJobManager.Controls.Add(CommandExtractProjectData)  
570:         Me.File.Index = 0  
571:         Me.Tools.Index = 1  
572:         Me.Help.Index = 2  
573:         MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem(){Me.File, Me.Tools, Me.Help})  
574:         Me.AddNewProject.Index = 0  
575:         Me.DeleteProject.Index = 1  
576:         Me.DeleteParse.Index = 2  
577:         Me.Exit_Renamed.Index = 3  
578:         File.MenuItems.AddRange(New System.Windows.Forms.MenuItem(){Me.AddNewProject, Me.DeleteProject, Me.DeleteParse, Me.Exit_Renamed})  
579:         Me.PurgeData.Index = 0  
580:         Me.PurgeAll.Index = 1  
581:         Tools.MenuItems.AddRange(New System.Windows.Forms.MenuItem(){Me.PurgeData, Me.PurgeAll})  
582:         Me.Documentation.Index = 0  
583:         Me.About.Index = 1  
584:         Help.MenuItems.AddRange(New System.Windows.Forms.MenuItem(){Me.Documentation, Me.About})  
585:         Me.Menu = MainMenu1  
586:     End Sub  
587: #End Region  
588: #Region "Upgrade Support "  
589:     Private Shared m_vb6FormDefInstance As FormMain  
590:     Private Shared m_InitializingDefInstance As Boolean  
591:     Public Shared Property DefInstance() As FormMain  
592:         Get  
593:             If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then  
594:                 m_InitializingDefInstance = True  
595:                 m_vb6FormDefInstance = New FormMain()  
596:                 m_InitializingDefInstance = False  
597:             End If  
598:             DefInstance = m_vb6FormDefInstance  
599:         End Get  
600:         Set  
601:             m_vb6FormDefInstance = Value  
602:         End Set  
603:     End Property  
604: #End Region  
605:     Private Declare Function ShellExecute Lib "shell32.dll"  Alias "ShellExecuteA"(ByVal hwnd As Integer, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Integer) As Integer  
606:     Function InitialiseSettings() As Object  
607:           
608:         ApplicationName = "SQL Documentation Tool"  
609:         ApplicationVersion = "6.4"  
610:         ApplicationURL = "http://www.winnershtriangle.com/w/Products.SQLDocumentationTool.asp"  
611:         ApplicationCopyright = "Copyright 2005 - 2006 Winnersh Triangle Web Solutions Limited"  
612:         ApplicationDescription = "Documents Microsoft SQL Server databases"  
613:         ApplicationDataStoreConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & VB6.GetPath & "\DataStore.mdb;"  
614:         ApplicationIsEvaluationVersion = False  
615:         ApplicationEvaluationVersionItemLimit = 10  
616:         'ApplicationDataStoreConnectionString = "Driver={Microsoft Access Driver (*.mdb)};Dbq=" & App.Path & "\DataStore.mdb;"  
617:           
618:         'RTF reference:  
619:         'http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnrtfspec/html/rtfspec_16.asp  
620:           
621:         CommandDocumentProject.Enabled = False  
622:           
623:         If ApplicationIsEvaluationVersion Then  
624:             CommandUpgrade.Visible = True  
625:             CommandUpgrade.Enabled = True  
626:             ApplicationName = ApplicationName & " Evaluation Version"  
627:         Else  
628:             CommandUpgrade.Visible = False  
629:             CommandUpgrade.Enabled = False  
630:         End If  
631:           
632:     End Function  
633:     'Private Sub CheckHTML_Click()  
634:       
635:     '   If CheckHTML.Value = vbChecked Then  
636:     '    CheckHTML.Value = vbUnchecked  
637:     '      CurrentProjectHTMLOutput = False  
638:     ' Else  
639:     '   CheckHTML.Value = vbChecked  
640:     '    CurrentProjectHTMLOutput = True  
641:     'End If  
642:       
643:     'End Sub  
644:       
645:     Public Sub About_Popup(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles About.Popup  
646:         About_Click(eventSender, eventArgs)  
647:     End Sub  
648:     Public Sub About_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles About.Click  
649:         'UPGRADE_ISSUE: Load statement is not supported. Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1039"'  
650:         Load(FormAbout)  
651:         FormAbout.DefInstance.Visible = True  
652:     End Sub  
653:       
654:     'Adds a new project  
655:     Public Sub AddNewProject_Popup(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles AddNewProject.Popup  
656:         AddNewProject_Click(eventSender, eventArgs)  
657:     End Sub  
658:     Public Sub AddNewProject_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles AddNewProject.Click  
659:           
660:         CurrentAction = "ADD PROJECT"  
661:         'UPGRADE_ISSUE: Load statement is not supported. Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1039"'  
662:         Load(FormEditProject)  
663:         FormEditProject.DefInstance.Visible = True  
664:           
665:     End Sub  
666:       
667:     Private Sub CommandConnections_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CommandConnections.Click  
668:         'UPGRADE_ISSUE: Load statement is not supported. Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1039"'  
669:         Load(FormEditConnections)  
670:         FormEditConnections.DefInstance.Visible = True  
671:     End Sub  
672:       
673:     Private Sub CommandDocumentProject_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CommandDocumentProject.Click  
674:           
675:         FormMain.DefInstance.Cursor = System.Windows.Forms.Cursors.WaitCursor  
676:         'Check that CurrentParseID is valid  
677:         If CurrentParseID = 0 Then Exit Sub  
678:           
679:         'Create the output folder  
680:         Dim FileSystemObject As New Scripting.FileSystemObject  
681:           
682:         'Ensure Reports folder exists  
683:         If Not FileSystemObject.FolderExists(VB6.GetPath & "\Reports") Then  
684:             FileSystemObject.CreateFolder(VB6.GetPath & "\Reports")  
685:         End If  
686:           
687:         'Create folder for the specific project  
688:         If Not FileSystemObject.FolderExists(VB6.GetPath & "\Reports\" & ListProjects.Text) Then  
689:             FileSystemObject.CreateFolder(VB6.GetPath & "\Reports\" & ListProjects.Text)  
690:         End If  
691:           
692:         'UPGRADE_NOTE: Object FileSystemObject may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1029"'  
693:         FileSystemObject = Nothing  
694:           
695:         'Create a logfile  
696:         Call MakeLogFile("DocGeneration")  
697:           
698:         Dim BuildResult As Boolean  
699:         Dim Builder As New DocBuilderClass  
700:         Builder.SetDataStoreConnectionString((ApplicationDataStoreConnectionString))  
701:         Call AppendToLogFile(CurrentLogFileName, "Calling documentation routines" & vbCrLf)  
702:         BuildResult = Builder.BuildDocumentation(CurrentParseID, VB6.GetPath & "\Reports\" & ListProjects.Text, CurrentProjectHTMLOutput, CurrentProjectHTMLHelpOutput, CurrentProjectTextOutput, CurrentProjectRTFOutput, CurrentProjectColourCodeSource)  
703:         CommandExtractProjectData.Enabled = True  
704:         CommandViewOutputFolder.Enabled = True  
705:         CommandViewOutputHTML.Enabled = True  
706:         CommandViewOutputHTMLHelp.Enabled = True  
707:         FormMain.DefInstance.UpdateStatus((""))  
708:         FormMain.DefInstance.Cursor = System.Windows.Forms.Cursors.Arrow  
709:           
710:     End Sub  
711:       
712:     Private Sub CommandEditProject_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CommandEditProject.Click  
713:         'Edits a project called CurrentProjectName  
714:         CurrentAction = "EDIT PROJECT"  
715:         'UPGRADE_ISSUE: Load statement is not supported. Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1039"'  
716:         Load(FormEditProject)  
717:         FormEditProject.DefInstance.Visible = True  
718:           
719:     End Sub  
720:       
721:     Private Sub CommandQuit_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CommandQuit.Click  
722:         FormMain.DefInstance.Close()  
723:         FormEditProject.DefInstance.Close()  
724:         FormEditDatabase.DefInstance.Close()  
725:         FormEditConnections.DefInstance.Close()  
726:         FormConnection.DefInstance.Close()  
727:         FormAbout.DefInstance.Close()  
728:     End Sub  
729:       
730:     Private Sub CommandExtractProjectData_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CommandExtractProjectData.Click  
731:           
732:         FormMain.DefInstance.Cursor = System.Windows.Forms.Cursors.WaitCursor  
733:         CommandExtractProjectData.Enabled = False  
734:           
735:         Dim DataStore As New DataStoreClass  
736:         DataStore.SetConnectionString((ApplicationDataStoreConnectionString))  
737:         Dim SQL As String  
738:           
739:         'Create the output folder  
740:         Dim FileSystemObject As New Scripting.FileSystemObject  
741:         'Ensure Reports folder exists  
742:         If Not FileSystemObject.FolderExists(VB6.GetPath & "\Reports") Then  
743:             FileSystemObject.CreateFolder(VB6.GetPath & "\Reports")  
744:         End If  
745:           
746:         'Create folder for the specific project  
747:         If Not FileSystemObject.FolderExists(VB6.GetPath & "\Reports\" & ListProjects.Text) Then  
748:             FileSystemObject.CreateFolder(VB6.GetPath & "\Reports\" & ListProjects.Text)  
749:         End If  
750:           
751:         'Create a logfile  
752:         Call MakeLogFile("DataExtraction")  
753:           
754:         Dim IndividualServers As New Scripting.Dictionary  
755:           
756:         'UPGRADE_NOTE: Object FileSystemObject may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1029"'  
757:         FileSystemObject = Nothing  
758:         'Clean the folder  
759:           
760:         'Document a parse (temp)  
761:         'CurrentParseID = 74  
762:         'Dim BuildResult As Boolean  
763:         'Dim Builder As New DocumentationBuilderClass  
764:         'Builder.SetDataStoreConnectionString (ApplicationDataStoreConnectionString)  
765:         'Call AppendToLogFile(CurrentLogFileName, "Calling documentation routines" & vbCrLf)  
766:         'BuildResult = Builder.BuildDocumentation(CurrentParseID, App.Path & "\Reports\" & ListProjects.Text, CurrentProjectHTMLHelpOutput)  
767:         'CommandExtractProjectData.Enabled = True  
768:         'FormMain.UpdateStatus ("")  
769:         'Exit Sub  
770:           
771:         'Get current job constants  
772:         'Temporarily set project id and parse id  
773:         'CurrentProjectID = 2  
774:         'CurrentParseID = 1  
775:           
776:         'Increment the parses, adding a new one to the datastore  
777:         Dim InsertSQL As String  
778:         InsertSQL = "INSERT INTO "  
779:         InsertSQL = InsertSQL & "t_Parses "  
780:         InsertSQL = InsertSQL & "( "  
781:         InsertSQL = InsertSQL & "fk_ProjectID"  
782:         InsertSQL = InsertSQL & ") values ("  
783:         InsertSQL = InsertSQL & CurrentProjectID  
784:         InsertSQL = InsertSQL & ")"  
785:         CurrentParseID = DataStore.ExecuteSQLReturnIdentity(InsertSQL)  
786:           
787:           
788:           
789:         Dim DatabaseName As String  
790:         SQL = "select * from t_Databases where DatabaseID = " & CurrentDatabaseID  
791:         DatabaseName = DataStore.ExecuteSQLReturnSingleValue(SQL, "DatabaseName")  
792:           
793:         'Iterate through databases in this project  
794:         SQL = "SELECT t_Databases.DatabaseID, "  
795:         SQL = SQL & "t_Databases.DatabaseName, "  
796:         SQL = SQL & "t_Connections.ConnectionID, "  
797:         SQL = SQL & "t_Connections.DatabaseServer, "  
798:         SQL = SQL & "t_Connections.DatabaseUsername, "  
799:         SQL = SQL & "t_Connections.DatabasePassword, "  
800:         SQL = SQL & "t_Connections.UseTrustedConnection "  
801:         SQL = SQL & "FROM t_Databases "  
802:         SQL = SQL & "INNER JOIN t_Connections ON "  
803:         SQL = SQL & "t_Connections.ConnectionID = t_Databases.fk_ConnectionID "  
804:         SQL = SQL & "WHERE fk_ProjectID = " & CurrentProjectID  
805:         SQL = SQL & ""  
806:         SQL = SQL & ""  
807:           
808:         Dim DatabasesRecordSet As ADOR.Recordset  
809:           
810:         DatabasesRecordSet = DataStore.GetRecordSet(SQL)  
811:         'ProjectsRecordSet.Open  
812:         Dim DataExtractor As New DataExtractClass  
813:         Dim ExtractDataResult As Boolean  
814:         Do While Not DatabasesRecordSet.EOF  
815:               
816:             CurrentDatabaseName = DatabasesRecordSet.Fields("DatabaseName").Value  
817:             CurrentDatabaseID = DatabasesRecordSet.Fields("DatabaseID").Value  
818:             CurrentConnectionID = DatabasesRecordSet.Fields("ConnectionID").Value  
819:             CurrentConnectionDatabaseServer = DatabasesRecordSet.Fields("DatabaseServer").Value  
820:             CurrentConnectionDatabaseUserName = DatabasesRecordSet.Fields("DatabaseUserName").Value  
821:             CurrentConnectionDatabasePassword = DatabasesRecordSet.Fields("DatabasePassword").Value  
822:             CurrentConnectionUseTrustedConnection = DatabasesRecordSet.Fields("UseTrustedConnection").Value  
823:               
824:             'Parse the SQL Server database  
825:               
826:             DataExtractor.SetDataStoreConnectionString((ApplicationDataStoreConnectionString))  
827:               
828:             Call AppendToLogFile(CurrentLogFileName, "Extracting data from database '" & CurrentDatabaseName & "'" & vbCrLf)
829:               
830:             ExtractDataResult = DataExtractor.ExtractData(CurrentProjectID, CurrentParseID, CurrentDatabaseID, CurrentDatabaseName, CurrentConnectionDatabaseServer, CurrentConnectionDatabaseUserName, CurrentConnectionDatabasePassword, CurrentConnectionUseTrustedConnection)  
831:               
832:             'Here we need to parse each database's msdb database to extract information about DTS Packages and SQL Server Jobs  
833:               
834:               
835:             'Check that this one hasn't been done before  
836:             'UPGRADE_WARNING: Couldn't resolve default property of object IndividualServers(CurrentConnectionDatabaseServer). Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"'  
837:             If IndividualServers(CurrentConnectionDatabaseServer) = 1 Then  
838:                 'Already been done  
839:                   
840:             Else  
841:                 'Document this database's Jobs and DTS Packages  
842:                 Call AppendToLogFile(CurrentLogFileName, "Extracting database specific content from database '" & CurrentDatabaseName & "'" & vbCrLf)
843:                 CurrentDatabaseName = "msdb"  
844:                 ExtractDataResult = DataExtractor.ExtractDatabaseSpecificContent(CurrentProjectID, CurrentParseID, CurrentConnectionID, CurrentConnectionDatabaseServer, CurrentConnectionDatabaseUserName, CurrentConnectionDatabasePassword, CurrentConnectionUseTrustedConnection)  
845:                   
846:                 'UPGRADE_WARNING: Couldn't resolve default property of object IndividualServers(). Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"'  
847:                 IndividualServers(CurrentConnectionDatabaseServer) = 1  
848:             End If  
849:               
850:               
851:             DatabasesRecordSet.MoveNext()  
852:               
853:               
854:         Loop  
855:           
856:           
857:           
858:         Call GetParsesInProject()  
859:           
860:         FormMain.DefInstance.UpdateStatus((""))  
861:         CommandExtractProjectData.Enabled = True  
862:           
863:         'Select the current parse  
864:         ListParses.SetSelected(0, True)  
865:           
866:         CommandDocumentProject.Enabled = True  
867:         FormMain.DefInstance.Cursor = System.Windows.Forms.Cursors.Arrow  
868:           
869:     End Sub  
870:     'Show the product's website  
871:     Private Sub CommandUpgrade_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CommandUpgrade.Click  
872:           
873:         Dim ret As Integer  
874:         ret = ShellExecute(Me.Handle.ToInt32, "Open", ApplicationURL, "", "", 1)  
875:           
876:     End Sub  
877:     'Displays the logs folder (perhaps could be improved in later version???)  
878:     Private Sub CommandViewLogs_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CommandViewLogs.Click  
879:           
880:         Dim FileSystemObject As New Scripting.FileSystemObject  
881:         Dim LogFolder As String  
882:         Dim Result As Short  
883:           
884:         LogFolder = VB6.GetPath & "/Logs"  
885:           
886:         'Ensure output folder exists  
887:         If Not FileSystemObject.FolderExists(LogFolder) Then  
888:               
889:             Result = MsgBox("The logs folder " & LogFolder & " could not be found", MsgBoxStyle.Critical, ApplicationName)  
890:             If Result = MsgBoxResult.OK Then Exit Sub  
891:               
892:         End If  
893:           
894:         FormMain.DefInstance.UpdateStatus(("Viewing logs folder " & LogFolder))  
895:           
896:         'Open the output folder in Explorer  
897:         Dim ret As Integer  
898:         ret = ShellExecute(Me.Handle.ToInt32, "Open", LogFolder, "", "", 1)  
899:           
900:     End Sub  
901:       
902:     'Opens the output folder for the specified project  
903:     Private Sub CommandViewOutputFolder_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CommandViewOutputFolder.Click  
904:           
905:         Dim FileSystemObject As New Scripting.FileSystemObject  
906:         Dim Result As Short  
907:           
908:         'Ensure output folder exists  
909:         If Not FileSystemObject.FolderExists(CurrentProjectOutputFolder) Then  
910:               
911:             Result = MsgBox("The output folder " & CurrentProjectOutputFolder & " could not be found", MsgBoxStyle.Critical, ApplicationName)  
912:             If Result = MsgBoxResult.OK Then Exit Sub  
913:               
914:         End If  
915:           
916:         FormMain.DefInstance.UpdateStatus(("Viewing folder " & CurrentProjectOutputFolder))  
917:           
918:         'Open the output folder in Explorer  
919:         Dim ret As Integer  
920:         ret = ShellExecute(Me.Handle.ToInt32, "Open", CurrentProjectOutputFolder, "", "", 1)  
921:           
922:     End Sub  
923:     'Opens the output HTML documentation for the specified project  
924:     Private Sub CommandViewOutputHTML_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CommandViewOutputHTML.Click  
925:           
926:         Dim FileSystemObject As New Scripting.FileSystemObject  
927:         Dim Result As Short  
928:           
929:         'Ensure output folder exists  
930:         If Not FileSystemObject.FileExists(CurrentProjectOutputFolder & "\Default.htm") Then  
931:               
932:             Result = MsgBox("The HTML output file " & CurrentProjectOutputFolder & "\Default.htm" & " could not be found", MsgBoxStyle.Critical, ApplicationName)  
933:             If Result = MsgBoxResult.OK Then Exit Sub  
934:               
935:         End If  
936:           
937:         FormMain.DefInstance.UpdateStatus(("Viewing file " & CurrentProjectOutputFolder & "\Default.htm"))  
938:           
939:         'Open the output folder in Explorer  
940:         Dim ret As Integer  
941:         ret = ShellExecute(Me.Handle.ToInt32, "Open", CurrentProjectOutputFolder & "\Default.htm", "", "", 1)  
942:           
943:     End Sub  
944:     'Opens the output HTML documentation for the specified project  
945:     Private Sub CommandViewOutputHTMLHelp_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CommandViewOutputHTMLHelp.Click  
946:           
947:         Dim FileSystemObject As New Scripting.FileSystemObject  
948:         Dim HTMLHelpFileName As String  
949:         Dim Result As Short  
950:           
951:         HTMLHelpFileName = CurrentProjectOutputFolder & "\" & CurrentProjectName & ".chm"  
952:           
953:         'Ensure output folder exists  
954:         If Not FileSystemObject.FileExists(HTMLHelpFileName) Then  
955:               
956:             Result = MsgBox("The HTML Help output file " & HTMLHelpFileName & " could not be found", MsgBoxStyle.Critical, ApplicationName)  
957:             If Result = MsgBoxResult.OK Then Exit Sub  
958:               
959:         End If  
960:           
961:         FormMain.DefInstance.UpdateStatus(("Viewing file " & HTMLHelpFileName))  
962:           
963:         'Open the output folder in Explorer  
964:         Dim ret As Integer  
965:         ret = ShellExecute(Me.Handle.ToInt32, "Open", HTMLHelpFileName, "", "", 1)  
966:           
967:     End Sub  
968:       
969:     'Deletes a specific parse of the selected project  
970:     Public Sub DeleteParse_Popup(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles DeleteParse.Popup  
971:         DeleteParse_Click(eventSender, eventArgs)  
972:     End Sub  
973:     Public Sub DeleteParse_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles DeleteParse.Click  
974:           
975:         Dim Result As Short  
976:           
977:         If CurrentParseID = 0 Or CurrentProjectID = 0 Then  
978:             Exit Sub  
979:         End If  
980:           
981:         Result = MsgBox("Are you sure you want to remove the data for this parse from the DataStore?", MsgBoxStyle.OKCancel, System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly.Location).ProductName)  
982:         If Result = MsgBoxResult.Cancel Then Exit Sub  
983:           
984:         Dim DataStore As New DataStoreClass  
985:         DataStore.SetConnectionString((ApplicationDataStoreConnectionString))  
986:           
987:         'Clean the database  
988:         Dim SQL As String  
989:         Dim SQLResult As Boolean  
990:           
991:         FormMain.DefInstance.UpdateStatus(("Deleting Jobs in selected parse from DataStore"))  
992:         SQL = "delete from t_JobSchedules where fk_JobID in (select JobID from t_Jobs where fk_ParseID = " & CurrentParseID & ")"  
993:         SQLResult = DataStore.ExecuteSQL(SQL)  
994:         SQL = "delete from t_JobSteps where fk_JobID in (select JobID from t_Jobs where fk_ParseID = " & CurrentParseID & ")"  
995:         SQLResult = DataStore.ExecuteSQL(SQL)  
996:         SQL = "delete from t_Jobs where fk_ParseID = " & CurrentParseID  
997:         SQLResult = DataStore.ExecuteSQL(SQL)  
998:           
999:         FormMain.DefInstance.UpdateStatus(("Deleting DTS Packages in selected parse from DataStore"))  
1000:         SQL = "delete from t_Packages where fk_ParseID = " & CurrentParseID  
1001:         SQLResult = DataStore.ExecuteSQL(SQL)  
1002:           
1003:         FormMain.DefInstance.UpdateStatus(("Deleting Tables in selected parse from DataStore"))  
1004:           
1005:         SQL = "delete from t_TableRelationships where "  
1006:         SQL = SQL & "fk_PrimaryKeyColumnID in "  
1007:         SQL = SQL & "(select ColumnID from t_TableColumns where fk_TableID in (select TableID from t_Tables where fk_ParseID = " & CurrentParseID & ")) "  
1008:         SQL = SQL & "or "  
1009:         SQL = SQL & "fk_ForeignKeyColumnID in "  
1010:         SQL = SQL & "(select ColumnID from t_TableColumns where fk_TableID in (select TableID from t_Tables where fk_ParseID = " & CurrentParseID & ")) "  
1011:         SQLResult = DataStore.ExecuteSQL(SQL)  
1012:           
1013:         'Table Index Columns  
1014:         SQL = "delete from t_TableIndexColumns where fk_IndexID in (select IndexID from t_TableIndexes where fk_TableID in (select TableID from t_Tables where fk_ParseID = " & CurrentParseID & "))"  
1015:         SQLResult = DataStore.ExecuteSQL(SQL)  
1016:           
1017:         'Table Indexes  
1018:         SQL = "delete from t_TableIndexes where fk_TableID in (select TableID from t_Tables where fk_ParseID = " & CurrentParseID & ")"  
1019:         SQLResult = DataStore.ExecuteSQL(SQL)  
1020:           
1021:         SQL = "delete from t_TableColumns where fk_TableID in (select TableID from t_Tables where fk_ParseID = " & CurrentParseID & ")"  
1022:         SQLResult = DataStore.ExecuteSQL(SQL)  
1023:           
1024:         SQL = "delete from t_FullTextCatalogsTableColumns where fk_TableID in (select TableID from t_Tables where fk_ParseID = " & CurrentParseID & ")"  
1025:         SQLResult = DataStore.ExecuteSQL(SQL)  
1026:           
1027:         SQL = "delete from t_FullTextCatalogsTables where fk_TableID in (select TableID from t_Tables where fk_ParseID = " & CurrentParseID & ")"  
1028:         SQLResult = DataStore.ExecuteSQL(SQL)  
1029:           
1030:         FormMain.DefInstance.UpdateStatus(("Deleting Triggers from DataStore"))  
1031:         SQL = "delete from t_Triggers where fk_TableID in (select TableID from t_Tables where fk_ParseID = " & CurrentParseID & ")"  
1032:         SQLResult = DataStore.ExecuteSQL(SQL)  
1033:           
1034:         SQL = "delete from t_FullTextCatalogs where fk_ParseID = " & CurrentParseID  
1035:         SQLResult = DataStore.ExecuteSQL(SQL)  
1036:           
1037:         SQL = "delete from t_Tables where fk_ParseID = " & CurrentParseID  
1038:         SQLResult = DataStore.ExecuteSQL(SQL)  
1039:           
1040:         FormMain.DefInstance.UpdateStatus(("Deleting Views in selected parse from DataStore"))  
1041:         SQL = "delete from t_ViewColumns where fk_ViewID in (select ViewID from t_Views where fk_ParseID = " & CurrentParseID & ")"  
1042:         SQLResult = DataStore.ExecuteSQL(SQL)  
1043:           
1044:         SQL = "delete from t_Views where fk_ParseID = " & CurrentParseID  
1045:         SQLResult = DataStore.ExecuteSQL(SQL)  
1046:           
1047:         FormMain.DefInstance.UpdateStatus(("Deleting Stored Procedures in selected parse from DataStore"))  
1048:           
1049:         SQL = "delete from t_StoredProcedureColumns where fk_StoredProcedureID in (select StoredProcedureID from t_StoredProcedures where fk_ParseID = " & CurrentParseID & ")"  
1050:         SQLResult = DataStore.ExecuteSQL(SQL)  
1051:           
1052:         SQL = "delete from t_StoredProcedures where fk_ParseID = " & CurrentParseID  
1053:         SQLResult = DataStore.ExecuteSQL(SQL)  
1054:           
1055:           
1056:         FormMain.DefInstance.UpdateStatus(("Deleting selected parse from DataStore"))  
1057:         SQL = "delete from t_Parses where ParseID = " & CurrentParseID  
1058:         SQLResult = DataStore.ExecuteSQL(SQL)  
1059:           
1060:         CurrentParseID = 0  
1061:         Call GetParsesInProject()  
1062:           
1063:         FormMain.DefInstance.UpdateStatus(("Selected parse of project was removed from the DataStore"))  
1064:           
1065:     End Sub  
1066:     'Deletes a specific project  
1067:     Public Sub DeleteProject_Popup(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles DeleteProject.Popup  
1068:         DeleteProject_Click(eventSender, eventArgs)  
1069:     End Sub  
1070:     Public Sub DeleteProject_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles DeleteProject.Click  
1071:           
1072:         Dim Result As Short  
1073:           
1074:         If CurrentProjectID = 0 Then  
1075:             Exit Sub  
1076:         End If  
1077:           
1078:         Result = MsgBox("Are you sure you want to completely remove this project from the DataStore?", MsgBoxStyle.OKCancel, System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly.Location).ProductName)  
1079:         If Result = MsgBoxResult.Cancel Then Exit Sub  
1080:           
1081:         Dim DataStore As New DataStoreClass  
1082:         DataStore.SetConnectionString((ApplicationDataStoreConnectionString))  
1083:           
1084:         'Clean the database  
1085:         Dim SQL As String  
1086:         Dim SQLResult As Boolean  
1087:           
1088:         FormMain.DefInstance.UpdateStatus(("Deleting Jobs in selected parse from DataStore"))  
1089:         SQL = "delete from t_JobSchedules where fk_JobID in (select JobID from t_Jobs where fk_ParseID in (select ParseID from t_Parses where fk_ProjectID = " & CurrentProjectID & "))"  
1090:         SQLResult = DataStore.ExecuteSQL(SQL)  
1091:         SQL = "delete from t_JobSteps where fk_JobID in (select JobID from t_Jobs where fk_ParseID in (select ParseID from t_Parses where fk_ProjectID = " & CurrentProjectID & "))"  
1092:         SQLResult = DataStore.ExecuteSQL(SQL)  
1093:         SQL = "delete from t_Jobs where fk_ParseID in (select ParseID from t_Parses where fk_ProjectID = " & CurrentProjectID & ")"  
1094:         SQLResult = DataStore.ExecuteSQL(SQL)  
1095:           
1096:         FormMain.DefInstance.UpdateStatus(("Deleting DTS Packages in selected parse from DataStore"))  
1097:         SQL = "delete from t_Packages where fk_ParseID in (select ParseID from t_Parses where fk_ProjectID = " & CurrentProjectID & ")"  
1098:         SQLResult = DataStore.ExecuteSQL(SQL)  
1099:           
1100:         FormMain.DefInstance.UpdateStatus(("Deleting Tables in selected project from DataStore"))  
1101:           
1102:         SQL = "delete from t_TableRelationships where "  
1103:         SQL = SQL & "fk_PrimaryKeyColumnID in "  
1104:         SQL = SQL & "(select ColumnID from t_TableColumns where fk_TableID in (select TableID from t_Tables where fk_ParseID in (select ParseID from t_Parses where fk_ProjectID = " & CurrentProjectID & "))) "  
1105:         SQL = SQL & "or "  
1106:         SQL = SQL & "fk_ForeignKeyColumnID in "  
1107:         SQL = SQL & "(select ColumnID from t_TableColumns where fk_TableID in (select TableID from t_Tables where fk_ParseID in (select ParseID from t_Parses where fk_ProjectID = " & CurrentProjectID & "))) "  
1108:         SQLResult = DataStore.ExecuteSQL(SQL)  
1109:           
1110:         'Table Index Columns  
1111:         'SQL = "delete from t_TableIndexColumns where fk_IndexID in (select IndexID from t_TableIndexes where fk_TableID in (select TableID from t_Tables where fk_ParseID in (select ParseID from t_Parses where fk_ProjectID = " & CurrentProjectID & "))"  
1112:         SQL = "delete from t_TableIndexColumns where fk_ColumnID in (select ColumnID from t_TableColumns where fk_TableID in (select TableID from t_Tables where fk_ParseID in (select ParseID from t_Parses where fk_ProjectID = " & CurrentProjectID & ")))"  
1113:         SQLResult = DataStore.ExecuteSQL(SQL)  
1114:           
1115:         'Table Indexes  
1116:         SQL = "delete from t_TableIndexes where fk_TableID in (select TableID from t_Tables where fk_ParseID in (select ParseID from t_Parses where fk_ProjectID = " & CurrentProjectID & "))"  
1117:         SQLResult = DataStore.ExecuteSQL(SQL)  
1118:           
1119:         SQL = "delete from t_TableColumns where fk_TableID in (select TableID from t_Tables where fk_ParseID in (select ParseID from t_Parses where fk_ProjectID = " & CurrentProjectID & "))"  
1120:         SQLResult = DataStore.ExecuteSQL(SQL)  
1121:           
1122:         SQL = "delete from t_FullTextCatalogsTableColumns where fk_TableID in (select TableID from t_Tables where fk_ParseID in (select ParseID from t_Parses where fk_ProjectID = " & CurrentProjectID & "))"  
1123:         SQLResult = DataStore.ExecuteSQL(SQL)  
1124:           
1125:         SQL = "delete from t_FullTextCatalogsTables where fk_TableID in (select TableID from t_Tables where fk_ParseID in (select ParseID from t_Parses where fk_ProjectID = " & CurrentProjectID & "))"  
1126:         SQLResult = DataStore.ExecuteSQL(SQL)  
1127:           
1128:         FormMain.DefInstance.UpdateStatus(("Deleting Triggers from DataStore"))  
1129:         SQL = "delete from t_Triggers where fk_TableID in (select TableID from t_Tables where fk_ParseID in (select ParseID from t_Parses where fk_ProjectID = " & CurrentProjectID & "))"  
1130:         SQLResult = DataStore.ExecuteSQL(SQL)  
1131:           
1132:         FormMain.DefInstance.UpdateStatus(("Deleting Full-Text Catalogs from DataStore"))  
1133:         SQL = "delete from t_FullTextCatalogs where fk_ParseID in (select ParseID from t_Parses where fk_ProjectID = " & CurrentProjectID & ") "  
1134:         SQLResult = DataStore.ExecuteSQL(SQL)  
1135:           
1136:         SQL = "delete from t_Tables where fk_ParseID in (select ParseID from t_Parses where fk_ProjectID = " & CurrentProjectID & ") "  
1137:         SQLResult = DataStore.ExecuteSQL(SQL)  
1138:           
1139:         FormMain.DefInstance.UpdateStatus(("Deleting Views in selected project from DataStore"))  
1140:         SQL = "delete from t_ViewColumns where fk_ViewID in (select ViewID from t_Views where fk_ParseID in (select ParseID from t_Parses where fk_ProjectID = " & CurrentProjectID & ")) "  
1141:         SQLResult = DataStore.ExecuteSQL(SQL)  
1142:           
1143:         SQL = "delete from t_Views where fk_ParseID in (select ParseID from t_Parses where fk_ProjectID = " & CurrentProjectID & ") "  
1144:         SQLResult = DataStore.ExecuteSQL(SQL)  
1145:           
1146:         FormMain.DefInstance.UpdateStatus(("Deleting Stored Procedures in selected project from DataStore"))  
1147:           
1148:         SQL = "delete from t_StoredProcedureColumns where fk_StoredProcedureID in (select StoredProcedureID from t_StoredProcedures where fk_ParseID in (select ParseID from t_Parses where fk_ProjectID = " & CurrentProjectID & ")) "  
1149:         SQLResult = DataStore.ExecuteSQL(SQL)  
1150:           
1151:         SQL = "delete from t_StoredProcedures where fk_ParseID in (select ParseID from t_Parses where fk_ProjectID = " & CurrentProjectID & ") "  
1152:         SQLResult = DataStore.ExecuteSQL(SQL)  
1153:           
1154:         FormMain.DefInstance.UpdateStatus(("Deleting selected project from DataStore"))  
1155:         SQL = "delete from t_Parses where fk_ProjectID = " & CurrentProjectID  
1156:         SQLResult = DataStore.ExecuteSQL(SQL)  
1157:           
1158:         SQL = "delete from t_Projects where ProjectID = " & CurrentProjectID  
1159:         SQLResult = DataStore.ExecuteSQL(SQL)  
1160:           
1161:         CurrentParseID = 0  
1162:         CurrentProjectID = 0  
1163:           
1164:         ListParses.Items.Clear()  
1165:         Call UpdateFormSettings()  
1166:           
1167:         FormMain.DefInstance.UpdateStatus(("Selected project was removed from the DataStore"))  
1168:           
1169:     End Sub  
1170:     'Shows the documentation HTML Help file  
1171:     Public Sub Documentation_Popup(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Documentation.Popup  
1172:         Documentation_Click(eventSender, eventArgs)  
1173:     End Sub  
1174:     Public Sub Documentation_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Documentation.Click  
1175:         Dim FileSystemObject As New Scripting.FileSystemObject  
1176:         Dim HTMLHelpFileName As String  
1177:         Dim Result As Short  
1178:           
1179:         HTMLHelpFileName = VB6.GetPath & "\SQLDocumentationTool.chm"  
1180:           
1181:         'Ensure output folder exists  
1182:         If Not FileSystemObject.FileExists(HTMLHelpFileName) Then  
1183:               
1184:             Result = MsgBox("The Help file " & HTMLHelpFileName & " could not be found", MsgBoxStyle.Critical, ApplicationName)  
1185:             If Result = MsgBoxResult.OK Then Exit Sub  
1186:               
1187:         End If  
1188:           
1189:         FormMain.DefInstance.UpdateStatus(("Viewing help"))  
1190:           
1191:         'Open the output folder in Explorer  
1192:         Dim ret As Integer  
1193:         ret = ShellExecute(Me.Handle.ToInt32, "Open", HTMLHelpFileName, "", "", 1)  
1194:     End Sub  
1195:       
1196:     Public Sub Exit_Renamed_Popup(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Exit_Renamed.Popup  
1197:         Exit_Renamed_Click(eventSender, eventArgs)  
1198:     End Sub  
1199:     Public Sub Exit_Renamed_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Exit_Renamed.Click  
1200:         Call CommandQuit_Click(CommandQuit, New System.EventArgs())  
1201:     End Sub  
1202:       
1203:     Private Sub FormMain_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Click  
1204:         Call UpdateCommands()  
1205:     End Sub  
1206:       
1207:     Private Sub FormMain_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load  
1208:         Call InitialiseSettings()  
1209:           
1210:         FormMain.DefInstance.Text = ApplicationName  
1211:           
1212:         Call UpdateFormSettings()  
1213:         Call UpdateCommands()  
1214:         'Debug.Print foo  
1215:     End Sub  
1216:     Public Sub UpdateFormSettings()  
1217:           
1218:         Dim DataStore As New DataStoreClass  
1219:         Dim SQL As String  
1220:           
1221:         ListProjects.Items.Clear()  
1222:         DataStore.SetConnectionString((ApplicationDataStoreConnectionString))  
1223:           
1224:         'Dim ProjectsRecordSet As ADODB.Recordset  
1225:         SQL = "SELECT * FROM t_Projects ORDER BY ProjectName"  
1226:           
1227:         'Set ProjectsRecordSet = DataStore.GetRecordSet(SQL)  
1228:         Dim ProjectsRecordSet As ADOR.Recordset  
1229:           
1230:         ProjectsRecordSet = DataStore.GetRecordSet(SQL)  
1231:         'ProjectsRecordSet.Open  
1232:         If ProjectsRecordSet.State = 1 Then  
1233:             Do While Not ProjectsRecordSet.EOF  
1234:                   
1235:                 ListProjects.Items.Add(ProjectsRecordSet.Fields("ProjectName").Value)  
1236:                 ProjectsRecordSet.MoveNext()  
1237:                   
1238:             Loop  
1239:         End If  
1240:           
1241:     End Sub  
1242:       
1243:     'UPGRADE_WARNING: Form event FormMain.Unload has a new behavior. Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup2065"'  
1244:     Private Sub FormMain_Closed(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Closed  
1245:         FormMain.DefInstance.Close()  
1246:         FormEditProject.DefInstance.Close()  
1247:         FormEditDatabase.DefInstance.Close()  
1248:         FormEditConnections.DefInstance.Close()  
1249:         FormConnection.DefInstance.Close()  
1250:         FormAbout.DefInstance.Close()  
1251:     End Sub  
1252:       
1253:     'UPGRADE_WARNING: Event ListParses.SelectedIndexChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup2075"'  
1254:     Private Sub ListParses_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles ListParses.SelectedIndexChanged  
1255:           
1256:         Dim CurrentParse As Integer  
1257:         CurrentParse = ListParses.SelectedIndex  
1258:         'UPGRADE_WARNING: Couldn't resolve default property of object ParsesDictionary.Item(). Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"'  
1259:         CurrentParseID = ParsesDictionary.Item(CurrentParse)  
1260:         CommandDocumentProject.Enabled = True  
1261:           
1262:         Call UpdateCommands()  
1263:           
1264:     End Sub  
1265:       
1266:     'UPGRADE_WARNING: Event ListProjects.SelectedIndexChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup2075"'  
1267:     Private Sub ListProjects_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles ListProjects.SelectedIndexChanged  
1268:           
1269:         Dim DataStore As New DataStoreClass  
1270:         DataStore.SetConnectionString((ApplicationDataStoreConnectionString))  
1271:         Dim SQL As String  
1272:           
1273:         CurrentProjectName = ListProjects.Text  
1274:         CurrentParseID = 0  
1275:           
1276:         Dim ProjectsRecordSet As ADOR.Recordset  
1277:         Dim FileSystemObject As New Scripting.FileSystemObject  
1278:         If CurrentProjectName <> "" Then  
1279:               
1280:             'SQL = "SELECT t_Projects.*, t_Databases.* FROM t_Projects "  
1281:             SQL = "SELECT t_Projects.* FROM t_Projects "  
1282:             'SQL = SQL & "LEFT OUTER JOIN t_Databases ON t_Databases.fk_ProjectID = t_Projects.ProjectID "  
1283:             '    SQL = SQL & "LEFT OUTER JOIN t_Connections ON t_Databases.fk_ConnectionID = t_Connections.ConnectionID "  
1284:             SQL = SQL & "WHERE ProjectName = '" & CurrentProjectName & "'"
1285:               
1286:               
1287:             ProjectsRecordSet = DataStore.GetRecordSet(SQL)  
1288:               
1289:             Do While Not ProjectsRecordSet.EOF  
1290:                   
1291:                 CurrentProjectID = ProjectsRecordSet.Fields("ProjectID").Value  
1292:                 '???? what's this here for?  
1293:                 'CurrentDatabaseID = ProjectsRecordSet.Fields("DatabaseID").Value  
1294:                 'CurrentDatabaseName = ProjectsRecordSet.Fields("DatabaseName").Value  
1295:                 CurrentProjectHTMLOutput = ProjectsRecordSet.Fields("HTMLOutput").Value  
1296:                 CurrentProjectHTMLHelpOutput = ProjectsRecordSet.Fields("HTMLHelpOutput").Value  
1297:                 CurrentProjectTextOutput = ProjectsRecordSet.Fields("TextOutput").Value  
1298:                 CurrentProjectRTFOutput = ProjectsRecordSet.Fields("RTFOutput").Value  
1299:                 CurrentProjectColourCodeSource = ProjectsRecordSet.Fields("ColourCodeSource").Value  
1300:                 CurrentProjectDocumentTableColumnDescriptions = ProjectsRecordSet.Fields("DocumentTableColumnDescriptions").Value  
1301:                 CurrentProjectDocumentJobs = ProjectsRecordSet.Fields("DocumentJobs").Value  
1302:                 CurrentProjectDocumentDTSPackages = ProjectsRecordSet.Fields("DocumentDTSPackages").Value  
1303:                 CurrentProjectOutputFolder = VB6.GetPath & "\Reports\" & CurrentProjectName  
1304:                   
1305:                 '      CurrentConnectionID = ProjectsRecordSet.Fields("ConnectionID").Value  
1306:                 '     CurrentDatabaseServer = ProjectsRecordSet.Fields("DatabaseServer").Value  
1307:                 '    CurrentDatabaseUserName = ProjectsRecordSet.Fields("DatabaseUserName").Value  
1308:                 '   CurrentDatabasePassword = ProjectsRecordSet.Fields("DatabasePassword").Value  
1309:                   
1310:                 ProjectsRecordSet.MoveNext()  
1311:             Loop  
1312:               
1313:               
1314:             'Prevent user viewing documentation for projects that don't have documentation  
1315:               
1316:             'Ensure output folder exists  
1317:             If Not FileSystemObject.FolderExists(CurrentProjectOutputFolder) Then  
1318:                   
1319:                 CommandViewOutputFolder.Enabled = False  
1320:                 CommandViewOutputHTML.Enabled = False  
1321:                 CommandViewOutputHTMLHelp.Enabled = False  
1322:                   
1323:             Else  
1324:                   
1325:                 CommandViewOutputFolder.Enabled = True  
1326:                 CommandViewOutputHTML.Enabled = True  
1327:                 CommandViewOutputHTMLHelp.Enabled = True  
1328:                   
1329:             End If  
1330:               
1331:             Call GetParsesInProject()  
1332:               
1333:         End If  
1334:           
1335:         Call UpdateCommands()  
1336:           
1337:     End Sub  
1338:       
1339:     Private Sub ListProjects_Leave(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles ListProjects.Leave  
1340:           
1341:         Call UpdateCommands()  
1342:           
1343:     End Sub  
1344:     Private Sub GetParsesInProject()  
1345:           
1346:         Dim DataStore As New DataStoreClass  
1347:         DataStore.SetConnectionString((ApplicationDataStoreConnectionString))  
1348:         Dim SQL As String  
1349:           
1350:         'Populate parses list box for specific project  
1351:         ListParses.Items.Clear()  
1352:         ParsesDictionary.RemoveAll()  
1353:           
1354:         SQL = "SELECT t_Parses.* FROM "  
1355:         SQL = SQL & "t_Parses "  
1356:         SQL = SQL & "WHERE fk_ProjectID = " & CurrentProjectID & " "  
1357:         SQL = SQL & "ORDER BY ParseID DESC"  
1358:           
1359:         Dim ParsesRecordSet As ADOR.Recordset  
1360:         Dim ParseNumber As Integer  
1361:         Dim ParseID As Integer  
1362:         Dim ParseDate As Object  
1363:         Dim i As Integer  
1364:           
1365:         ParsesRecordSet = DataStore.GetRecordSet(SQL)  
1366:         i = 0  
1367:           
1368:         Do While Not ParsesRecordSet.EOF  
1369:             ParseID = ParsesRecordSet.Fields("ParseID").Value  
1370:             'UPGRADE_WARNING: Couldn't resolve default property of object ParseDate. Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"'  
1371:             ParseDate = ParsesRecordSet.Fields("ParseDate").Value  
1372:               
1373:             'UPGRADE_WARNING: Couldn't resolve default property of object ParseDate. Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"'  
1374:             ListParses.Items.Add(FormatDateTime(ParseDate, DateFormat.LongDate) & " " & FormatDateTime(ParseDate, DateFormat.LongTime))  
1375:             ParsesDictionary.Add(i, ParseID)  
1376:             i = i + 1  
1377:               
1378:             ParsesRecordSet.MoveNext()  
1379:         Loop  
1380:           
1381:         'If there aren't any parses in this project then disable the documentation generation button  
1382:         'If i = 0 Then  
1383:         CommandDocumentProject.Enabled = False  
1384:         'Else  
1385:         '   CommandDocumentProject.Enabled = True  
1386:         'End If  
1387:           
1388:           
1389:     End Sub  
1390:     Private Sub UpdateCommands()  
1391:           
1392:         If ListProjects.Text = "" Then  
1393:             CommandExtractProjectData.Enabled = False  
1394:         Else  
1395:             CommandExtractProjectData.Enabled = True  
1396:         End If  
1397:           
1398:         If ListProjects.Text = "" Then  
1399:             CommandEditProject.Enabled = False  
1400:         Else  
1401:             CommandEditProject.Enabled = True  
1402:         End If  
1403:           
1404:         If CurrentProjectID > 0 Then  
1405:               
1406:             DeleteProject.Enabled = True  
1407:               
1408:         Else  
1409:               
1410:             DeleteProject.Enabled = False  
1411:               
1412:         End If  
1413:           
1414:         If CurrentParseID > 0 Then  
1415:               
1416:             DeleteParse.Enabled = True  
1417:               
1418:         Else  
1419:               
1420:             DeleteParse.Enabled = False  
1421:               
1422:         End If  
1423:           
1424:     End Sub  
1425:     'Updates the status panel  
1426:     Public Sub UpdateStatus(ByRef StatusMessage As String)  
1427:         TextStatus.Text = StatusMessage  
1428:         TextStatus.Refresh()  
1429:     End Sub  
1430:     'Updates the current item panel  
1431:     Public Sub UpdateCurrentItem(ByRef CurrentItem As String)  
1432:         TextCurrentItem.Text = CurrentItem  
1433:         TextCurrentItem.Refresh()  
1434:     End Sub  
1435:     'Purges the data store of all the data, including the projects  
1436:     Public Sub PurgeAll_Popup(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles PurgeAll.Popup  
1437:         PurgeAll_Click(eventSender, eventArgs)  
1438:     End Sub  
1439:     Public Sub PurgeAll_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles PurgeAll.Click  
1440:           
1441:         Dim Result As Short  
1442:         Result = MsgBox("Are you sure you want to purge the data, projects and connection settings from the DataStore?", MsgBoxStyle.OKCancel, System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly.Location).ProductName)  
1443:         If Result = MsgBoxResult.Cancel Then Exit Sub  
1444:           
1445:         Dim DataStore As New DataStoreClass  
1446:         DataStore.SetConnectionString((ApplicationDataStoreConnectionString))  
1447:           
1448:         'Clean the database  
1449:         Dim SQL As String  
1450:         Dim SQLResult As Boolean  
1451:           
1452:         FormMain.DefInstance.UpdateStatus(("Deleting Jobs from DataStore"))  
1453:         SQL = "delete from t_JobSchedules"  
1454:         SQLResult = DataStore.ExecuteSQL(SQL)  
1455:         SQL = "delete from t_JobSteps"  
1456:         SQLResult = DataStore.ExecuteSQL(SQL)  
1457:         SQL = "delete from t_Jobs"  
1458:         SQLResult = DataStore.ExecuteSQL(SQL)  
1459:           
1460:         FormMain.DefInstance.UpdateStatus(("Deleting DTS Packages from DataStore"))  
1461:         SQL = "delete from t_Packages"  
1462:         SQLResult = DataStore.ExecuteSQL(SQL)  
1463:           
1464:         FormMain.DefInstance.UpdateStatus(("Deleting Tables from DataStore"))  
1465:         SQL = "delete from t_TableIndexColumns"  
1466:         SQLResult = DataStore.ExecuteSQL(SQL)  
1467:         SQL = "delete from t_TableIndexes"  
1468:         SQLResult = DataStore.ExecuteSQL(SQL)  
1469:         SQL = "delete from t_TableColumns"  
1470:         SQLResult = DataStore.ExecuteSQL(SQL)  
1471:         SQL = "delete from t_TableRelationships"  
1472:         SQLResult = DataStore.ExecuteSQL(SQL)  
1473:         SQL = "delete from t_Tables"  
1474:         SQLResult = DataStore.ExecuteSQL(SQL)  
1475:           
1476:         FormMain.DefInstance.UpdateStatus(("Deleting Views from DataStore"))  
1477:         SQL = "delete from t_ViewColumns"  
1478:         SQLResult = DataStore.ExecuteSQL(SQL)  
1479:         SQL = "delete from t_Views"  
1480:         SQLResult = DataStore.ExecuteSQL(SQL)  
1481:           
1482:         FormMain.DefInstance.UpdateStatus(("Deleting Triggers from DataStore"))  
1483:         SQL = "delete from t_Triggers"  
1484:         SQLResult = DataStore.ExecuteSQL(SQL)  
1485:           
1486:         FormMain.DefInstance.UpdateStatus(("Deleting Stored Procedures from DataStore"))  
1487:         SQL = "delete from t_StoredProcedures"  
1488:         SQLResult = DataStore.ExecuteSQL(SQL)  
1489:         SQL = "delete from t_StoredProcedureColumns"  
1490:         SQLResult = DataStore.ExecuteSQL(SQL)  
1491:           
1492:         FormMain.DefInstance.UpdateStatus(("Deleting Full-Text Catalogs from DataStore"))  
1493:         SQL = "delete from t_FullTextCatalogs"  
1494:         SQLResult = DataStore.ExecuteSQL(SQL)  
1495:         SQL = "delete from t_FullTextCatalogsTableColumns"  
1496:         SQLResult = DataStore.ExecuteSQL(SQL)  
1497:         SQL = "delete from t_FullTextCatalogsTables"  
1498:         SQLResult = DataStore.ExecuteSQL(SQL)  
1499:           
1500:         FormMain.DefInstance.UpdateStatus(("Deleting Project Parses from DataStore"))  
1501:         SQL = "delete from t_Parses"  
1502:         SQLResult = DataStore.ExecuteSQL(SQL)  
1503:           
1504:         FormMain.DefInstance.UpdateStatus(("Deleting Database Connections from DataStore"))  
1505:         SQL = "delete from t_Databases"  
1506:         SQLResult = DataStore.ExecuteSQL(SQL)  
1507:         SQL = "delete from t_Connections"  
1508:         SQLResult = DataStore.ExecuteSQL(SQL)  
1509:           
1510:         FormMain.DefInstance.UpdateStatus(("Deleting Projects from DataStore"))  
1511:         SQL = "delete from t_Projects"  
1512:         SQLResult = DataStore.ExecuteSQL(SQL)  
1513:           
1514:         ListParses.Items.Clear()  
1515:         ListProjects.Items.Clear()  
1516:           
1517:         FormMain.DefInstance.UpdateStatus(("DataStore Purged"))  
1518:     End Sub  
1519:       
1520:     'Purges the data store of the parses data (but not the projects)  
1521:     Public Sub PurgeData_Popup(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles PurgeData.Popup  
1522:         PurgeData_Click(eventSender, eventArgs)  
1523:     End Sub  
1524:     Public Sub PurgeData_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles PurgeData.Click  
1525:           
1526:         Dim Result As Short  
1527:         Result = MsgBox("Are you sure you want to purge the data from the DataStore?", MsgBoxStyle.OKCancel, System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly.Location).ProductName)  
1528:         If Result = MsgBoxResult.Cancel Then Exit Sub  
1529:           
1530:         Dim DataStore As New DataStoreClass  
1531:         DataStore.SetConnectionString((ApplicationDataStoreConnectionString))  
1532:           
1533:         'Clean the database  
1534:         Dim SQL As String  
1535:         Dim SQLResult As Boolean  
1536:           
1537:         FormMain.DefInstance.UpdateStatus(("Deleting Jobs from DataStore"))  
1538:         SQL = "delete from t_JobSchedules"  
1539:         SQLResult = DataStore.ExecuteSQL(SQL)  
1540:         SQL = "delete from t_JobSteps"  
1541:         SQLResult = DataStore.ExecuteSQL(SQL)  
1542:         SQL = "delete from t_Jobs"  
1543:         SQLResult = DataStore.ExecuteSQL(SQL)  
1544:           
1545:         FormMain.DefInstance.UpdateStatus(("Deleting DTS Packages from DataStore"))  
1546:         SQL = "delete from t_Packages"  
1547:         SQLResult = DataStore.ExecuteSQL(SQL)  
1548:           
1549:         FormMain.DefInstance.UpdateStatus(("Deleting Tables from DataStore"))  
1550:         SQL = "delete from t_TableIndexes"  
1551:         SQLResult = DataStore.ExecuteSQL(SQL)  
1552:         SQL = "delete from t_TableIndexColumns"  
1553:         SQLResult = DataStore.ExecuteSQL(SQL)  
1554:         SQL = "delete from t_TableColumns"  
1555:         SQLResult = DataStore.ExecuteSQL(SQL)  
1556:         SQL = "delete from t_TableRelationships"  
1557:         SQLResult = DataStore.ExecuteSQL(SQL)  
1558:         SQL = "delete from t_Tables"  
1559:         SQLResult = DataStore.ExecuteSQL(SQL)  
1560:           
1561:         FormMain.DefInstance.UpdateStatus(("Deleting Views from DataStore"))  
1562:         SQL = "delete from t_ViewColumns"  
1563:         SQLResult = DataStore.ExecuteSQL(SQL)  
1564:         SQL = "delete from t_Views"  
1565:         SQLResult = DataStore.ExecuteSQL(SQL)  
1566:           
1567:         FormMain.DefInstance.UpdateStatus(("Deleting Triggers from DataStore"))  
1568:         SQL = "delete from t_Triggers"  
1569:         SQLResult = DataStore.ExecuteSQL(SQL)  
1570:           
1571:         FormMain.DefInstance.UpdateStatus(("Deleting Stored Procedures from DataStore"))  
1572:         SQL = "delete from t_StoredProcedures"  
1573:         SQLResult = DataStore.ExecuteSQL(SQL)  
1574:         SQL = "delete from t_StoredProcedureColumns"  
1575:         SQLResult = DataStore.ExecuteSQL(SQL)  
1576:           
1577:         FormMain.DefInstance.UpdateStatus(("Deleting Full-Text Catalogs from DataStore"))  
1578:         SQL = "delete from t_FullTextCatalogs"  
1579:         SQLResult = DataStore.ExecuteSQL(SQL)  
1580:         SQL = "delete from t_FullTextCatalogsTableColumns"  
1581:         SQLResult = DataStore.ExecuteSQL(SQL)  
1582:         SQL = "delete from t_FullTextCatalogsTables"  
1583:         SQLResult = DataStore.ExecuteSQL(SQL)  
1584:           
1585:         FormMain.DefInstance.UpdateStatus(("Deleting Project Parses from DataStore"))  
1586:         SQL = "delete from t_Parses"  
1587:         SQLResult = DataStore.ExecuteSQL(SQL)  
1588:           
1589:         ListParses.Items.Clear()  
1590:         FormMain.DefInstance.UpdateStatus(("DataStore Purged"))  
1591:           
1592:     End Sub  
1593:       
1594:     Private Sub MakeLogFile(ByRef LogType As String)  
1595:           
1596:         'Create a logfile  
1597:         CurrentLogFileName = VB6.GetPath & "\Logs\" & ListProjects.Text & "_" & LogType & "_Log.txt"  
1598:         Dim InitialLogFileText As String  
1599:         Dim CurrentDate As Date  
1600:         CurrentDate = Now  
1601:           
1602:         'Create initial logfile contents  
1603:         InitialLogFileText = "Documentation for project " & CurrentProjectName & " generated "  
1604:         InitialLogFileText = InitialLogFileText & VB.Day(CurrentDate) & " "  
1605:         InitialLogFileText = InitialLogFileText & MonthName(Month(CurrentDate)) & " "  
1606:         InitialLogFileText = InitialLogFileText & Year(CurrentDate) & " "  
1607:         InitialLogFileText = InitialLogFileText & "by " & System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly.Location).ProductName & " " & System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly.Location).FileMajorPart & "." & System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly.Location).FileMinorPart & vbCrLf & vbCrLf  
1608:           
1609:         Call CreateLogFile(CurrentLogFileName, InitialLogFileText)  
1610:           
1611:     End Sub  
1612: End Class