Subversion Repository Public Repository

Nextrek

Diff Revisions 60 vs 74 for /minstrek/GameEditorBKP - Copia/GameEditor/Form1.vb

Diff revisions: vs.
  @@ -1,28 +1,27 @@
1 1 Imports System.IO
2 - Imports GameEditor.Estensioni
3 2
4 3 Public Class GameEditorPanel
5 4
6 - 'Private TopHorizontalBorderWidth As Int16
7 - 'Private TopHorizontalBorderHeight As Int16
8 - 'Private BottomHorizontalBorderWidth As Int16
9 - 'Private BottomHorizontalBorderHeight As Int16
10 - 'Private MidHorizontalBorderWidth As Int16
11 - 'Private MidHorizontalBorderHeight As Int16
12 - 'Private LeftVerticalBorderWidth As Int16
13 - 'Private LeftVerticalBorderHeight As Int16
14 - 'Private RightVerticalBorderWidth As Int16
15 - 'Private RightVerticalBorderHeight As Int16
16 - 'Private InventoryIconWidth As Int16
17 - 'Private InventoryIconHeight As Int16
18 - 'Private QuestIconWidth As Int16
19 - 'Private QuestIconHeight As Int16
20 - 'Private EventsIconWidth As Int16
21 - 'Private EventsIconHeight As Int16
22 - 'Private SplashForegroundWidth As Int16
23 - 'Private SplashForegroundHeight As Int16
24 - 'Private LoadingForegroundWidth As Int16
25 - 'Private LoadingForegroundHeight As Int16
5 + ' Private TopHorizontalBorderWidth As Int16
6 + ' Private TopHorizontalBorderHeight As Int16
7 + ' Private BottomHorizontalBorderWidth As Int16
8 + ' Private BottomHorizontalBorderHeight As Int16
9 + ' Private MidHorizontalBorderWidth As Int16
10 + ' Private MidHorizontalBorderHeight As Int16
11 + ' Private LeftVerticalBorderWidth As Int16
12 + ' Private LeftVerticalBorderHeight As Int16
13 + ' Private RightVerticalBorderWidth As Int16
14 + ' Private RightVerticalBorderHeight As Int16
15 + ' Private InventoryIconWidth As Int16
16 + ' Private InventoryIconHeight As Int16
17 + ' Private QuestIconWidth As Int16
18 + ' Private QuestIconHeight As Int16
19 + ' Private EventsIconWidth As Int16
20 + ' Private EventsIconHeight As Int16
21 + ' Private SplashForegroundWidth As Int16
22 + ' Private SplashForegroundHeight As Int16
23 + ' Private LoadingForegroundWidth As Int16
24 + ' Private LoadingForegroundHeight As Int16
26 25 Private firstTime As Boolean = True
27 26 Private ObjectImageWidth As Int16
28 27 Private ObjectImageHeight As Int16
  @@ -33,9 +32,13 @@
33 32 Private storyNowLoaded As String = ""
34 33 Private buttonsShown As Dictionary(Of Integer, Boolean) = New Dictionary(Of Integer, Boolean)
35 34
35 +
36 +
37 +
38 +
36 39 Private Sub GameEditorPanel_Shown(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Shown
37 - Me.buttonsShown.Add(1, True)
38 - For i As Integer = 2 To 6
40 + 'Me.buttonsShown.Add(1, True)
41 + For i As Integer = 1 To 6
39 42 Me.buttonsShown.Add(i, False)
40 43 Next
41 44 WarningPanel.BringToFront()
  @@ -45,7 +48,39 @@
45 48
46 49 End Sub
47 50
48 - #Region "UTILITIES"
51 +
52 +
53 + '**********************************************UTILITIES***************************************************************************
54 + '*********************************************************************************************************************************
55 +
56 +
57 +
58 +
59 +
60 + Private Function convertToHex(ByVal color As System.Drawing.Color)
61 + Dim r As Byte = color.R
62 + Dim g As Byte = color.G
63 + Dim b As Byte = color.B
64 + Dim rs = CStr(Hex(r))
65 + Dim gs = CStr(Hex(g))
66 + Dim bs = CStr(Hex(b))
67 +
68 + If (r < 16) Then
69 + rs = "0" + rs
70 + End If
71 + If (g < 16) Then
72 + gs = "0" + gs
73 + End If
74 + If (b < 16) Then
75 + bs = "0" + bs
76 + End If
77 +
78 +
79 +
80 +
81 + Return "#" + rs + gs + bs
82 +
83 + End Function
49 84
50 85 Private Function getImagesPath() As String
51 86 Return Application.StartupPath + "\images\"
  @@ -54,7 +89,6 @@
54 89 Private Function getSavedPath() As String
55 90 Return Application.StartupPath + "\saves\"
56 91 End Function
57 -
58 92 Private Function getMinstrekPath() As String
59 93 Return Application.StartupPath + "\MinsTrek\"
60 94 End Function
  @@ -101,10 +135,17 @@
101 135 End Function
102 136
103 137 Private Sub setColor(ByVal textBox As TextBox)
104 - Dim dr As DialogResult = ColorDialog1.ShowDialog()
138 + Dim dr As DialogResult
139 + Dim color As System.Drawing.Color
140 + Dim hexColor As String
141 +
142 +
143 + dr = ColorDialog1.ShowDialog()
144 +
105 145 If (dr = DialogResult.OK) Then
106 - Dim color As System.Drawing.Color = ColorDialog1.Color
107 - Dim hexColor As String = ColorTranslator.ToHtml(color)
146 +
147 + color = ColorDialog1.Color
148 + hexColor = convertToHex(color)
108 149 textBox.Text = hexColor
109 150 textBox.BackColor = color
110 151 End If
  @@ -123,9 +164,14 @@
123 164 textBox.Text = OpenFileDialog1.SafeFileName
124 165 My.Computer.FileSystem.CopyFile(path, getImagesPath() + folder + OpenFileDialog1.SafeFileName, True)
125 166 If Not IsNothing(pictureBox) Then
126 - img = New Bitmap(OpenFileDialog1.FileName)
167 + Try
168 + img = New Bitmap(OpenFileDialog1.FileName)
169 +
170 + pictureBox.BackgroundImage = img
171 + Catch ex As Exception
127 172
128 - pictureBox.BackgroundImage = img
173 + End Try
174 +
129 175
130 176 End If
131 177
  @@ -149,12 +195,12 @@
149 195 Dim text As String = textBox.Text
150 196 Return (Not text = "") And (Not text = "not valid") And (Not text = " page not created")
151 197 End Function
152 -
153 198 Private Function checkPrePostCondTextInTB(ByVal textBox As TextBox) As Boolean
154 199 Dim text As String = textBox.Text
155 200 Return (Not text = " quest not created") And (Not text = " page not created") And (Not text = " object not created") And (Not text = "format: object1,object2,object3,....")
156 201 End Function
157 202
203 +
158 204 Private Sub WarningCloseLabe_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WarningCloseLabe.Click
159 205 WarningPanel.Hide()
160 206 WarningCancelButton.Visible = False
  @@ -168,6 +214,8 @@
168 214 WarningPanel.Show()
169 215 End Sub
170 216
217 +
218 +
171 219 Private Sub WarningCancelButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WarningCancelButton.Click
172 220 WarningPanel.Hide()
173 221 WarningCancelButton.Visible = False
  @@ -209,15 +257,20 @@
209 257
210 258 If (Not SaveStoryNameText.Text.Equals("")) Then
211 259 saveStory(SaveStoryNameText.Text)
260 + Me.storyNowLoaded = SaveStoryNameText.Text
212 261 End If
262 +
213 263 SaveLoadPopupPanel.Hide()
214 264
215 265 End Sub
216 266
217 267 Private Sub LoadStoryComboBox_SelectedValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoadStoryComboBox.SelectedValueChanged
218 268 Me.storyNowLoaded = LoadStoryComboBox.SelectedItem.ToString
269 + GameEditorTabs.SelectedTab = GeneralTabPage
270 + GameTitleText.Focus()
219 271 loadStory(Me.storyNowLoaded)
220 272
273 +
221 274 SaveLoadPopupPanel.Hide()
222 275 End Sub
223 276
  @@ -253,8 +306,12 @@
253 306 ctr.Text = ""
254 307 ElseIf ctr.GetType.Name = "CheckedListBox" Then
255 308 CType(ctr, CheckedListBox).ClearSelected()
256 - ElseIf ctr.GetType.Name = "ComboBox" Then
257 - CType(ctr, ComboBox).SelectedIndex = CType(ctr, ComboBox).SelectionStart
309 + ElseIf ctr.GetType.Name = "ComboBox" And (Not ctr.Name = "ViewPageCB") Then
310 + If CType(ctr, ComboBox).Items.Count > 0 Then
311 + CType(ctr, ComboBox).SelectedIndex = CType(ctr, ComboBox).SelectionStart
312 + End If
313 + ElseIf ctr.GetType.Name = "PictureBox" Then
314 + ctr.BackgroundImage = Nothing
258 315
259 316 ElseIf ctr.GetType.Name = "GroupBox" Then
260 317 For Each ctr1 As Control In ctr.Controls
  @@ -262,19 +319,26 @@
262 319 ctr1.Text = ""
263 320 ElseIf ctr1.GetType.Name = "CheckedListBox" Then
264 321 CType(ctr1, CheckedListBox).ClearSelected()
265 - ElseIf ctr1.GetType.Name = "ComboBox" Then
266 - CType(ctr1, ComboBox).SelectedIndex = CType(ctr1, ComboBox).SelectionStart
322 + ElseIf ctr1.GetType.Name = "ComboBox" And (Not ctr1.Name = "ViewPageCB") Then
323 + If CType(ctr1, ComboBox).Items.Count > 0 Then
324 + CType(ctr1, ComboBox).SelectedIndex = CType(ctr1, ComboBox).SelectionStart
325 + End If
326 + ElseIf ctr1.GetType.Name = "PictureBox" Then
327 + ctr1.BackgroundImage = Nothing
267 328 End If
268 329
330 +
269 331 Next
270 332 End If
271 333 Next
272 334
273 335 End Sub
274 336
275 - #End Region
276 337
277 - #Region "MENU"
338 +
339 + '******************************************************************MENU********************************************************************************
340 + '***********************************************************************************************************************************
341 +
278 342
279 343 Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Click
280 344 showSavePopup()
  @@ -347,16 +411,19 @@
347 411 For Each rw As DataGridViewRow In grid.Rows
348 412 line = ""
349 413 cells = rw.Cells
350 - For Each cell As DataGridViewCell In cells
351 - If cell.Value Is Nothing Then
352 - line += "undefined["
353 - ElseIf (cell.Value.ToString.Equals("")) Then
354 - line += "undefined["
355 - Else
356 - line += cell.Value.ToString.Replace("" + vbNewLine, "<br/>") + "["
357 - End If
358 - Next
359 - fw.WriteLine(line)
414 + If Not IsNothing(cells) Then
415 +
416 +
417 + For Each cell As DataGridViewCell In cells
418 + If (cell.Value.ToString.Equals("")) Then
419 + line += "undefined["
420 + Else
421 + line += cell.Value.ToString.Replace("" + vbNewLine, "<br/>") + "["
422 + End If
423 + Next
424 + fw.WriteLine(line)
425 + End If
426 +
360 427
361 428 Next
362 429 fw.Close()
  @@ -381,6 +448,8 @@
381 448
382 449 End Sub
383 450
451 +
452 +
384 453 Private Sub loadStory(ByVal storyName As String)
385 454 Dim map As String()
386 455 Dim line As String
  @@ -409,6 +478,9 @@
409 478 Exit For
410 479 Exit For
411 480 End If
481 + If ctr1.GetType().Name = "PictureBox" Then
482 + ctr1.BackgroundImage = Nothing
483 + End If
412 484 Next
413 485
414 486 End If
  @@ -423,6 +495,10 @@
423 495 Exit For
424 496 Exit For
425 497 End If
498 +
499 + If ctr.GetType().Name = "PictureBox" Then
500 + ctr.BackgroundImage = Nothing
501 + End If
426 502 Next
427 503 Next
428 504
  @@ -436,10 +512,17 @@
436 512 loadGrid(QuestsGrid, storyName)
437 513 loadGrid(PagesGrid, storyName)
438 514 loadGrid(PageButtonGrid, storyName)
515 + cleanControl(PageButtonTabPage)
516 + For i As Byte = 1 To 6
517 + hideButton(i)
518 + Next
519 +
439 520 updateOEQCheckedListBoxes()
440 521 updatePageCheckBoxes()
441 522 End Sub
442 523
524 + #Region "export to json"
525 +
443 526 Private Sub ObjectsfromTxtToJson(ByVal storyName As String)
444 527 Dim advObjectCol As My.Types.advObjectCollection = New My.Types.advObjectCollection
445 528
  @@ -541,8 +624,10 @@
541 624 System.IO.File.WriteAllText(getJsonPath() + storyName + "\" + "advQuests.js", jsonStr)
542 625 End Sub
543 626
544 - Private Sub PagesfromTxtToJson(ByVal storyName As String)
545 627
628 +
629 +
630 + Private Sub PagesfromTxtToJson(ByVal storyName As String)
546 631 Dim advPageCol As My.Types.advPageCollection = New My.Types.advPageCollection
547 632 Dim buttonArrayList As ArrayList
548 633 Dim buttonMap As Dictionary(Of String, ArrayList) = New Dictionary(Of String, ArrayList)
  @@ -794,242 +879,164 @@
794 879
795 880 Dim jsonStr As String = advPageCol.ToJSON()
796 881 System.IO.File.WriteAllText(getJsonPath() + storyName + "\" + "advPages.js", jsonStr)
882 +
883 +
797 884 End Sub
798 885
799 886 Private Sub MainDatafromTxtToJson(ByVal storyName As String)
800 -
801 - Dim advMainDataCol As New My.Types.advMainDataCollection
802 - Dim advMainData As New My.Types.advMainData
803 887 Dim img As Bitmap
804 - Using fw = New StreamWriter(getJsonPath() + storyName + "\" + "mainData.js")
805 - advMainData.title = GameTitleText.Text
806 - advMainData.titleColor = TitleColorText.Text
807 - 'advMainData.events = New My.Types.advEventCollection
808 - 'advMainData.objects = New My.Types.advObjectCollection
809 - 'advMainData.quests = New My.Types.advQuestCollection
810 - 'advMainData.pages = New My.Types.advPageCollection
811 -
812 - fw.WriteLine("var mainData = {")
813 - fw.WriteLine(vbTab + """title"" : """ + escape(GameTitleText.Text) + """ ,")
814 - fw.WriteLine(vbTab + """title-color"" : """ + TitleColorText.Text + """ ,")
815 - fw.WriteLine(vbTab + " ""events"" : advEvents ,")
816 - fw.WriteLine(vbTab + " ""objects"" : advObjects ,")
817 - fw.WriteLine(vbTab + " ""quests"" : advQuests ,")
818 - fw.WriteLine(vbTab + " ""pages"" : advPages ,")
819 -
820 - Dim advSplash As New My.Types.advSplash
821 - advSplash.splashTime = SplashTimeText.Text
822 - advSplash.splashBgColor = SplashBGText.Text
823 - advSplash.splashForeground = SplashForegroundIMGText.Text
824 -
825 - fw.WriteLine(vbTab + " ""splash"" : {")
826 - fw.WriteLine(vbTab + vbTab + " ""splash-time"" : " + SplashTimeText.Text + " ,")
827 - fw.WriteLine(vbTab + vbTab + " ""splash-background-color"" : """ + SplashBGText.Text + """ ,")
828 - fw.WriteLine(vbTab + vbTab + " ""splash-foreground"" : """ + SplashForegroundIMGText.Text + """ ,")
829 - Try
830 - img = New Bitmap(getImagesPath() + SplashForegroundIMGText.Text)
831 - fw.WriteLine(vbTab + vbTab + " ""splash-foreground-width"" : " + CStr(img.Width) + " ,")
832 - fw.WriteLine(vbTab + vbTab + " ""splash-foreground-height"" : " + CStr(img.Height) + " ,")
833 - advSplash.splashForegroundWidth = img.Width
834 - advSplash.splashForegroundHeight = img.Height
835 - Catch
836 - fw.WriteLine(vbTab + vbTab + " ""splash-foreground-width"" : 0 ,")
837 - fw.WriteLine(vbTab + vbTab + " ""splash-foreground-height"" : 0 ,")
838 - advSplash.splashForegroundWidth = 0
839 - advSplash.splashForegroundHeight = 0
840 - End Try
841 - fw.WriteLine(vbTab + vbTab + " ""splash-text"" : """ + escape(SplashTextText.Text) + """ ,")
842 - fw.WriteLine(vbTab + vbTab + " ""splash-text-color"" : """ + SplashTextColorText.Text + """ ")
843 - fw.WriteLine(vbTab + "},")
844 -
845 - advSplash.splashText = SplashTextText.Text
846 - advSplash.splashTextColor = SplashTextColorText.Text
847 - advMainData.splash = advSplash
848 -
849 -
850 - Dim advLoading As New My.Types.advLoading
851 - advLoading.loadTime = LoadingTimeText.Text
852 - advLoading.loadDelay = LoadingDelayText.Text
853 - advLoading.loadBgColor = LoadingBGText.Text
854 - advLoading.loadForeground = LoadingForegroundIMGText.Text
855 -
856 - fw.WriteLine(vbTab + " ""loading"" : {")
857 - fw.WriteLine(vbTab + vbTab + " ""load-time"" : " + LoadingTimeText.Text + " ,")
858 - fw.WriteLine(vbTab + vbTab + " ""load-delay"" : " + LoadingDelayText.Text + " ,")
859 - fw.WriteLine(vbTab + vbTab + " ""load-background-color"" : """ + LoadingBGText.Text + """ ,")
860 - fw.WriteLine(vbTab + vbTab + " ""load-foreground"" : """ + LoadingForegroundIMGText.Text + """ ,")
861 - Try
862 - img = New Bitmap(getImagesPath() + LoadingForegroundIMGText.Text)
863 - fw.WriteLine(vbTab + vbTab + " ""load-foreground-width"" : " + CStr(img.Width) + " ,")
864 - fw.WriteLine(vbTab + vbTab + " ""load-foreground-height"" : " + CStr(img.Height) + " ,")
865 - advLoading.loadForegroundWidth = img.Width
866 - advLoading.loadForegroundHeight = img.Height
867 - Catch
868 - fw.WriteLine(vbTab + vbTab + " ""load-foreground-width"" : 0 ,")
869 - fw.WriteLine(vbTab + vbTab + " ""load-foreground-height"" : 0 ,")
870 - advLoading.loadForegroundWidth = 0
871 - advLoading.loadForegroundHeight = 0
872 - End Try
873 - fw.WriteLine(vbTab + vbTab + " ""load-text"" : """ + escape(LoadingTextText.Text) + """ ,")
874 - fw.WriteLine(vbTab + vbTab + " ""load-text-color"" : """ + LoadingTextColorText.Text + """ ")
875 - fw.WriteLine(vbTab + "},")
876 -
877 - advLoading.loadText = LoadingTextText.Text
878 - advLoading.loadTextColor = LoadingTextColorText.Text
879 - advMainData.loading = advLoading
880 -
881 -
882 - Dim advAlert As New My.Types.advAlert
883 - advAlert.widthPerc = AlertWidthText.Text
884 - advAlert.heightPerc = AlertHeightText.Text
885 - advAlert.alertBgColor = AlertBGColorText.Text
886 - advAlert.alertBackgroundImg = AlertBGIMGText.Text
887 - advAlert.hBorderTopImg = AlertTopBGIMGText.Text
888 - advAlert.hBorderBottomImg = AlertBottomBGIMGText.Text
889 - advAlert.wBorderLeftImg = AlertLeftBGIMGText.Text
890 - advAlert.wBorderRightImg = AlertRightBGIMGText.Text
891 - advAlert.alertOKButtonImg = AlertOKButtonText.Text
892 -
893 - fw.WriteLine(vbTab + """alert"" :{")
894 - fw.WriteLine(vbTab + vbTab + " ""widthPerc"" : " + AlertWidthText.Text + " ,")
895 - fw.WriteLine(vbTab + vbTab + " ""heightPerc"" : " + AlertHeightText.Text + " ,")
896 - fw.WriteLine(vbTab + vbTab + " ""alert-background-color"" : """ + AlertBGColorText.Text + """ ,")
897 - fw.WriteLine(vbTab + vbTab + " ""alert-background-img"" : """ + AlertBGIMGText.Text + """ ,")
898 - fw.WriteLine(vbTab + vbTab + " ""hBorderTop-img"" : """ + AlertTopBGIMGText.Text + """ ,")
899 - fw.WriteLine(vbTab + vbTab + " ""hBorderBottom-img"" : """ + AlertBottomBGIMGText.Text + """ ,")
900 - fw.WriteLine(vbTab + vbTab + " ""wBorderLeft-img"" : """ + AlertLeftBGIMGText.Text + """ ,")
901 - fw.WriteLine(vbTab + vbTab + " ""wBorderRight-img"" : """ + AlertRightBGIMGText.Text + """ ,")
902 888
903 - Try
904 - img = New Bitmap(getImagesPath() + AlertTopBGIMGText.Text)
905 - fw.WriteLine(vbTab + vbTab + " ""hBorder-height"" : " + CStr(img.Height) + " ,")
906 - advAlert.hBorderHeight = img.Height
907 - img = New Bitmap(getImagesPath() + AlertLeftBGIMGText.Text)
908 - fw.WriteLine(vbTab + vbTab + " ""wBorder-width"" : " + CStr(img.Width) + " ,")
909 - advAlert.wBorderWidth = img.Width
910 - Catch ex As Exception
911 - fw.WriteLine(vbTab + vbTab + " ""hBorder-height"" : 10 ,")
912 - fw.WriteLine(vbTab + vbTab + " ""wBorder-width"" : 10 ,")
913 - advAlert.hBorderHeight = 10
914 - advAlert.wBorderWidth = 10
915 - End Try
916 - fw.WriteLine(vbTab + vbTab + " ""alert-OKButton-img"" : """ + AlertOKButtonText.Text + """ ,")
917 - Try
918 - img = New Bitmap(getImagesPath() + AlertOKButtonText.Text)
919 - fw.WriteLine(vbTab + vbTab + " ""alert-OKButton-width"" : " + CStr(img.Width) + " ,")
920 - fw.WriteLine(vbTab + vbTab + " ""alert-OKButton-height"" : " + CStr(img.Height) + " ,")
921 - advAlert.alertOKButtonWidth = img.Width
922 - advAlert.alertOKButtonHeight = img.Height
923 - Catch ex As Exception
924 - fw.WriteLine(vbTab + vbTab + " ""alert-OKButton-width"" : 30 ,")
925 - fw.WriteLine(vbTab + vbTab + " ""alert-OKButton-height"" : 30 ")
926 - advAlert.alertOKButtonWidth = 30
927 - advAlert.alertOKButtonHeight = 30
928 - End Try
929 - fw.WriteLine(vbTab + "},")
889 + Dim fw = New StreamWriter(getJsonPath() + storyName + "\" + "mainData.js")
890 + fw.WriteLine("var mainData = {")
891 + fw.WriteLine(vbTab + """title"" : """ + escape(GameTitleText.Text) + """ ,")
892 + fw.WriteLine(vbTab + """title-color"" : """ + TitleColorText.Text + """ ,")
893 + fw.WriteLine(vbTab + " ""events"" : advEvents ,")
894 + fw.WriteLine(vbTab + " ""objects"" : advObjects ,")
895 + fw.WriteLine(vbTab + " ""quests"" : advQuests ,")
896 + fw.WriteLine(vbTab + " ""pages"" : advPages ,")
897 + fw.WriteLine(vbTab + " ""splash"" : {")
898 + fw.WriteLine(vbTab + vbTab + " ""splash-time"" : " + SplashTimeText.Text + " ,")
899 + fw.WriteLine(vbTab + vbTab + " ""splash-background-color"" : """ + SplashBGText.Text + """ ,")
900 + fw.WriteLine(vbTab + vbTab + " ""splash-foreground"" : """ + SplashForegroundIMGText.Text + """ ,")
901 + Try
902 + img = New Bitmap(getImagesPath() + SplashForegroundIMGText.Text)
903 + fw.WriteLine(vbTab + vbTab + " ""splash-foreground-width"" : " + CStr(img.Width) + " ,")
904 + fw.WriteLine(vbTab + vbTab + " ""splash-foreground-height"" : " + CStr(img.Height) + " ,")
905 + Catch
906 + fw.WriteLine(vbTab + vbTab + " ""splash-foreground-width"" : 0 ,")
907 + fw.WriteLine(vbTab + vbTab + " ""splash-foreground-height"" : 0 ,")
908 + End Try
909 + fw.WriteLine(vbTab + vbTab + " ""splash-text"" : """ + escape(SplashTextText.Text) + """ ,")
910 + fw.WriteLine(vbTab + vbTab + " ""splash-text-color"" : """ + SplashTextColorText.Text + """ ")
911 + fw.WriteLine(vbTab + "},")
912 + fw.WriteLine(vbTab + " ""loading"" : {")
913 + fw.WriteLine(vbTab + vbTab + " ""load-time"" : " + LoadingTimeText.Text + " ,")
914 + fw.WriteLine(vbTab + vbTab + " ""load-delay"" : " + LoadingDelayText.Text + " ,")
915 + fw.WriteLine(vbTab + vbTab + " ""load-background-color"" : """ + LoadingBGText.Text + """ ,")
916 + fw.WriteLine(vbTab + vbTab + " ""load-foreground"" : """ + LoadingForegroundIMGText.Text + """ ,")
917 + Try
918 + img = New Bitmap(getImagesPath() + LoadingForegroundIMGText.Text)
919 + fw.WriteLine(vbTab + vbTab + " ""load-foreground-width"" : " + CStr(img.Width) + " ,")
920 + fw.WriteLine(vbTab + vbTab + " ""load-foreground-height"" : " + CStr(img.Height) + " ,")
921 + Catch
922 + fw.WriteLine(vbTab + vbTab + " ""load-foreground-width"" : 0 ,")
923 + fw.WriteLine(vbTab + vbTab + " ""load-foreground-height"" : 0 ,")
924 + End Try
925 + fw.WriteLine(vbTab + vbTab + " ""load-text"" : """ + escape(LoadingTextText.Text) + """ ,")
926 + fw.WriteLine(vbTab + vbTab + " ""load-text-color"" : """ + LoadingTextColorText.Text + """ ")
927 + fw.WriteLine(vbTab + "},")
928 +
929 + fw.WriteLine(vbTab + """alert"" :{")
930 + fw.WriteLine(vbTab + vbTab + " ""widthPerc"" : " + AlertWidthText.Text + " ,")
931 + fw.WriteLine(vbTab + vbTab + " ""heightPerc"" : " + AlertHeightText.Text + " ,")
932 + fw.WriteLine(vbTab + vbTab + " ""alert-background-color"" : """ + AlertBGColorText.Text + """ ,")
933 + fw.WriteLine(vbTab + vbTab + " ""alert-background-img"" : """ + AlertBGIMGText.Text + """ ,")
934 + fw.WriteLine(vbTab + vbTab + " ""hBorderTop-img"" : """ + AlertTopBGIMGText.Text + """ ,")
935 + fw.WriteLine(vbTab + vbTab + " ""hBorderBottom-img"" : """ + AlertBottomBGIMGText.Text + """ ,")
936 + fw.WriteLine(vbTab + vbTab + " ""wBorderLeft-img"" : """ + AlertLeftBGIMGText.Text + """ ,")
937 + fw.WriteLine(vbTab + vbTab + " ""wBorderRight-img"" : """ + AlertRightBGIMGText.Text + """ ,")
930 938
931 - advMainData.alert = advAlert
932 939
933 - Dim advDefaults As New My.Types.advDefaults
934 - advDefaults.bgColor = BGText.Text
935 - advDefaults.topBgColor = TopAreaBGText.Text
936 - advDefaults.bottomBgColor = BottomAreaBGText.Text
937 - advDefaults.topContainerHeight = TopAreaHeightText.Text
938 - advDefaults.hBorderTopImg = TopHorizontalBorderIMGText.Text
939 -
940 - fw.WriteLine(vbTab + " ""defaults"" : {")
941 -
942 - fw.WriteLine(vbTab + vbTab + " ""background-color"" : """ + BGText.Text + """ ,")
943 - fw.WriteLine(vbTab + vbTab + " ""top-background-color"" : """ + TopAreaBGText.Text + """ ,")
944 - fw.WriteLine(vbTab + vbTab + " ""bottom-background-color"" : """ + BottomAreaBGText.Text + """ ,")
945 - fw.WriteLine(vbTab + vbTab + " ""topContainer-height"" : " + TopAreaHeightText.Text + " ,")
946 - fw.WriteLine(vbTab + vbTab + " ""hBorderTop-img"" : """ + TopHorizontalBorderIMGText.Text + """ ,")
947 - Try
948 - img = New Bitmap(getImagesPath() + TopHorizontalBorderIMGText.Text)
949 - fw.WriteLine(vbTab + vbTab + " ""hBorder-height"" : " + CStr(img.Height) + " ,")
950 - advDefaults.hBorderHeight = img.Height
951 - Catch
952 - fw.WriteLine(vbTab + vbTab + " ""hBorder-height"" : 0 ,")
953 - advDefaults.hBorderHeight = 0
954 - End Try
955 - fw.WriteLine(vbTab + vbTab + " ""hBorderMid-img"" : """ + MidHorizontalBorderIMGText.Text + """ ,")
956 - fw.WriteLine(vbTab + vbTab + " ""hBorderBottom-img"" : """ + BottomHorizontalBorderIMGText.Text + """ ,")
957 - fw.WriteLine(vbTab + vbTab + " ""wBorderLeft-img"" : """ + LeftVerticalBorderIMGText.Text + """ ,")
958 -
959 - advDefaults.hBorderMidImg = MidHorizontalBorderIMGText.Text
960 - advDefaults.hBorderBottomImg = BottomHorizontalBorderIMGText.Text
961 - advDefaults.wBorderLeftImg = LeftVerticalBorderIMGText.Text
940 + Try
941 + img = New Bitmap(getImagesPath() + AlertTopBGIMGText.Text)
942 + fw.WriteLine(vbTab + vbTab + " ""hBorder-height"" : " + CStr(img.Height) + " ,")
943 + img = New Bitmap(getImagesPath() + AlertLeftBGIMGText.Text)
944 + fw.WriteLine(vbTab + vbTab + " ""wBorder-width"" : " + CStr(img.Width) + " ,")
945 + Catch ex As Exception
946 + fw.WriteLine(vbTab + vbTab + " ""hBorder-height"" : 10 ,")
947 + fw.WriteLine(vbTab + vbTab + " ""wBorder-width"" : 10 ,")
948 + End Try
949 + fw.WriteLine(vbTab + vbTab + " ""alert-OKButton-img"" : """ + AlertOKButtonText.Text + """ ,")
950 + Try
951 + img = New Bitmap(getImagesPath() + AlertOKButtonText.Text)
952 + fw.WriteLine(vbTab + vbTab + " ""alert-OKButton-width"" : " + CStr(img.Width) + " ,")
953 + fw.WriteLine(vbTab + vbTab + " ""alert-OKButton-height"" : " + CStr(img.Height) + " ,")
954 + Catch ex As Exception
955 + fw.WriteLine(vbTab + vbTab + " ""alert-OKButton-width"" : 30 ,")
956 + fw.WriteLine(vbTab + vbTab + " ""alert-OKButton-height"" : 30 ")
957 + End Try
962 958
963 - Try
964 - img = New Bitmap(getImagesPath() + LeftVerticalBorderIMGText.Text)
965 - fw.WriteLine(vbTab + vbTab + " ""wBorder-width"" : " + CStr(img.Width) + " ,")
966 - advDefaults.wBorderWidth = img.Width
967 - Catch ex As Exception
968 - fw.WriteLine(vbTab + vbTab + " ""wBorder-width"" : 0 ,")
969 - advDefaults.wBorderWidth = 0
970 - End Try
959 + fw.WriteLine(vbTab + "},")
971 960
972 - fw.WriteLine(vbTab + vbTab + " ""wBorderRight-img"" : """ + RightVerticalBorderText.Text + """ ,")
973 - fw.WriteLine(vbTab + vbTab + " ""inventory-img"" : """ + InventoryIconText.Text + """ ,")
974 961
975 - advDefaults.wBorderRightImg = RightVerticalBorderText.Text
976 - advDefaults.inventoryImg = InventoryIconText.Text
962 + fw.WriteLine(vbTab + " ""defaults"" : {")
977 963
978 - Try
979 - img = New Bitmap(getImagesPath() + InventoryIconText.Text)
980 - fw.WriteLine(vbTab + vbTab + " ""inventory-img-width"" : " + CStr(img.Width) + " ,")
981 - fw.WriteLine(vbTab + vbTab + " ""inventory-img-height"" : " + CStr(img.Height) + " ,")
982 - advDefaults.inventoryImgWidth = img.Width
983 - advDefaults.inventoryImgHeight = img.Height
984 - Catch ex As Exception
985 - fw.WriteLine(vbTab + vbTab + " ""inventory-img-width"" : 0 ,")
986 - fw.WriteLine(vbTab + vbTab + " ""inventory-img-height"" : 0 ,")
987 - advDefaults.inventoryImgWidth = 0
988 - advDefaults.inventoryImgHeight = 0
989 - End Try
990 - fw.WriteLine(vbTab + vbTab + " ""object-width"" : " + ObjectImagesWidthText.Text + " ,")
991 - fw.WriteLine(vbTab + vbTab + " ""object-height"" : " + ObjectImagesHeightText.Text + " ,")
964 + fw.WriteLine(vbTab + vbTab + " ""background-color"" : """ + BGText.Text + """ ,")
965 + fw.WriteLine(vbTab + vbTab + " ""top-background-color"" : """ + TopAreaBGText.Text + """ ,")
966 + fw.WriteLine(vbTab + vbTab + " ""bottom-background-color"" : """ + BottomAreaBGText.Text + """ ,")
967 + fw.WriteLine(vbTab + vbTab + " ""topContainer-height"" : " + TopAreaHeightText.Text + " ,")
968 + fw.WriteLine(vbTab + vbTab + " ""hBorderTop-img"" : """ + TopHorizontalBorderIMGText.Text + """ ,")
969 + Try
970 + img = New Bitmap(getImagesPath() + TopHorizontalBorderIMGText.Text)
971 + fw.WriteLine(vbTab + vbTab + " ""hBorder-height"" : " + CStr(img.Height) + " ,")
972 + Catch
973 + fw.WriteLine(vbTab + vbTab + " ""hBorder-height"" : 0 ,")
974 + End Try
975 + fw.WriteLine(vbTab + vbTab + " ""hBorderMid-img"" : """ + MidHorizontalBorderIMGText.Text + """ ,")
976 + fw.WriteLine(vbTab + vbTab + " ""hBorderBottom-img"" : """ + BottomHorizontalBorderIMGText.Text + """ ,")
977 + fw.WriteLine(vbTab + vbTab + " ""wBorderLeft-img"" : """ + LeftVerticalBorderIMGText.Text + """ ,")
992 978
993 - fw.WriteLine(vbTab + vbTab + " ""quests-img"" : """ + QuestIconIMGText.Text + """ ,")
994 - Try
995 - img = New Bitmap(getImagesPath() + QuestIconIMGText.Text)
996 - fw.WriteLine(vbTab + vbTab + " ""quests-img-width"" : " + CStr(img.Width) + " ,")
997 - fw.WriteLine(vbTab + vbTab + " ""quests-img-height"" : " + CStr(img.Height) + " ,")
998 - Catch ex As Exception
999 - fw.WriteLine(vbTab + vbTab + " ""quests-img-width"" : 0 ,")
1000 - fw.WriteLine(vbTab + vbTab + " ""quests-img-height"" : 0 ,")
1001 - End Try
979 + Try
980 + img = New Bitmap(getImagesPath() + LeftVerticalBorderIMGText.Text)
981 + fw.WriteLine(vbTab + vbTab + " ""wBorder-width"" : " + CStr(img.Width) + " ,")
982 + Catch ex As Exception
983 + fw.WriteLine(vbTab + vbTab + " ""wBorder-width"" : 0 ,")
984 + End Try
1002 985
1003 - fw.WriteLine(vbTab + vbTab + " ""quests-width"" : " + QuestImagesWidthText.Text + " ,")
1004 - fw.WriteLine(vbTab + vbTab + " ""quests-height"" : " + QuestImagesHeightText.Text + " ,")
1005 986
1006 - fw.WriteLine(vbTab + vbTab + " ""events-img"" : """ + EventsIconIMGText.Text + """ ,")
1007 - Try
1008 - img = New Bitmap(getImagesPath() + EventsIconIMGText.Text)
1009 - fw.WriteLine(vbTab + vbTab + " ""events-img-width"" : " + CStr(img.Width) + " ,")
1010 - fw.WriteLine(vbTab + vbTab + " ""events-img-height"" : " + CStr(img.Height) + " ,")
1011 - Catch ex As Exception
1012 - fw.WriteLine(vbTab + vbTab + " ""events-img-width"" : 0 ,")
1013 - fw.WriteLine(vbTab + vbTab + " ""events-img-height"" : 0 ,")
1014 - End Try
987 + fw.WriteLine(vbTab + vbTab + " ""wBorderRight-img"" : """ + RightVerticalBorderText.Text + """ ,")
1015 988
1016 - fw.WriteLine(vbTab + vbTab + " ""events-width"" : " + EventsImagesWidthText.Text + " ,")
1017 - fw.WriteLine(vbTab + vbTab + " ""events-height"" : " + EventsImagesHeightText.Text + " ")
989 + fw.WriteLine(vbTab + vbTab + " ""inventory-img"" : """ + InventoryIconText.Text + """ ,")
990 + Try
991 + img = New Bitmap(getImagesPath() + InventoryIconText.Text)
992 + fw.WriteLine(vbTab + vbTab + " ""inventory-img-width"" : " + CStr(img.Width) + " ,")
993 + fw.WriteLine(vbTab + vbTab + " ""inventory-img-height"" : " + CStr(img.Height) + " ,")
994 + Catch ex As Exception
995 + fw.WriteLine(vbTab + vbTab + " ""inventory-img-width"" : 0 ,")
996 + fw.WriteLine(vbTab + vbTab + " ""inventory-img-height"" : 0 ,")
997 + End Try
998 + fw.WriteLine(vbTab + vbTab + " ""object-width"" : " + ObjectImagesWidthText.Text + " ,")
999 + fw.WriteLine(vbTab + vbTab + " ""object-height"" : " + ObjectImagesHeightText.Text + " ,")
1000 +
1001 + fw.WriteLine(vbTab + vbTab + " ""quests-img"" : """ + QuestIconIMGText.Text + """ ,")
1002 + Try
1003 + img = New Bitmap(getImagesPath() + QuestIconIMGText.Text)
1004 + fw.WriteLine(vbTab + vbTab + " ""quests-img-width"" : " + CStr(img.Width) + " ,")
1005 + fw.WriteLine(vbTab + vbTab + " ""quests-img-height"" : " + CStr(img.Height) + " ,")
1006 + Catch ex As Exception
1007 + fw.WriteLine(vbTab + vbTab + " ""quests-img-width"" : 0 ,")
1008 + fw.WriteLine(vbTab + vbTab + " ""quests-img-height"" : 0 ,")
1009 + End Try
1010 +
1011 + fw.WriteLine(vbTab + vbTab + " ""quests-width"" : " + QuestImagesWidthText.Text + " ,")
1012 + fw.WriteLine(vbTab + vbTab + " ""quests-height"" : " + QuestImagesHeightText.Text + " ,")
1013 +
1014 + fw.WriteLine(vbTab + vbTab + " ""events-img"" : """ + EventsIconIMGText.Text + """ ,")
1015 + Try
1016 + img = New Bitmap(getImagesPath() + EventsIconIMGText.Text)
1017 + fw.WriteLine(vbTab + vbTab + " ""events-img-width"" : " + CStr(img.Width) + " ,")
1018 + fw.WriteLine(vbTab + vbTab + " ""events-img-height"" : " + CStr(img.Height) + " ,")
1019 + Catch ex As Exception
1020 + fw.WriteLine(vbTab + vbTab + " ""events-img-width"" : 0 ,")
1021 + fw.WriteLine(vbTab + vbTab + " ""events-img-height"" : 0 ,")
1022 + End Try
1023 +
1024 + fw.WriteLine(vbTab + vbTab + " ""events-width"" : " + EventsImagesWidthText.Text + " ,")
1025 + fw.WriteLine(vbTab + vbTab + " ""events-height"" : " + EventsImagesHeightText.Text + " ")
1026 +
1027 + fw.WriteLine(vbTab + "}")
1028 + fw.WriteLine("};")
1029 +
1030 + fw.Close()
1018 1031
1019 - fw.WriteLine(vbTab + "}")
1020 1032
1021 - advMainData.defaults = advDefaults
1022 1033
1023 - fw.WriteLine("};")
1024 1034
1025 - fw.Close()
1026 - End Using
1027 - advMainDataCol.results.Add(advMainData)
1028 1035
1029 - Dim jsonStr As String = advMainDataCol.ToJSON()
1030 - System.IO.File.WriteAllText(getJsonPath() + storyName + "\" + "advMainData.js", jsonStr)
1031 1036 End Sub
1032 1037
1038 + #End Region
1039 +
1033 1040 Private Sub FinishEditingToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FinishEditingToolStripMenuItem.Click
1034 1041 Dim initFound As Boolean = False
1035 1042 Dim endFound As Boolean = False
  @@ -1057,6 +1064,7 @@
1057 1064 End If
1058 1065 End Sub
1059 1066
1067 +
1060 1068 Private Sub WarningContinueButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WarningContinueButton.Click
1061 1069 Dim storyName As String = WarningSaveStoryNameText.Text
1062 1070
  @@ -1097,9 +1105,20 @@
1097 1105 End If
1098 1106 End Sub
1099 1107
1100 - #End Region
1101 1108
1102 - #Region "GENERAL SETTINGS"
1109 +
1110 +
1111 +
1112 +
1113 +
1114 + '****************************************************************GENERAL SETTINGS****************************************************************************
1115 + '****************************************************************************************************************************************
1116 +
1117 +
1118 +
1119 +
1120 +
1121 +
1103 1122
1104 1123 Private Sub GameTitleText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GameTitleText.Leave
1105 1124 GameTitleText.ForeColor = Color.Black
  @@ -1111,11 +1130,17 @@
1111 1130
1112 1131 End Sub
1113 1132
1133 +
1134 +
1135 +
1136 +
1114 1137 Private Sub BGText_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BGText.Click
1115 1138 Me.setColor(BGText)
1116 1139
1117 1140 End Sub
1118 1141
1142 +
1143 +
1119 1144 Private Sub TopAreaBGText_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TopAreaBGText.Click
1120 1145
1121 1146 Me.setColor(TopAreaBGText)
  @@ -1166,10 +1191,12 @@
1166 1191 End Try
1167 1192 End Sub
1168 1193
1194 +
1169 1195 Private Sub TitleColorText_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TitleColorText.Click
1170 1196 Me.setColor(TitleColorText)
1171 1197 End Sub
1172 1198
1199 +
1173 1200 Private Sub TopHorizontalBorderText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TopHorizontalBorderIMGText.Click
1174 1201
1175 1202 Me.setImage(TopHorizontalBorderIMGText, TopHorizontalBorderPic, "")
  @@ -1180,6 +1207,7 @@
1180 1207 Me.setImage(BottomHorizontalBorderIMGText, BottomHorizontalBorderPic, "")
1181 1208 End Sub
1182 1209
1210 +
1183 1211 Private Sub MidHorizontalBorderText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MidHorizontalBorderIMGText.Click
1184 1212 Me.setImage(MidHorizontalBorderIMGText, MidHorizontalBorderPic, "")
1185 1213 End Sub
  @@ -1237,9 +1265,12 @@
1237 1265 Me.checkIfInt16(EventsImagesHeightText)
1238 1266 End Sub
1239 1267
1240 - #End Region
1241 1268
1242 - #Region "SPLASH"
1269 +
1270 +
1271 + '****************************************************SPLASH*********************************************************************
1272 + '****************************************************************************************************************************************
1273 +
1243 1274
1244 1275 Private Sub SplashTimeText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SplashTimeText.Leave
1245 1276 SplashTimeText.ForeColor = Color.Black
  @@ -1269,9 +1300,18 @@
1269 1300 Me.setColor(SplashTextColorText)
1270 1301 End Sub
1271 1302
1272 - #End Region
1273 1303
1274 - #Region "LOADING"
1304 +
1305 +
1306 +
1307 +
1308 + '************************************************************LOADING*********************************************************************
1309 + '****************************************************************************************************************************************
1310 +
1311 +
1312 +
1313 +
1314 +
1275 1315
1276 1316 Private Sub LoadingTimeText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoadingTimeText.Leave
1277 1317 LoadingTimeText.ForeColor = Color.Black
  @@ -1312,13 +1352,20 @@
1312 1352 Me.setImage(LoadingForegroundIMGText, LoadingForegroundPic, "")
1313 1353 End Sub
1314 1354
1355 +
1315 1356 Private Sub LoadingTextColorText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoadingTextColorText.Click
1316 1357 Me.setColor(LoadingTextColorText)
1317 1358 End Sub
1318 1359
1319 - #End Region
1320 1360
1321 - #Region "OBJECTS"
1361 +
1362 +
1363 +
1364 + '***************************************************OBJECTS*****************************************************************************
1365 + '****************************************************************************************************************************************
1366 +
1367 +
1368 +
1322 1369
1323 1370 Private Sub ObjectImageText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ObjectIMGText.Click
1324 1371
  @@ -1432,6 +1479,7 @@
1432 1479
1433 1480 End Function
1434 1481
1482 +
1435 1483 Private Sub DeleteRowToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DeleteRowToolStripMenuItem.Click
1436 1484 If (Not ObjectsGrid.SelectedRows.Count = 0) Then
1437 1485 Dim row = ObjectsGrid.SelectedRows.Item(0)
  @@ -1442,9 +1490,12 @@
1442 1490 End If
1443 1491 End Sub
1444 1492
1445 - #End Region
1446 1493
1447 - #Region "EVENTS"
1494 +
1495 +
1496 +
1497 + '****************************************************EVENTS************************************************************************************************
1498 + '**********************************************************************************************************************************************************
1448 1499
1449 1500 Private Sub EventImageText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EventIMGText.Click
1450 1501 Dim dr As DialogResult
  @@ -1458,6 +1509,7 @@
1458 1509 path = OpenFileDialog1.FileName
1459 1510 EventIMGText.Text = OpenFileDialog1.SafeFileName
1460 1511 My.Computer.FileSystem.CopyFile(path, getImagesPath() + OpenFileDialog1.SafeFileName, True)
1512 +
1461 1513 img = New Bitmap(OpenFileDialog1.FileName)
1462 1514 Me.EventImageHeight = img.Height
1463 1515 Me.EventImageWidth = img.Width
  @@ -1555,6 +1607,7 @@
1555 1607
1556 1608 End Function
1557 1609
1610 +
1558 1611 Private Sub DeleteHighlightedRowToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DeleteHighlightedRowToolStripMenuItem.Click
1559 1612 If (Not EventsGrid.SelectedRows.Count = 0) Then
1560 1613 Dim row = EventsGrid.SelectedRows.Item(0)
  @@ -1565,9 +1618,16 @@
1565 1618 End If
1566 1619 End Sub
1567 1620
1568 - #End Region
1569 1621
1570 - #Region "QUESTS"
1622 +
1623 +
1624 + '**********************************************************QUESTS*****************************************************************************************
1625 + '*********************************************************************************************************************************************************
1626 +
1627 +
1628 +
1629 +
1630 +
1571 1631
1572 1632 Private Sub QuestImageText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuestIMGText.Click
1573 1633 Dim dr As DialogResult
  @@ -1686,6 +1746,9 @@
1686 1746
1687 1747 End Function
1688 1748
1749 +
1750 +
1751 +
1689 1752 Private Sub DeleteHighlightedRowToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DeleteHighlightedRowToolStripMenuItem1.Click
1690 1753 If (Not QuestsGrid.SelectedRows.Count = 0) Then
1691 1754 Dim row = QuestsGrid.SelectedRows.Item(0)
  @@ -1696,9 +1759,21 @@
1696 1759 End If
1697 1760 End Sub
1698 1761
1699 - #End Region
1700 1762
1701 - #Region "PAGES"
1763 +
1764 +
1765 +
1766 +
1767 +
1768 +
1769 + '*******************************************************PAGES**********************************************************************************
1770 + '**********************************************************************************************************************************************
1771 +
1772 +
1773 +
1774 +
1775 +
1776 +
1702 1777
1703 1778 Private Sub PageBGText_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PageBGText.Click
1704 1779 Me.setColor(PageBGText)
  @@ -1707,6 +1782,8 @@
1707 1782
1708 1783 End Sub
1709 1784
1785 +
1786 +
1710 1787 Private Sub PageTopAreaBGText_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PageTopAreaBGText.Click
1711 1788 Me.setColor(PageTopAreaBGText)
1712 1789
  @@ -1718,6 +1795,9 @@
1718 1795
1719 1796 End Sub
1720 1797
1798 +
1799 +
1800 +
1721 1801 Private Sub PageTitleColorText_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PageTitleColorText.Click
1722 1802 Me.setColor(PageTitleColorText)
1723 1803
  @@ -1732,6 +1812,7 @@
1732 1812 Me.setImage(PageBottomHorizontalBorderIMGText, PageBottomHorizontalBorderPic, "")
1733 1813 End Sub
1734 1814
1815 +
1735 1816 Private Sub PageBottomAreaImgText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
1736 1817 Me.setImage(PageBottomAreaImgText, Nothing, "")
1737 1818 End Sub
  @@ -1766,6 +1847,9 @@
1766 1847 Me.setImage(PageEventsIconIMGText, PageEventsIconPic, "")
1767 1848 End Sub
1768 1849
1850 +
1851 +
1852 +
1769 1853 Private Sub PageTitleText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs)
1770 1854 PageTitleText.ForeColor = Color.Black
1771 1855 If (PageTitleText.Text = "") Then
  @@ -1783,7 +1867,6 @@
1783 1867
1784 1868 End If
1785 1869 End Sub
1786 -
1787 1870 Private Sub PageIDText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs)
1788 1871 Dim valid As Boolean = True
1789 1872 Dim text As String = PageIDText.Text
  @@ -1801,11 +1884,9 @@
1801 1884 End If
1802 1885 End Sub
1803 1886
1804 - Private Sub ShowButtonPanelButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ShowButtonPanelButton.Click
1805 - GameEditorTabs.SelectTab(ButtonsTabPage)
1806 - End Sub
1807 1887
1808 - Private Sub CreatePageButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CreatePageButton.Click
1888 +
1889 + Private Sub CreatePageButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
1809 1890
1810 1891
1811 1892 End Sub
  @@ -1819,142 +1900,51 @@
1819 1900 End If
1820 1901 End Sub
1821 1902
1822 - #End Region
1823 1903
1824 - #Region "BUTTONS"
1825 1904
1826 - Private Sub PreconditionObjectsOText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PreconditionObjectsOText.MouseDown
1827 - If (Me.firstTime) Then
1828 - PreconditionObjectsOText.Text = ""
1829 - PreconditionObjectsOText.ForeColor = Color.Black
1830 - PreconditionObjectsOText.Font = New System.Drawing.Font("Microsoft Sans Serif", 10, FontStyle.Regular)
1831 - Me.firstTime = False
1832 - End If
1833 - End Sub
1834 1905
1835 - Private Sub PreconditionObjectsOText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PreconditionObjectsOText.Leave
1836 1906
1837 1907
1838 - If (Not checkConditionIDS(PreconditionObjectsOText, ObjectsGrid)) Then
1839 - PreconditionObjectsOText.Text = " object not created"
1840 - PreconditionObjectsOText.ForeColor = Color.Red
1841 - End If
1842 - End Sub
1843 1908
1844 - Private Sub PreconditionObjectsNOText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PreconditionObjectsNOText.Leave
1845 - If (Not checkConditionIDS(PreconditionObjectsNOText, ObjectsGrid)) Then
1846 - PreconditionObjectsNOText.Text = " object not created"
1847 - PreconditionObjectsNOText.ForeColor = Color.Red
1848 - End If
1849 - End Sub
1850 1909
1851 - Private Sub PreconditionEventsOText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PreconditionEventsOText.Leave
1852 - If (Not checkConditionIDS(PreconditionEventsOText, EventsGrid)) Then
1853 - PreconditionEventsOText.Text = " event not created"
1854 - PreconditionEventsOText.ForeColor = Color.Red
1855 - End If
1856 - End Sub
1910 + '**********************************************************BUTTONS**************************************************************************************
1911 + '***************************************************************************************************************************************************************
1857 1912
1858 - Private Sub PreconditionEventsNOText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PreconditionEventsNOText.Leave
1859 - If (Not checkConditionIDS(PreconditionEventsNOText, EventsGrid)) Then
1860 - PreconditionEventsNOText.Text = " event not created"
1861 - PreconditionEventsNOText.ForeColor = Color.Red
1862 - End If
1863 - End Sub
1864 1913
1865 - Private Sub PreconditionQuestsNText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PreconditionQuestsNText.Leave
1866 - If (Not checkConditionIDS(PreconditionQuestsNText, QuestsGrid)) Then
1867 - PreconditionQuestsNText.Text = " quest not created"
1868 - PreconditionQuestsNText.ForeColor = Color.Red
1869 - End If
1870 - End Sub
1871 1914
1872 - Private Sub PreconditionQuestsSText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PreconditionQuestsSText.Leave
1873 - If (Not checkConditionIDS(PreconditionQuestsSText, QuestsGrid)) Then
1874 - PreconditionQuestsSText.Text = " quest not created"
1875 - PreconditionQuestsSText.ForeColor = Color.Red
1876 - End If
1877 - End Sub
1915 + Private Sub PageButtonIDText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs)
1878 1916
1879 - Private Sub PreconditionQuestsDText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PreconditionQuestsDText.Leave
1880 - If (Not checkConditionIDS(PreconditionQuestsDText, QuestsGrid)) Then
1881 - PreconditionQuestsDText.Text = " quest not created"
1882 - PreconditionQuestsDText.ForeColor = Color.Red
1883 - End If
1884 1917 End Sub
1885 1918
1886 - Private Sub PostconditionObjectsOText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PostconditionObjectsOText.Leave
1887 - If (Not checkConditionIDS(PostconditionObjectsOText, ObjectsGrid)) Then
1888 - PostconditionObjectsOText.Text = " object not created"
1889 - PostconditionObjectsOText.ForeColor = Color.Red
1890 - End If
1891 - End Sub
1892 1919
1893 - Private Sub PostconditionObjectsNOText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PostconditionObjectsNOText.Leave
1894 - If (Not checkConditionIDS(PostconditionObjectsNOText, ObjectsGrid)) Then
1895 - PostconditionObjectsNOText.Text = " object not created"
1896 - PostconditionObjectsNOText.ForeColor = Color.Red
1897 - End If
1898 - End Sub
1920 + ' Private Sub PageButtonTextText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs)
1921 + 'Dim text As String = PageButtonTextText.Text
1922 + ' PageButtonTextText.ForeColor = Color.Black
1923 + ' If (text = "") Then
1924 + ' PageButtonTextText.ForeColor = Color.Red
1925 + ' PageButtonTextText.Text = "not valid"
1926 + '
1927 + ' End If
1928 + ' End Sub
1899 1929
1900 - Private Sub PostconditionEventsOText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PostconditionEventsOText.Leave
1901 - If (Not checkConditionIDS(PostconditionEventsOText, EventsGrid)) Then
1902 - PostconditionEventsOText.Text = " event not created"
1903 - PostconditionEventsOText.ForeColor = Color.Red
1904 - End If
1905 - End Sub
1906 1930
1907 - Private Sub PostconditionEventsNOText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PostconditionEventsNOText.Leave
1908 - If (Not checkConditionIDS(PostconditionEventsNOText, EventsGrid)) Then
1909 - PostconditionEventsNOText.Text = " event not created"
1910 - PostconditionEventsNOText.ForeColor = Color.Red
1911 - End If
1912 - End Sub
1913 1931
1914 - Private Sub PostconditionQuestsNText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PostconditionQuestsNText.Leave
1915 - If (Not checkConditionIDS(PostconditionQuestsNText, QuestsGrid)) Then
1916 - PostconditionQuestsNText.Text = " quest not created"
1917 - PostconditionQuestsNText.ForeColor = Color.Red
1918 - End If
1919 - End Sub
1920 1932
1921 - Private Sub PostconditionQuestsSText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PostconditionQuestsSText.Leave
1922 - If (Not checkConditionIDS(PostconditionQuestsSText, QuestsGrid)) Then
1923 - PostconditionQuestsSText.Text = " quest not created"
1924 - PostconditionQuestsSText.ForeColor = Color.Red
1925 - End If
1933 + Private Sub PageButtonIMGText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
1934 + Me.setImage(PageButtonIMGText, PageButtonIMGPic, "")
1926 1935 End Sub
1927 1936
1928 - Private Sub PostconditionQuestsDText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PostconditionQuestsDText.Leave
1929 - If (Not checkConditionIDS(PostconditionQuestsDText, QuestsGrid)) Then
1930 - PostconditionQuestsDText.Text = " quest not created"
1931 - PostconditionQuestsDText.ForeColor = Color.Red
1932 - End If
1933 - End Sub
1934 1937
1935 - Private Sub PageButtonIDText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PageButtonIDText.Leave
1936 1938
1937 - End Sub
1938 1939
1939 - #End Region
1940 + Private Sub CreateButtonButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
1940 1941
1941 - 'Private Sub PageButtonTextText_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs)
1942 - 'Dim text As String = PageButtonTextText.Text
1943 - 'PageButtonTextText.ForeColor = Color.Black
1944 - 'If (text = "") Then
1945 - 'PageButtonTextText.ForeColor = Color.Red
1946 - 'PageButtonTextText.Text = "not valid"
1947 - 'End If
1948 - 'End Sub
1949 1942
1950 - Private Sub PageButtonIMGText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PageButtonIMGText.Click
1951 - Me.setImage(PageButtonIMGText, PageButtonIMGPic, "")
1952 1943 End Sub
1953 1944
1954 - Private Sub CreateButtonButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CreateButtonButton.Click
1955 1945
1956 1946
1957 - End Sub
1947 +
1958 1948
1959 1949 Private Sub DeleteHighlightedRowToolStripMenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DeleteHighlightedRowToolStripMenuItem3.Click
1960 1950 If (Not PageButtonGrid.SelectedRows.Count = 0) Then
  @@ -1965,25 +1955,17 @@
1965 1955 End If
1966 1956 End Sub
1967 1957
1968 - Private Sub filterButtonButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles filterButtonButton.Click
1969 - Dim pageId As String = PageButtonIDText.Text
1970 1958
1971 - If (pageId = "") Then
1972 - For Each row As DataGridViewRow In PageButtonGrid.Rows
1973 - row.Visible = True
1974 1959
1975 - Next
1976 - Else
1977 - For Each row As DataGridViewRow In PageButtonGrid.Rows
1978 - If (Not row.Cells.Item(0).Value = pageId) Then
1979 - row.Visible = False
1980 - End If
1981 - Next
1982 - End If
1983 1960
1984 - End Sub
1985 1961
1986 - #Region "ALERT"
1962 +
1963 + '***********************************************************************ALERT***************************************************************************
1964 + '*********************************************************************************************************************************************************
1965 +
1966 +
1967 +
1968 +
1987 1969
1988 1970 Private Sub AlertBGColorText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AlertBGColorText.Click
1989 1971 Me.setColor(AlertBGColorText)
  @@ -1993,6 +1975,7 @@
1993 1975 Me.setImage(AlertTopBGIMGText, AlertTopBGIMGPic, "")
1994 1976 End Sub
1995 1977
1978 +
1996 1979 Private Sub AlertLeftBGIMGText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AlertLeftBGIMGText.Click
1997 1980 Me.setImage(AlertLeftBGIMGText, AlertLeftBGIMGPic, "")
1998 1981 End Sub
  @@ -2001,6 +1984,7 @@
2001 1984 Me.setImage(AlertRightBGIMGText, AlertRightBGIMGPic, "")
2002 1985 End Sub
2003 1986
1987 +
2004 1988 Private Sub AlertBGIMGText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AlertBGIMGText.Click
2005 1989 Me.setImage(AlertBGIMGText, AlertBGIMGPic, "")
2006 1990 End Sub
  @@ -2009,11 +1993,18 @@
2009 1993 Me.setImage(AlertBottomBGIMGText, AlertBottomBGIMGPic, "")
2010 1994 End Sub
2011 1995
2012 - #End Region
2013 1996
2014 - #Region "PAGE & BUTTON"
2015 1997
2016 - #Region "BUTTON(1)"
1998 +
1999 +
2000 +
2001 +
2002 +
2003 +
2004 +
2005 + '*************************************************************PAGE & BUTTON**************************************************************************'
2006 + '*****************************************************************************************************************************************************
2007 +
2017 2008
2018 2009 Private Sub B1PreconditionObjectsOText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B1PreconditionObjectsOText.MouseEnter
2019 2010 B1PreconditionObjectsOText.Size = New System.Drawing.Size(150, 38)
  @@ -2074,6 +2065,7 @@
2074 2065 B1PreconditionEventsNOText.Size = New System.Drawing.Size(72, 21)
2075 2066 End Sub
2076 2067
2068 +
2077 2069 Private Sub B1PostconditionEventsOText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B1PostconditionEventsOText.MouseEnter
2078 2070 B1PostconditionEventsOText.Size = New System.Drawing.Size(150, 38)
2079 2071 B1PostconditionEventsOText.BringToFront()
  @@ -2096,20 +2088,25 @@
2096 2088 B1PostconditionEventsNOText.Size = New System.Drawing.Size(72, 21)
2097 2089 End Sub
2098 2090
2091 +
2099 2092 Private Sub B1PreconditionQuestsNText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B1PreconditionQuestsNText.MouseEnter
2100 2093 B1PreconditionQuestsNText.Size = New System.Drawing.Size(150, 38)
2101 2094 B1PreconditionQuestsNText.BringToFront()
2102 2095 End Sub
2103 2096
2097 +
2104 2098 Private Sub B1PreconditionQuestsNText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B1PreconditionQuestsNText.MouseLeave
2105 2099 B1PreconditionQuestsNText.Size = New System.Drawing.Size(72, 21)
2106 2100 End Sub
2107 2101
2102 +
2103 +
2108 2104 Private Sub B1PreconditionQuestsSText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B1PreconditionQuestsSText.MouseEnter
2109 2105 B1PreconditionQuestsSText.Size = New System.Drawing.Size(150, 38)
2110 2106 B1PreconditionQuestsSText.BringToFront()
2111 2107 End Sub
2112 2108
2109 +
2113 2110 Private Sub B1PreconditionQuestsSText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B1PreconditionQuestsSText.MouseLeave
2114 2111 B1PreconditionQuestsSText.Size = New System.Drawing.Size(72, 21)
2115 2112 End Sub
  @@ -2119,24 +2116,31 @@
2119 2116 B1PreconditionQuestsDText.BringToFront()
2120 2117 End Sub
2121 2118
2119 +
2122 2120 Private Sub B1PreconditionQuestsDText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B1PreconditionQuestsDText.MouseLeave
2123 2121 B1PreconditionQuestsDText.Size = New System.Drawing.Size(72, 21)
2124 2122 End Sub
2125 2123
2124 +
2125 +
2126 2126 Private Sub B1PostconditionQuestsNText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B1PostconditionQuestsNText.MouseEnter
2127 2127 B1PostconditionQuestsNText.Size = New System.Drawing.Size(150, 38)
2128 2128 B1PostconditionQuestsNText.BringToFront()
2129 2129 End Sub
2130 2130
2131 +
2131 2132 Private Sub B1PostconditionQuestsNText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B1PostconditionQuestsNText.MouseLeave
2132 2133 B1PostconditionQuestsNText.Size = New System.Drawing.Size(72, 21)
2133 2134 End Sub
2134 2135
2136 +
2137 +
2135 2138 Private Sub B1PostconditionQuestsSText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B1PostconditionQuestsSText.MouseEnter
2136 2139 B1PostconditionQuestsSText.Size = New System.Drawing.Size(150, 38)
2137 2140 B1PostconditionQuestsSText.BringToFront()
2138 2141 End Sub
2139 2142
2143 +
2140 2144 Private Sub B1PostconditionQuestsSText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B1PostconditionQuestsSText.MouseLeave
2141 2145 B1PostconditionQuestsSText.Size = New System.Drawing.Size(72, 21)
2142 2146 End Sub
  @@ -2146,13 +2150,22 @@
2146 2150 B1PostconditionQuestsDText.BringToFront()
2147 2151 End Sub
2148 2152
2153 +
2149 2154 Private Sub B1PostconditionQuestsDText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B1PostconditionQuestsDText.MouseLeave
2150 2155 B1PostconditionQuestsDText.Size = New System.Drawing.Size(72, 21)
2151 2156 End Sub
2152 2157
2153 - #End Region
2154 2158
2155 - #Region "BUTTON(2)"
2159 + Private Sub B1PageButtonIMGText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B1PageButtonIMGText.Click
2160 + setImage(B1PageButtonIMGText, Nothing, "")
2161 + End Sub
2162 + '***********************************************************************END BUTTON1***************************************************
2163 +
2164 +
2165 +
2166 +
2167 +
2168 +
2156 2169
2157 2170 Private Sub B2PreconditionObjectsOText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B2PreconditionObjectsOText.MouseEnter
2158 2171 B2PreconditionObjectsOText.Size = New System.Drawing.Size(150, 38)
  @@ -2213,6 +2226,7 @@
2213 2226 B2PreconditionEventsNOText.Size = New System.Drawing.Size(72, 21)
2214 2227 End Sub
2215 2228
2229 +
2216 2230 Private Sub B2PostconditionEventsOText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B2PostconditionEventsOText.MouseEnter
2217 2231 B2PostconditionEventsOText.Size = New System.Drawing.Size(150, 38)
2218 2232 B2PostconditionEventsOText.BringToFront()
  @@ -2224,7 +2238,7 @@
2224 2238 End Sub
2225 2239
2226 2240 Private Sub B2PostconditionEventsNOText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B2PostconditionEventsNOText.MouseEnter
2227 - B2PostconditionEventsNOText.Size = New System.Drawing.Size(150, 21)
2241 + B2PostconditionEventsNOText.Size = New System.Drawing.Size(150, 38)
2228 2242 ButtonEventsGB.BringToFront()
2229 2243 B2PostconditionEventsNOText.BringToFront()
2230 2244
  @@ -2235,20 +2249,25 @@
2235 2249 B2PostconditionEventsNOText.Size = New System.Drawing.Size(72, 21)
2236 2250 End Sub
2237 2251
2252 +
2238 2253 Private Sub B2PreconditionQuestsNText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B2PreconditionQuestsNText.MouseEnter
2239 2254 B2PreconditionQuestsNText.Size = New System.Drawing.Size(150, 38)
2240 2255 B2PreconditionQuestsNText.BringToFront()
2241 2256 End Sub
2242 2257
2258 +
2243 2259 Private Sub B2PreconditionQuestsNText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B2PreconditionQuestsNText.MouseLeave
2244 2260 B2PreconditionQuestsNText.Size = New System.Drawing.Size(72, 21)
2245 2261 End Sub
2246 2262
2263 +
2264 +
2247 2265 Private Sub B2PreconditionQuestsSText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B2PreconditionQuestsSText.MouseEnter
2248 2266 B2PreconditionQuestsSText.Size = New System.Drawing.Size(150, 38)
2249 2267 B2PreconditionQuestsSText.BringToFront()
2250 2268 End Sub
2251 2269
2270 +
2252 2271 Private Sub B2PreconditionQuestsSText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B2PreconditionQuestsSText.MouseLeave
2253 2272 B2PreconditionQuestsSText.Size = New System.Drawing.Size(72, 21)
2254 2273 End Sub
  @@ -2258,24 +2277,31 @@
2258 2277 B2PreconditionQuestsDText.BringToFront()
2259 2278 End Sub
2260 2279
2280 +
2261 2281 Private Sub B2PreconditionQuestsDText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B2PreconditionQuestsDText.MouseLeave
2262 2282 B2PreconditionQuestsDText.Size = New System.Drawing.Size(72, 21)
2263 2283 End Sub
2264 2284
2285 +
2286 +
2265 2287 Private Sub B2PostconditionQuestsNText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B2PostconditionQuestsNText.MouseEnter
2266 2288 B2PostconditionQuestsNText.Size = New System.Drawing.Size(150, 38)
2267 2289 B2PostconditionQuestsNText.BringToFront()
2268 2290 End Sub
2269 2291
2292 +
2270 2293 Private Sub B2PostconditionQuestsNText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B2PostconditionQuestsNText.MouseLeave
2271 2294 B2PostconditionQuestsNText.Size = New System.Drawing.Size(72, 21)
2272 2295 End Sub
2273 2296
2297 +
2298 +
2274 2299 Private Sub B2PostconditionQuestsSText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B2PostconditionQuestsSText.MouseEnter
2275 2300 B2PostconditionQuestsSText.Size = New System.Drawing.Size(150, 38)
2276 2301 B2PostconditionQuestsSText.BringToFront()
2277 2302 End Sub
2278 2303
2304 +
2279 2305 Private Sub B2PostconditionQuestsSText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B2PostconditionQuestsSText.MouseLeave
2280 2306 B2PostconditionQuestsSText.Size = New System.Drawing.Size(72, 21)
2281 2307 End Sub
  @@ -2285,13 +2311,23 @@
2285 2311 B2PostconditionQuestsDText.BringToFront()
2286 2312 End Sub
2287 2313
2314 +
2288 2315 Private Sub B2PostconditionQuestsDText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B2PostconditionQuestsDText.MouseLeave
2289 2316 B2PostconditionQuestsDText.Size = New System.Drawing.Size(72, 21)
2290 2317 End Sub
2291 2318
2292 - #End Region
2293 2319
2294 - #Region "BUTTON(3)"
2320 + Private Sub B2PageButtonIMGText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B2PageButtonIMGText.Click
2321 + setImage(B2PageButtonIMGText, Nothing, "")
2322 + End Sub
2323 +
2324 +
2325 + '*************************************************************************END BUTTON2*************************************************
2326 +
2327 +
2328 +
2329 +
2330 +
2295 2331
2296 2332 Private Sub B3PreconditionObjectsOText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B3PreconditionObjectsOText.MouseEnter
2297 2333 B3PreconditionObjectsOText.Size = New System.Drawing.Size(150, 38)
  @@ -2352,6 +2388,7 @@
2352 2388 B3PreconditionEventsNOText.Size = New System.Drawing.Size(72, 21)
2353 2389 End Sub
2354 2390
2391 +
2355 2392 Private Sub B3PostconditionEventsOText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B3PostconditionEventsOText.MouseEnter
2356 2393 B3PostconditionEventsOText.Size = New System.Drawing.Size(150, 38)
2357 2394 B3PostconditionEventsOText.BringToFront()
  @@ -2374,20 +2411,25 @@
2374 2411 B3PostconditionEventsNOText.Size = New System.Drawing.Size(72, 21)
2375 2412 End Sub
2376 2413
2414 +
2377 2415 Private Sub B3PreconditionQuestsNText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B3PreconditionQuestsNText.MouseEnter
2378 2416 B3PreconditionQuestsNText.Size = New System.Drawing.Size(150, 38)
2379 2417 B3PreconditionQuestsNText.BringToFront()
2380 2418 End Sub
2381 2419
2420 +
2382 2421 Private Sub B3PreconditionQuestsNText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B3PreconditionQuestsNText.MouseLeave
2383 2422 B3PreconditionQuestsNText.Size = New System.Drawing.Size(72, 21)
2384 2423 End Sub
2385 2424
2425 +
2426 +
2386 2427 Private Sub B3PreconditionQuestsSText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B3PreconditionQuestsSText.MouseEnter
2387 2428 B3PreconditionQuestsSText.Size = New System.Drawing.Size(150, 38)
2388 2429 B3PreconditionQuestsSText.BringToFront()
2389 2430 End Sub
2390 2431
2432 +
2391 2433 Private Sub B3PreconditionQuestsSText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B3PreconditionQuestsSText.MouseLeave
2392 2434 B3PreconditionQuestsSText.Size = New System.Drawing.Size(72, 21)
2393 2435 End Sub
  @@ -2397,24 +2439,31 @@
2397 2439 B3PreconditionQuestsDText.BringToFront()
2398 2440 End Sub
2399 2441
2442 +
2400 2443 Private Sub B3PreconditionQuestsDText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B3PreconditionQuestsDText.MouseLeave
2401 2444 B3PreconditionQuestsDText.Size = New System.Drawing.Size(72, 21)
2402 2445 End Sub
2403 2446
2447 +
2448 +
2404 2449 Private Sub B3PostconditionQuestsNText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B3PostconditionQuestsNText.MouseEnter
2405 2450 B3PostconditionQuestsNText.Size = New System.Drawing.Size(150, 38)
2406 2451 B3PostconditionQuestsNText.BringToFront()
2407 2452 End Sub
2408 2453
2454 +
2409 2455 Private Sub B3PostconditionQuestsNText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B3PostconditionQuestsNText.MouseLeave
2410 2456 B3PostconditionQuestsNText.Size = New System.Drawing.Size(72, 21)
2411 2457 End Sub
2412 2458
2459 +
2460 +
2413 2461 Private Sub B3PostconditionQuestsSText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B3PostconditionQuestsSText.MouseEnter
2414 2462 B3PostconditionQuestsSText.Size = New System.Drawing.Size(150, 38)
2415 2463 B3PostconditionQuestsSText.BringToFront()
2416 2464 End Sub
2417 2465
2466 +
2418 2467 Private Sub B3PostconditionQuestsSText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B3PostconditionQuestsSText.MouseLeave
2419 2468 B3PostconditionQuestsSText.Size = New System.Drawing.Size(72, 21)
2420 2469 End Sub
  @@ -2424,13 +2473,18 @@
2424 2473 B3PostconditionQuestsDText.BringToFront()
2425 2474 End Sub
2426 2475
2476 +
2427 2477 Private Sub B3PostconditionQuestsDText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B3PostconditionQuestsDText.MouseLeave
2428 2478 B3PostconditionQuestsDText.Size = New System.Drawing.Size(72, 21)
2429 2479 End Sub
2430 2480
2431 - #End Region
2481 + Private Sub B3PageButtonIMGText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B3PageButtonIMGText.Click
2482 + setImage(B3PageButtonIMGText, Nothing, "")
2483 + End Sub
2484 +
2485 + '**************************************************END BUTTON3************************************************************************+
2486 +
2432 2487
2433 - #Region "BUTTONS(4)"
2434 2488
2435 2489 Private Sub B4PreconditionObjectsOText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B4PreconditionObjectsOText.MouseEnter
2436 2490 B4PreconditionObjectsOText.Size = New System.Drawing.Size(150, 38)
  @@ -2491,6 +2545,7 @@
2491 2545 B4PreconditionEventsNOText.Size = New System.Drawing.Size(72, 21)
2492 2546 End Sub
2493 2547
2548 +
2494 2549 Private Sub B4PostconditionEventsOText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B4PostconditionEventsOText.MouseEnter
2495 2550 B4PostconditionEventsOText.Size = New System.Drawing.Size(150, 38)
2496 2551 B4PostconditionEventsOText.BringToFront()
  @@ -2513,20 +2568,25 @@
2513 2568 B4PostconditionEventsNOText.Size = New System.Drawing.Size(72, 21)
2514 2569 End Sub
2515 2570
2571 +
2516 2572 Private Sub B4PreconditionQuestsNText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B4PreconditionQuestsNText.MouseEnter
2517 2573 B4PreconditionQuestsNText.Size = New System.Drawing.Size(150, 38)
2518 2574 B4PreconditionQuestsNText.BringToFront()
2519 2575 End Sub
2520 2576
2577 +
2521 2578 Private Sub B4PreconditionQuestsNText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B4PreconditionQuestsNText.MouseLeave
2522 2579 B4PreconditionQuestsNText.Size = New System.Drawing.Size(72, 21)
2523 2580 End Sub
2524 2581
2582 +
2583 +
2525 2584 Private Sub B4PreconditionQuestsSText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B4PreconditionQuestsSText.MouseEnter
2526 2585 B4PreconditionQuestsSText.Size = New System.Drawing.Size(150, 38)
2527 2586 B4PreconditionQuestsSText.BringToFront()
2528 2587 End Sub
2529 2588
2589 +
2530 2590 Private Sub B4PreconditionQuestsSText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B4PreconditionQuestsSText.MouseLeave
2531 2591 B4PreconditionQuestsSText.Size = New System.Drawing.Size(72, 21)
2532 2592 End Sub
  @@ -2536,24 +2596,31 @@
2536 2596 B4PreconditionQuestsDText.BringToFront()
2537 2597 End Sub
2538 2598
2599 +
2539 2600 Private Sub B4PreconditionQuestsDText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B4PreconditionQuestsDText.MouseLeave
2540 2601 B4PreconditionQuestsDText.Size = New System.Drawing.Size(72, 21)
2541 2602 End Sub
2542 2603
2604 +
2605 +
2543 2606 Private Sub B4PostconditionQuestsNText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B4PostconditionQuestsNText.MouseEnter
2544 2607 B4PostconditionQuestsNText.Size = New System.Drawing.Size(150, 38)
2545 2608 B4PostconditionQuestsNText.BringToFront()
2546 2609 End Sub
2547 2610
2611 +
2548 2612 Private Sub B4PostconditionQuestsNText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B4PostconditionQuestsNText.MouseLeave
2549 2613 B4PostconditionQuestsNText.Size = New System.Drawing.Size(72, 21)
2550 2614 End Sub
2551 2615
2616 +
2617 +
2552 2618 Private Sub B4PostconditionQuestsSText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B4PostconditionQuestsSText.MouseEnter
2553 2619 B4PostconditionQuestsSText.Size = New System.Drawing.Size(150, 38)
2554 2620 B4PostconditionQuestsSText.BringToFront()
2555 2621 End Sub
2556 2622
2623 +
2557 2624 Private Sub B4PostconditionQuestsSText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B4PostconditionQuestsSText.MouseLeave
2558 2625 B4PostconditionQuestsSText.Size = New System.Drawing.Size(72, 21)
2559 2626 End Sub
  @@ -2563,13 +2630,20 @@
2563 2630 B4PostconditionQuestsDText.BringToFront()
2564 2631 End Sub
2565 2632
2633 +
2566 2634 Private Sub B4PostconditionQuestsDText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B4PostconditionQuestsDText.MouseLeave
2567 2635 B4PostconditionQuestsDText.Size = New System.Drawing.Size(72, 21)
2568 2636 End Sub
2569 2637
2570 - #End Region
2571 2638
2572 - #Region "BUTTONS(5)"
2639 +
2640 + Private Sub B4PageButtonIMGText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B4PageButtonIMGText.Click
2641 + setImage(B4PageButtonIMGText, Nothing, "")
2642 + End Sub
2643 +
2644 + '****************************************************************END BUTTON 4***************************************************************
2645 +
2646 +
2573 2647
2574 2648 Private Sub B5PreconditionObjectsOText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B5PreconditionObjectsOText.MouseEnter
2575 2649 B5PreconditionObjectsOText.Size = New System.Drawing.Size(150, 38)
  @@ -2630,6 +2704,7 @@
2630 2704 B5PreconditionEventsNOText.Size = New System.Drawing.Size(72, 21)
2631 2705 End Sub
2632 2706
2707 +
2633 2708 Private Sub B5PostconditionEventsOText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B5PostconditionEventsOText.MouseEnter
2634 2709 B5PostconditionEventsOText.Size = New System.Drawing.Size(150, 38)
2635 2710 B5PostconditionEventsOText.BringToFront()
  @@ -2652,20 +2727,25 @@
2652 2727 B5PostconditionEventsNOText.Size = New System.Drawing.Size(72, 21)
2653 2728 End Sub
2654 2729
2730 +
2655 2731 Private Sub B5PreconditionQuestsNText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B5PreconditionQuestsNText.MouseEnter
2656 2732 B5PreconditionQuestsNText.Size = New System.Drawing.Size(150, 38)
2657 2733 B5PreconditionQuestsNText.BringToFront()
2658 2734 End Sub
2659 2735
2736 +
2660 2737 Private Sub B5PreconditionQuestsNText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B5PreconditionQuestsNText.MouseLeave
2661 2738 B5PreconditionQuestsNText.Size = New System.Drawing.Size(72, 21)
2662 2739 End Sub
2663 2740
2741 +
2742 +
2664 2743 Private Sub B5PreconditionQuestsSText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B5PreconditionQuestsSText.MouseEnter
2665 2744 B5PreconditionQuestsSText.Size = New System.Drawing.Size(150, 38)
2666 2745 B5PreconditionQuestsSText.BringToFront()
2667 2746 End Sub
2668 2747
2748 +
2669 2749 Private Sub B5PreconditionQuestsSText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B5PreconditionQuestsSText.MouseLeave
2670 2750 B5PreconditionQuestsSText.Size = New System.Drawing.Size(72, 21)
2671 2751 End Sub
  @@ -2675,24 +2755,31 @@
2675 2755 B5PreconditionQuestsDText.BringToFront()
2676 2756 End Sub
2677 2757
2758 +
2678 2759 Private Sub B5PreconditionQuestsDText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B5PreconditionQuestsDText.MouseLeave
2679 2760 B5PreconditionQuestsDText.Size = New System.Drawing.Size(72, 21)
2680 2761 End Sub
2681 2762
2763 +
2764 +
2682 2765 Private Sub B5PostconditionQuestsNText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B5PostconditionQuestsNText.MouseEnter
2683 2766 B5PostconditionQuestsNText.Size = New System.Drawing.Size(150, 38)
2684 2767 B5PostconditionQuestsNText.BringToFront()
2685 2768 End Sub
2686 2769
2770 +
2687 2771 Private Sub B5PostconditionQuestsNText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B5PostconditionQuestsNText.MouseLeave
2688 2772 B5PostconditionQuestsNText.Size = New System.Drawing.Size(72, 21)
2689 2773 End Sub
2690 2774
2775 +
2776 +
2691 2777 Private Sub B5PostconditionQuestsSText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B5PostconditionQuestsSText.MouseEnter
2692 2778 B5PostconditionQuestsSText.Size = New System.Drawing.Size(150, 38)
2693 2779 B5PostconditionQuestsSText.BringToFront()
2694 2780 End Sub
2695 2781
2782 +
2696 2783 Private Sub B5PostconditionQuestsSText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B5PostconditionQuestsSText.MouseLeave
2697 2784 B5PostconditionQuestsSText.Size = New System.Drawing.Size(72, 21)
2698 2785 End Sub
  @@ -2702,13 +2789,19 @@
2702 2789 B5PostconditionQuestsDText.BringToFront()
2703 2790 End Sub
2704 2791
2792 +
2705 2793 Private Sub B5PostconditionQuestsDText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B5PostconditionQuestsDText.MouseLeave
2706 2794 B5PostconditionQuestsDText.Size = New System.Drawing.Size(72, 21)
2707 2795 End Sub
2708 2796
2709 - #End Region
2710 2797
2711 - #Region "BUTTONS(6)"
2798 + Private Sub B5PageButtonIMGText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B5PageButtonIMGText.Click
2799 + setImage(B5PageButtonIMGText, Nothing, "")
2800 + End Sub
2801 +
2802 + '*******************************************************************END BUTTON5*****************************************************************************
2803 +
2804 +
2712 2805
2713 2806 Private Sub B6PreconditionObjectsOText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B6PreconditionObjectsOText.MouseEnter
2714 2807 B6PreconditionObjectsOText.Size = New System.Drawing.Size(150, 38)
  @@ -2769,6 +2862,7 @@
2769 2862 B6PreconditionEventsNOText.Size = New System.Drawing.Size(72, 21)
2770 2863 End Sub
2771 2864
2865 +
2772 2866 Private Sub B6PostconditionEventsOText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B6PostconditionEventsOText.MouseEnter
2773 2867 B6PostconditionEventsOText.Size = New System.Drawing.Size(150, 38)
2774 2868 B6PostconditionEventsOText.BringToFront()
  @@ -2791,20 +2885,25 @@
2791 2885 B6PostconditionEventsNOText.Size = New System.Drawing.Size(72, 21)
2792 2886 End Sub
2793 2887
2888 +
2794 2889 Private Sub B6PreconditionQuestsNText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B6PreconditionQuestsNText.MouseEnter
2795 2890 B6PreconditionQuestsNText.Size = New System.Drawing.Size(150, 38)
2796 2891 B6PreconditionQuestsNText.BringToFront()
2797 2892 End Sub
2798 2893
2894 +
2799 2895 Private Sub B6PreconditionQuestsNText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B6PreconditionQuestsNText.MouseLeave
2800 2896 B6PreconditionQuestsNText.Size = New System.Drawing.Size(72, 21)
2801 2897 End Sub
2802 2898
2899 +
2900 +
2803 2901 Private Sub B6PreconditionQuestsSText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B6PreconditionQuestsSText.MouseEnter
2804 2902 B6PreconditionQuestsSText.Size = New System.Drawing.Size(150, 38)
2805 2903 B6PreconditionQuestsSText.BringToFront()
2806 2904 End Sub
2807 2905
2906 +
2808 2907 Private Sub B6PreconditionQuestsSText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B6PreconditionQuestsSText.MouseLeave
2809 2908 B6PreconditionQuestsSText.Size = New System.Drawing.Size(72, 21)
2810 2909 End Sub
  @@ -2814,24 +2913,31 @@
2814 2913 B6PreconditionQuestsDText.BringToFront()
2815 2914 End Sub
2816 2915
2916 +
2817 2917 Private Sub B6PreconditionQuestsDText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B6PreconditionQuestsDText.MouseLeave
2818 2918 B6PreconditionQuestsDText.Size = New System.Drawing.Size(72, 21)
2819 2919 End Sub
2820 2920
2921 +
2922 +
2821 2923 Private Sub B6PostconditionQuestsNText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B6PostconditionQuestsNText.MouseEnter
2822 2924 B6PostconditionQuestsNText.Size = New System.Drawing.Size(150, 38)
2823 2925 B6PostconditionQuestsNText.BringToFront()
2824 2926 End Sub
2825 2927
2928 +
2826 2929 Private Sub B6PostconditionQuestsNText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B6PostconditionQuestsNText.MouseLeave
2827 2930 B6PostconditionQuestsNText.Size = New System.Drawing.Size(72, 21)
2828 2931 End Sub
2829 2932
2933 +
2934 +
2830 2935 Private Sub B6PostconditionQuestsSText_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B6PostconditionQuestsSText.MouseEnter
2831 2936 B6PostconditionQuestsSText.Size = New System.Drawing.Size(150, 38)
2832 2937 B6PostconditionQuestsSText.BringToFront()
2833 2938 End Sub
2834 2939
2940 +
2835 2941 Private Sub B6PostconditionQuestsSText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B6PostconditionQuestsSText.MouseLeave
2836 2942 B6PostconditionQuestsSText.Size = New System.Drawing.Size(72, 21)
2837 2943 End Sub
  @@ -2841,22 +2947,33 @@
2841 2947 B6PostconditionQuestsDText.BringToFront()
2842 2948 End Sub
2843 2949
2950 +
2844 2951 Private Sub B6PostconditionQuestsDText_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B6PostconditionQuestsDText.MouseLeave
2845 2952 B6PostconditionQuestsDText.Size = New System.Drawing.Size(72, 21)
2846 2953 End Sub
2847 2954
2848 - #End Region
2955 +
2956 +
2957 + Private Sub B6PageButtonIMGText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B6PageButtonIMGText.Click
2958 + setImage(B6PageButtonIMGText, Nothing, "")
2959 + End Sub
2960 + '**********************************************************************END BUTTON6*****************************************************************
2961 +
2962 +
2963 +
2964 +
2849 2965
2850 2966 Private Sub PageTopAreaImg_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PageTopAreaImg.Click
2851 2967 setImage(PageTopAreaImgText, PageTopAreaImg, "")
2852 2968 End Sub
2853 2969
2970 +
2854 2971 'aggiorna una CheckedListBox secondo la datagridview passata come parametro
2855 2972 Private Sub updateCheckedListBox(ByVal checkedListBox As CheckedListBox, ByVal data As DataGridView)
2856 2973 Dim value As String
2857 2974 checkedListBox.Items.Clear()
2858 2975 For Each dgv As DataGridViewRow In data.Rows
2859 - value = dgv.Cells.Item(0).Value.ToString() + "(" + dgv.Cells.Item(1).Value.ToString() + ")"
2976 + value = dgv.Cells.Item(0).Value.ToString() '+ "(" + dgv.Cells.Item(1).Value.ToString() + ")"
2860 2977 checkedListBox.Items.Add(value)
2861 2978 Next
2862 2979
  @@ -2888,6 +3005,7 @@
2888 3005 Next
2889 3006 End Sub
2890 3007
3008 +
2891 3009 Private Sub updateOEQCheckedListBoxes()
2892 3010
2893 3011 updateObjectCheckedListBoxes()
  @@ -2928,13 +3046,21 @@
2928 3046 End If
2929 3047 If ctr.GetType.Name = "GroupBox" Then
2930 3048 For Each ctr1 As Control In ctr.Controls
3049 + ' If Not ctr1.Name.IndexOf("B" + CStr(buttonNumber)) = -1 And ctr1.GetType.Name = "CheckedListBox" Then
3050 + 'CType(ctr1, CheckedListBox).ClearSelected()
3051 +
3052 + 'End If
2931 3053 If Not ctr1.Name.IndexOf("B" + CStr(buttonNumber)) = -1 Then
2932 3054 ctr1.Visible = False
2933 3055 End If
3056 +
3057 +
2934 3058 Next
2935 3059 End If
2936 3060 Next
2937 3061
3062 + Me.buttonsShown.Item(buttonNumber) = False
3063 +
2938 3064 End Sub
2939 3065
2940 3066 'rende visibile i controlli relativi al bottone con numero passato come parametro
  @@ -2953,11 +3079,12 @@
2953 3079 Next
2954 3080 End If
2955 3081 Next
2956 -
3082 + Me.buttonsShown.Item(buttonNumber) = True
2957 3083
2958 3084
2959 3085 End Sub
2960 3086
3087 +
2961 3088 Private Sub AddButtonButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddButtonButton.Click
2962 3089 Dim button As Byte = 0
2963 3090
  @@ -2978,31 +3105,35 @@
2978 3105
2979 3106 End Sub
2980 3107
3108 +
3109 +
3110 + Private Sub B1DeleteButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B1DeleteButton.Click
3111 + hideButton(1)
3112 + Me.buttonsShown.Item(1) = False
3113 + End Sub
2981 3114 Private Sub B2DeleteButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B2DeleteButton.Click
2982 3115 hideButton(2)
2983 3116 Me.buttonsShown.Item(2) = False
2984 3117 End Sub
2985 -
2986 3118 Private Sub B3DeleteButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B3DeleteButton.Click
2987 3119 hideButton(3)
2988 3120 Me.buttonsShown.Item(3) = False
2989 3121 End Sub
2990 -
2991 3122 Private Sub B4DeleteButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B4DeleteButton.Click
2992 3123 hideButton(4)
2993 3124 Me.buttonsShown.Item(4) = False
2994 3125 End Sub
2995 -
2996 3126 Private Sub B5DeleteButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B5DeleteButton.Click
2997 3127 hideButton(5)
2998 3128 Me.buttonsShown.Item(5) = False
2999 3129 End Sub
3000 -
3001 3130 Private Sub B6DeleteButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B6DeleteButton.Click
3002 3131 hideButton(6)
3003 3132 Me.buttonsShown.Item(6) = False
3004 3133 End Sub
3005 3134
3135 +
3136 +
3006 3137 Private Sub PageIdDoneButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PageIdDoneButton.Click
3007 3138 Dim row As String() = New String(19) {}
3008 3139
  @@ -3037,90 +3168,126 @@
3037 3168
3038 3169 Private Sub RemovePageButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RemovePageButton.Click
3039 3170 Dim toRemove As String = ""
3171 + Dim goON As Boolean = True
3040 3172 Try
3041 3173 toRemove = ViewPageCB.SelectedItem.ToString()
3042 3174 Catch
3175 + goON = False
3043 3176 End Try
3177 +
3044 3178 Dim index As Int16 = -1
3045 3179
3046 - For Each row As DataGridViewRow In PagesGrid.Rows
3047 - If row.Cells.Item(0).Value = toRemove Then
3048 - index = row.Index
3180 + If goON Then
3181 + For Each row As DataGridViewRow In PagesGrid.Rows
3182 + If row.Cells.Item(0).Value = toRemove Then
3183 + index = row.Index
3184 + End If
3185 + Next
3186 +
3187 + If (Not index = -1) Then
3188 + PagesGrid.Rows.RemoveAt(index)
3189 + updatePageCheckBoxes()
3190 + removeButtons(toRemove)
3191 + Try
3192 + ViewPageCB.SelectedIndex = ViewPageCB.SelectionStart
3193 + Catch
3194 + ViewPageCB.Text = ""
3195 + End Try
3049 3196 End If
3050 - Next
3051 3197
3052 - If (Not index = -1) Then
3053 - PagesGrid.Rows.RemoveAt(index)
3054 - updatePageCheckBoxes()
3055 - Try
3056 - ViewPageCB.SelectedIndex = ViewPageCB.SelectionStart
3057 - Catch
3058 - ViewPageCB.Text = ""
3059 - End Try
3060 3198 End If
3061 3199
3062 -
3063 -
3064 3200 End Sub
3065 3201
3066 3202 'Salva la pagina corrente e i relativi bottoni
3067 3203 Private Sub SavePageButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SavePageButton.Click
3068 - Dim currentPage As String = ViewPageCB.SelectedItem.ToString
3204 +
3205 + Dim currentPage As String = ""
3206 + Dim goOn As Boolean = True
3207 + Try
3208 + currentPage = ViewPageCB.SelectedItem.ToString()
3209 +
3210 + Catch
3211 + goOn = False
3212 + showWarning("Select a page or creat a NEW one.")
3213 + End Try
3214 +
3215 +
3069 3216 Dim index As Integer = -1
3217 + If goOn Then
3218 + If (checkTextInTB(PageDescriptionText) And Not (currentPage = "")) Then
3070 3219
3071 - If (checkTextInTB(PageDescriptionText) And Not (currentPage = "")) Then
3072 3220
3221 + For Each row As DataGridViewRow In PagesGrid.Rows
3222 + If (row.Cells.Item(0).Value = currentPage) Then
3223 + index = row.Index
3224 + Exit For
3225 + End If
3226 + Next
3073 3227
3074 - For Each row As DataGridViewRow In PagesGrid.Rows
3075 - If (row.Cells.Item(0).Value = currentPage) Then
3076 - index = row.Index
3077 - Exit For
3078 - End If
3079 - Next
3080 3228
3229 + PagesGrid.Rows.Item(index).Cells.Item("PageDescriptionTextCell").Value = PageDescriptionText.Text
3230 + PagesGrid.Rows.Item(index).Cells.Item("PageTopAreaImgTextCell").Value = PageTopAreaImgText.Text
3081 3231
3082 - PagesGrid.Rows.Item(index).Cells.Item("PageDescriptionTextCell").Value = PageDescriptionText.Text
3083 - PagesGrid.Rows.Item(index).Cells.Item("PageTopAreaImgTextCell").Value = PageTopAreaImgText.Text
3084 3232
3085 3233
3086 3234
3235 + For Each ctr As Control In PageMoreOptionPanel.Controls
3236 + If (ctr.GetType.Name = "GroupBox") Then
3237 + For Each ctr1 As Control In ctr.Controls
3238 + If (ctr1.GetType().Name = "TextBox") Then
3239 + If (ctr1.Text = "") Then
3240 + PagesGrid.Rows.Item(index).Cells.Item(ctr1.Name + "Cell").Value = "undefined"
3241 + Else
3242 + PagesGrid.Rows.Item(index).Cells.Item(ctr1.Name + "Cell").Value = ctr1.Text
3243 + End If
3087 3244
3088 - For Each ctr As Control In PageMoreOptionPanel.Controls
3089 - If (ctr.GetType.Name = "GroupBox") Then
3090 - For Each ctr1 As Control In ctr.Controls
3091 - If (ctr1.GetType().Name = "TextBox") Then
3092 - If (ctr1.Text = "") Then
3093 - PagesGrid.Rows.Item(index).Cells.Item(ctr1.Name + "Cell").Value = "undefined"
3094 - Else
3095 - PagesGrid.Rows.Item(index).Cells.Item(ctr1.Name + "Cell").Value = ctr1.Text
3096 3245 End If
3246 + Next
3097 3247
3248 + End If
3249 + If (ctr.GetType().Name = "TextBox") Then
3250 + If (ctr.Text = "") Then
3251 + PagesGrid.Rows.Item(index).Cells.Item(ctr.Name + "Cell").Value = "undefined"
3252 + Else
3253 + PagesGrid.Rows.Item(index).Cells.Item(ctr.Name + "Cell").Value = ctr.Text
3098 3254 End If
3099 - Next
3100 3255
3101 - End If
3102 - If (ctr.GetType().Name = "TextBox") Then
3103 - If (ctr.Text = "") Then
3104 - PagesGrid.Rows.Item(index).Cells.Item(ctr.Name + "Cell").Value = "undefined"
3105 - Else
3106 - PagesGrid.Rows.Item(index).Cells.Item(ctr.Name + "Cell").Value = ctr.Text
3256 +
3107 3257 End If
3258 + Next
3259 + addButtons()
3108 3260
3261 + Else
3262 + showWarning("Page description must not be empty")
3263 + End If
3264 + End If
3265 + End Sub
3109 3266
3110 - End If
3111 - Next
3112 - addButtons()
3267 + 'rimuove i bottoni di una pagina
3268 + Private Sub removeButtons(ByVal pageId As String)
3269 + Dim buttons As ArrayList = New ArrayList()
3270 +
3271 + For Each row As DataGridViewRow In PageButtonGrid.Rows
3272 + If row.Cells.Item(0).Value.ToString = pageId Then
3273 + buttons.Add(row)
3274 + End If
3275 + Next
3276 +
3277 + For Each item As DataGridViewRow In buttons
3278 + PageButtonGrid.Rows.Remove(item)
3279 + Next
3113 3280
3114 - Else
3115 - showWarning("Page description must not be empty")
3116 - End If
3117 3281 End Sub
3118 3282
3283 +
3119 3284 'salva un bottone
3120 3285 Private Sub addButton(ByVal buttonNumber As Integer)
3121 3286 Dim id As String = ""
3122 3287 Dim dId As String = ""
3123 3288 Dim goOn As Boolean = True
3289 + 'Dim chklb As CheckedListBox
3290 +
3124 3291 Try
3125 3292 id = ViewPageCB.SelectedItem.ToString
3126 3293 Catch
  @@ -3148,8 +3315,11 @@
3148 3315 For Each ctr1 As Control In ctr.Controls
3149 3316 If (Not ctr1.Name.IndexOf("B" + CStr(buttonNumber)) = -1) And (ctr1.GetType.Name = "CheckedListBox") Then
3150 3317 value = ""
3151 - For Each checked As CheckedListBox.CheckedItemCollection In CType(ctr1, CheckedListBox).CheckedItems
3152 - value += checked.ToString + ","
3318 + ' chklb = CType(ctr1, CheckedListBox)
3319 + For Each checked As String In CType(ctr1, CheckedListBox).CheckedItems
3320 +
3321 + value += checked + ","
3322 +
3153 3323 Next
3154 3324 If Not value = "" Then
3155 3325 value = value.Remove(value.Length - 1)
  @@ -3167,6 +3337,7 @@
3167 3337 PageButtonGrid.Rows.Item(index).Cells.Item(0).Value = id
3168 3338 PageButtonGrid.Rows.Item(index).Cells.Item(1).Value = dId
3169 3339 PageButtonGrid.Rows.Item(index).Cells.Item(2).Value = PageButtonTabPage.Controls.Item("B" + CStr(buttonNumber) + "PageButtonTextText").Text
3340 + PageButtonGrid.Rows.Item(index).Cells.Item(17).Value = PageButtonTabPage.Controls.Item("B" + CStr(buttonNumber) + "PageButtonIMGText").Text
3170 3341 End If
3171 3342
3172 3343
  @@ -3191,16 +3362,10 @@
3191 3362
3192 3363 If goOn Then
3193 3364
3194 -
3195 - For Each row As DataGridViewRow In PageButtonGrid.Rows
3196 - If (row.Cells(0).Value = id) Then
3197 - indexs.Add(row.Index)
3198 - End If
3199 - Next
3200 -
3201 - For Each index As Integer In indexs
3202 - PageButtonGrid.Rows.RemoveAt(index)
3203 - Next
3365 + removeButtons(id)
3366 + ' For Each index As Integer In indexs
3367 + 'PageButtonGrid.Rows.RemoveAt(index)
3368 + ' Next
3204 3369
3205 3370 For Each key As Integer In buttonsShown.Keys
3206 3371 If buttonsShown(key) Then
  @@ -3225,12 +3390,17 @@
3225 3390 End If
3226 3391 Next
3227 3392 If (Not IsNothing(cells)) Then
3393 +
3394 +
3228 3395 PageDescriptionText.Text = cells.Item("PageDescriptionTextCell").Value
3229 3396 PageTopAreaImgText.Text = cells.Item("PageTopAreaImgTextCell").Value
3230 3397 If PageTopAreaImgText.Text = "undefined" Then
3231 - PageTopAreaImg.Image = Nothing
3398 + PageTopAreaImg.BackgroundImage = Nothing
3232 3399 Else
3233 - PageTopAreaImg.Image = New Bitmap(getImagesPath() + cells.Item("PageTopAreaImgTextCell").Value.ToString)
3400 + Try
3401 + PageTopAreaImg.BackgroundImage = New Bitmap(getImagesPath() + cells.Item("PageTopAreaImgTextCell").Value.ToString)
3402 + Catch
3403 + End Try
3234 3404 End If
3235 3405
3236 3406 For Each ctr As Control In PageMoreOptionPanel.Controls
  @@ -3266,6 +3436,8 @@
3266 3436 For Each ctr1 As Control In ctr.Controls
3267 3437 If Not ctr1.Name.IndexOf("B" + CStr(buttonNumber)) = -1 Then
3268 3438 If ctr1.GetType.Name = "CheckedListBox" Then
3439 + Me.uncheckCLB(ctr1)
3440 +
3269 3441 map = dataCells.Item(ctr1.Name.Substring(2) + "Cell").Value.ToString.Split(",")
3270 3442 For Each val As String In map
3271 3443
  @@ -3281,10 +3453,13 @@
3281 3453 Next
3282 3454 End Sub
3283 3455
3456 +
3284 3457 'mostra i bottoni di una pagina
3285 3458 Private Sub fillButtons(ByVal pageId As String)
3286 3459 Dim cellsArray As ArrayList = New ArrayList()
3287 - Dim buttonNumber As Byte = 2
3460 + Dim buttonNumber As Byte = 1
3461 + Dim withPreconditions As Boolean = False
3462 + Dim button1Assigned As Boolean = False
3288 3463
3289 3464 For Each row As DataGridViewRow In PageButtonGrid.Rows
3290 3465 If row.Cells.Item(0).Value.ToString = pageId Then
  @@ -3292,12 +3467,30 @@
3292 3467 End If
3293 3468 Next
3294 3469
3295 - For i As Byte = 2 To 6
3470 + For i As Byte = 1 To 6
3296 3471 hideButton(i)
3297 3472 Next
3298 3473
3299 3474 For Each cells As DataGridViewCellCollection In cellsArray
3475 + ' withPreconditions = False
3476 + ' For Each cell As DataGridViewCell In cells
3477 + 'If Not cell.OwningColumn.Name.IndexOf("Pre") = -1 Then
3478 + 'If Not cell.Value.ToString = "undefined" Then
3479 + 'withPreconditions = True
3480 + ' Exit For
3481 + ' End If
3482 + ' End If
3483 + ' Next
3484 +
3485 + ' If Not withPreconditions And Not button1Assigned Then
3486 + 'fillButton(1, cells)
3487 + ' button1Assigned = True
3488 + ' Else
3489 + showButton(buttonNumber)
3490 + fillButton(buttonNumber, cells)
3300 3491
3492 + buttonNumber += 1
3493 + ' End If
3301 3494
3302 3495 Next
3303 3496
  @@ -3305,22 +3498,58 @@
3305 3498
3306 3499 End Sub
3307 3500
3501 +
3502 + Private Sub uncheckCLB(ByVal chk As CheckedListBox)
3503 + For Each item As Int32 In chk.CheckedIndices
3504 + chk.SetItemChecked(item, False)
3505 +
3506 + Next
3507 + End Sub
3508 +
3308 3509 Private Sub ViewPageCB_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ViewPageCB.SelectedIndexChanged
3309 3510 Dim pageId As String = ViewPageCB.SelectedItem.ToString
3511 +
3310 3512 cleanControl(PageButtonTabPage)
3311 3513 cleanControl(PageMoreOptionPanel)
3312 3514 fillPage(pageId)
3313 3515 fillButtons(pageId)
3516 + PageDescriptionText.Focus()
3314 3517 End Sub
3315 3518
3316 - #End Region
3317 3519
3318 - #Region "MORE OPTIONS PANEL"
3520 +
3521 + 'naviga indietro tra le pagine
3522 + Private Sub PrevPageButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrevPageButton.Click
3523 + If ViewPageCB.SelectedIndex = -1 And ViewPageCB.Items.Count >= 1 Then
3524 + ViewPageCB.SelectedIndex = 1
3525 + ElseIf ViewPageCB.SelectedIndex > 0 Then
3526 + ViewPageCB.SelectedIndex = ViewPageCB.SelectedIndex - 1
3527 + End If
3528 +
3529 +
3530 +
3531 + End Sub
3532 + 'naviga avanti tra le pagine
3533 + Private Sub NextPageButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NextPageButton.Click
3534 + If ViewPageCB.SelectedIndex = -1 And ViewPageCB.Items.Count >= 1 Then
3535 + ViewPageCB.SelectedIndex = 1
3536 + ElseIf ViewPageCB.SelectedIndex < (ViewPageCB.Items.Count - 1) Then
3537 + ViewPageCB.SelectedIndex = ViewPageCB.SelectedIndex + 1
3538 + End If
3539 +
3540 +
3541 + End Sub
3542 +
3543 + '**************************************************************************MORE OPTIONS PANEL*****************************************************************
3544 +
3545 +
3546 +
3319 3547
3320 3548 Private Sub PageMoreOptionCloseButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PageMoreOptionCloseButton.Click
3321 3549 PageMoreOptionPanel.Hide()
3322 3550 End Sub
3323 3551
3552 +
3324 3553 Private Sub PageMoreOptionDoneButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PageMoreOptionDoneButton.Click
3325 3554 PageMoreOptionPanel.Hide()
3326 3555 End Sub
  @@ -3329,7 +3558,8 @@
3329 3558 PageMoreOptionPanel.Show()
3330 3559 End Sub
3331 3560
3332 - #End Region
3561 +
3562 +
3333 3563
3334 3564 End Class
3335 3565