diff options
-rw-r--r-- | VP-isowork.lua | 112 | ||||
-rw-r--r-- | VP-jp-in-us.lua | 2333 | ||||
-rw-r--r-- | VP-process.lua | 66 | ||||
-rw-r--r-- | script-editor/AboutBox.Designer.cs | 139 | ||||
-rw-r--r-- | script-editor/AboutBox.cs | 75 | ||||
-rw-r--r-- | script-editor/AboutBox.resx | 181 | ||||
-rw-r--r-- | script-editor/CommentForm.Designer.cs | 83 | ||||
-rw-r--r-- | script-editor/CommentForm.cs | 28 | ||||
-rw-r--r-- | script-editor/CommentForm.resx | 120 | ||||
-rw-r--r-- | script-editor/CustomControl.cs | 35 | ||||
-rw-r--r-- | script-editor/FontFile.cs | 6 | ||||
-rw-r--r-- | script-editor/MainForm.Designer.cs | 805 | ||||
-rw-r--r-- | script-editor/MainForm.cs | 534 | ||||
-rw-r--r-- | script-editor/MainForm.resx | 3 | ||||
-rw-r--r-- | script-editor/MyPanel.cs | 11 | ||||
-rw-r--r-- | script-editor/Pointer.cs | 34 | ||||
-rw-r--r-- | script-editor/Properties/AssemblyInfo.cs | 4 | ||||
-rw-r--r-- | script-editor/VPScriptEditor_CS.csproj | 30 |
18 files changed, 4125 insertions, 474 deletions
diff --git a/VP-isowork.lua b/VP-isowork.lua index 4b9efb2..ace75af 100644 --- a/VP-isowork.lua +++ b/VP-isowork.lua @@ -11,33 +11,54 @@ function apply_hacks(hacks, file) end function prepare_out(file_out) + local iso_file if got_psp then local x = Output "VP-FR.iso" x:destroy() - globals[3] = dvdabstract(file_out or "VP-FR.iso", true) + iso_file = dvdabstract(file_out or "VP-FR.iso", true) else - globals[3] = Output(file_out or "VP-FR.bin") + iso_file = Output(file_out or "VP-FR.bin") end - local iso = isobuilder(globals[3]) + local iso = isobuilder(iso_file) + iso.iso_file = iso_file return iso end -function startup(file_in, file_in2, iso_out) +function startup(file_in, file_in2, iso_out, file_in3, file_in4) + local cdutil, cdutil2, cdutil3, cdutil4 if not loadmodule then error("This can only be used with lua-interface...") end loadmodule "lualibs" loadmodule "luahandle" loadmodule "luacd" - loadmodule "luaslz" + pcall(loadmodule, "luaslz") loadmodule "luahttp" loadmodule "luaxml" --- globals[1] = cdabstract(file_in or "VP-SQUISH.bin") - globals[1] = dvdabstract(file_in or "VP-PSP-EUR.iso") - local cdutil = cdutils(globals[1]) + local r, v + r, v = pcall(cdabstract, file_in or "VP-SQUISH.bin") + if not r then + v = dvdabstract(file_in or "VP-PSP-EUR.iso") + end + cdutil = cdutils(v) + cdutil.iso_in = v if file_in2 then - globals[2] = cdabstract(file_in2) - local cdutil2 = cdutils(globals[2]) + v = cdabstract(file_in2) + cdutil2 = cdutils(v) + cdutil2.iso_in = v + end + if file_in3 then + r, v = pcall(cdabstract, file_in3) + if not r then + v = dvdabstract(file_in3) + end + cdutil3 = cdutils(v) + cdutil3.iso_in = v + end + if file_in4 then + v = cdabstract(file_in4) + cdutil4 = cdutils(v) + cdutil4.iso_in = v end - return cdutil, cdutil2, iso_out + return cdutil, cdutil2, iso_out, cdutil3, cdutil4 end anti_cd_swap_hack = { @@ -47,56 +68,85 @@ anti_cd_swap_hack = { [0x2820] = { 0x00, 0x00, 0x00, 0x00 }, } -function iso_identify(cdutil) +function iso_identify(cdutil, additionnal) local slusdirentuscd1 = cdutil:findpath "/SLUS_011.56;1" local slusdirentuscd2 = cdutil:findpath "/SLUS_011.79;1" - local slusdirentjpcd1 = cdutil:findpath "/SLPM_863_79;1" - local slusdirentjpcd2 = cdutil:findpath "/SLPM_863_80;1" + local slusdirentjpcd1 = cdutil:findpath "/SLPM_863.79;1" + local slusdirentjpcd2 = cdutil:findpath "/SLPM_863.80;1" local slusdirentsquished = cdutil:findpath "/VALKYRIE.EXE;1" local pspdata = cdutil:findpath "/UMD_DATA.BIN" if pspdata then local pspdataf = cdutil:cdfile(pspdata) local umddata = pspdataf:read() if umddata == "ULUS-10107|400F6E7A41D6C586|0001|G" then - got_us = true + if not additionnal then got_us = true else got_add_us = true end elseif umddata == "ULES-00724|2A9CD5DEEA986357|0001|G" then - got_eu = true + if not additionnal then got_eu = true else got_add_eu = true end elseif umddata == "ULJM-05101|7862BF3F2632E5B5|0001|G" then - got_jp = true + if not additionnal then got_jp = true else got_add_jp = true end else error "Wrong PSP iso." end - got_psp = true + if not additionnal then + got_psp = true + got_cd1 = true + got_cd2 = true + else + got_add_psp = true + got_add_cd1 = true + got_add_cd2 = true + end end - if slusdirentuscd1 and got_cd1 then error "Got twice CD1." end - if slusdirentuscd2 and got_cd2 then error "Got twice CD2." end + if (slusdirentuscd1 or slusdirentjpcd1) and got_cd1 and not additionnal then error "Got twice CD1." end + if (slusdirentuscd2 or slusdirentjpcd2) and got_cd2 and not additionnal then error "Got twice CD2." end + if (slusdirentuscd1 or slusdirentjpcd1) and got_add_cd1 and additionnal then error "Got twice CD1." end + if (slusdirentuscd2 or slusdirentjpcd2) and got_add_cd2 and additionnal then error "Got twice CD2." end + + if (slusdirentuscd1 or slusdirentuscd2) and not additionnal then got_us = true end + if (slusdirentjpcd1 or slusdirentjpcd2) and not additionnal then got_jp = true end + if (slusdirentuscd1 or slusdirentjpcd1) and not additionnal then got_cd1 = true end + if (slusdirentuscd2 or slusdirentjpcd2) and not additionnal then got_cd2 = true end - if slusdirentuscd1 or slusdirentuscd2 then got_us = true end - if slusdirentjpcd1 or slusdirentjpcd2 then got_jp = true end - if slusdirentuscd1 or slusdirentjpcd1 then got_cd1 = true end - if slusdirentuscd2 or slusdirentjpcd2 then got_cd2 = true end + if (slusdirentuscd1 or slusdirentuscd2) and additionnal then got_add_us = true end + if (slusdirentjpcd1 or slusdirentjpcd2) and additionnal then got_add_jp = true end + if (slusdirentuscd1 or slusdirentjpcd1) and additionnal then got_add_cd1 = true end + if (slusdirentuscd2 or slusdirentjpcd2) and additionnal then got_add_cd2 = true end - if slusdirentsquished then + if slusdirentsquished and not additionnal then got_cd1 = true got_cd2 = true -- let's fallback... got_us = true end - if not slusent then - slusent = slusdirentuscd1 or slusdirentuscd2 or slusdirentjpcd1 or slusdirentjpcd2 or slusdirentsquished + if slusdirentsquished and additionnal then + got_add_cd1 = true + got_add_cd2 = true + -- let's fallback... + got_add_jp = true + end + + if not slusdirent then + slusdirent = slusdirentuscd1 or slusdirentuscd2 or slusdirentjpcd1 or slusdirentjpcd2 or slusdirentsquished end if got_us and got_jp then error "2 isos must from the same version of the game." end + if got_add_us and got_add_jp then error "2 isos must from the same version of the game." end + + if got_us and got_add_jp and got_cd1 and got_cd2 and got_add_cd1 and got_add_cd2 then + jp_in_us = true + end + + -- should check for PSP / PSX mixup... end function build_basic(iso, cdutil, iso_full) local cp = function(path, name, dirtree) copyfile(path, name, dirtree, iso, cdutil) end iso:foreword(cdutil) local pvd = createpvd(cdutil) - pvd.volid = "VP-FR" + pvd.volid = jp_in_us and "VP-JP-US" or "VP-FR" local root = iso:setbasics(pvd) dirent = cdutil:findpath "/" root:setbasicsxa() @@ -136,7 +186,8 @@ function build_basic(iso, cdutil, iso_full) psp_dirtrees.PSPVAL1:setbasicsxa() dummy:destroy() else - local systemcnfstring = "BOOT=cdrom:\\VP-FR.EXE;1\r\nTCB=4\r\nEVENT=16\r\nSTACK=801fff00\r\n" + local systemcnfstring + systemcnfstring = jp_in_us and "BOOT=cdrom:\\VP-JP-US.EXE;1\r\nTCB=4\r\nEVENT=16\r\nSTACK=801fff00\r\n" or "BOOT=cdrom:\\VP-FR.EXE;1\r\nTCB=4\r\nEVENT=16\r\nSTACK=801fff00\r\n" local systemcnf = Buffer() local slus = Buffer(true) slus:copyfrom(cdutil:cdfile(slusdirent)) @@ -149,7 +200,7 @@ function build_basic(iso, cdutil, iso_full) end apply_hacks(slz3_patch, slus) slus:seek(0) - iso:createfile(root, "VP-FR.EXE", slus, slusdirent):setbasicsxa() + iso:createfile(root, jp_in_us and "VP-JP-US.EXE" or "VP-FR.EXE", slus, slusdirent):setbasicsxa() slus:seek(0) local readme = Buffer() readme:write("Readme...") @@ -161,3 +212,4 @@ function build_basic(iso, cdutil, iso_full) end end end + diff --git a/VP-jp-in-us.lua b/VP-jp-in-us.lua new file mode 100644 index 0000000..6b6c790 --- /dev/null +++ b/VP-jp-in-us.lua @@ -0,0 +1,2333 @@ +VP_jp_in_us = { + [9] = 9, + [10] = 10, + [11] = 11, + [12] = 12, + [13] = 13, + [14] = 14, + [15] = 15, + [16] = 16, + [17] = 17, + [18] = 18, + [19] = 19, + [20] = 20, + [21] = 21, + [22] = 22, + [23] = 23, + [24] = 24, + [25] = 25, + [26] = 26, + [27] = 27, + [28] = 28, + [29] = 29, + [30] = 30, + [31] = 31, + [32] = 32, + [33] = 33, + [34] = 34, + [35] = 35, + [36] = 36, + [37] = 37, + [38] = 38, + [39] = 39, + [40] = 40, + [41] = 41, + [42] = 42, + [43] = 43, + [44] = 44, + [45] = 45, + [46] = 46, + [47] = 47, + [48] = 48, + [49] = 49, + [50] = 50, + [51] = 51, + [52] = 52, + [53] = 53, + [54] = 54, + [55] = 55, + [56] = 56, + [57] = 57, + [58] = 58, + [59] = 59, + [60] = 60, + [61] = 61, + [62] = 62, + [63] = 63, + [64] = 64, + [65] = 65, + [66] = 66, + [67] = 67, + [68] = 68, + [69] = 69, + [70] = 70, + [71] = 71, + [72] = 72, + [73] = 73, + [74] = 74, + [75] = 75, + [76] = 76, + [77] = 77, + [78] = 78, + [79] = 79, + [80] = 80, + [81] = 81, + [82] = 82, + [83] = 83, + [84] = 84, + [85] = 85, + [86] = 86, + [87] = 87, + [88] = 88, + [89] = 89, + [90] = 90, + [91] = 91, + [92] = 92, + [93] = 93, + [94] = 94, + [95] = 95, + [96] = 96, + [97] = 97, + [98] = 98, + [99] = 99, + [100] = 100, + [101] = 101, + [102] = 102, + [103] = 103, + [104] = 104, + [105] = 105, + [106] = 106, + [107] = 107, + [108] = 108, + [109] = 109, + [110] = 110, + [111] = 111, + [112] = 112, + [113] = 113, + [114] = 114, + [115] = 115, + [116] = 116, + [117] = 117, + [118] = 118, + [119] = 119, + [120] = 120, + [121] = 121, + [122] = 122, + [123] = 123, + [124] = 124, + [125] = 125, + [126] = 126, + [127] = 127, + [128] = 128, + [129] = 129, + [130] = 130, + [131] = 131, + [132] = 132, + [133] = 133, + [134] = 134, + [135] = 135, + [136] = 136, + [137] = 137, + [138] = 138, + [139] = 139, + [140] = 140, + [141] = 141, + [142] = 142, + [143] = 143, + [144] = 144, + [145] = 145, + [146] = 146, + [147] = 147, + [148] = 148, + [149] = 149, + [150] = 150, + [151] = 151, + [152] = 152, + [153] = 153, + [154] = 154, + [155] = 155, + [156] = 156, + [157] = 157, + [158] = 158, + [159] = 159, + [160] = 160, + [161] = 161, + [162] = 162, + [163] = 163, + [164] = 164, + [165] = 165, + [166] = 166, + [167] = 167, + [168] = 168, + [169] = 169, + [170] = 170, + [171] = 171, + [172] = 172, + [173] = 173, + [174] = 174, + [175] = 175, + [176] = 176, + [177] = 177, + [178] = 178, + [179] = 179, + [180] = 180, + [181] = 181, + [182] = 182, + [183] = 183, + [184] = 184, + [185] = 185, + [186] = 186, + [187] = 187, + [188] = 188, + [189] = 189, + [190] = 190, + [191] = 191, + [192] = 192, + [193] = 193, + [194] = 194, + [195] = 195, + [196] = 196, + [197] = 197, + [198] = 198, + [199] = 199, + [200] = 200, + [201] = 201, + [202] = 202, + [203] = 203, + [204] = 204, + [205] = 205, + [206] = 206, + [207] = 207, + [208] = 208, + [209] = 209, + [210] = 210, + [211] = 211, + [212] = 212, + [213] = 213, + [214] = 214, + [215] = 215, + [216] = 216, + [217] = 217, + [218] = 218, + [219] = 219, + [220] = 220, + [221] = 221, + [222] = 222, + [223] = 223, + [224] = 224, + [225] = 225, + [226] = 226, + [227] = 227, + [228] = 228, + [229] = 229, + [230] = 230, + [231] = 231, + [232] = 232, + [233] = 233, + [234] = 234, + [235] = 235, + [236] = 236, + [237] = 237, + [238] = 238, + [239] = 239, + [240] = 240, + [241] = 241, + [242] = 242, + [243] = 243, + [244] = 244, + [245] = 245, + [246] = 246, + [247] = 247, + [248] = 248, + [249] = 249, + [250] = 250, + [251] = 251, + [252] = 252, + [253] = 253, + [254] = 254, + [255] = 255, + [256] = 256, + [257] = 257, + [258] = 258, + [259] = 259, + [260] = 260, + [261] = 261, + [262] = 262, + [263] = 263, + [264] = 264, + [265] = 265, + [266] = 266, + [267] = 267, + [268] = 268, + [269] = 269, + [270] = 270, + [271] = 271, + [272] = 272, + [273] = 273, + [274] = 274, + [275] = 275, + [276] = 276, + [277] = 277, + [278] = 278, + [279] = 279, + [280] = 280, + [281] = 281, + [282] = 282, + [283] = 283, + [284] = 284, + [285] = 285, + [286] = 286, + [287] = 287, + [288] = 288, + [289] = 289, + [290] = 290, + [291] = 291, + [292] = 292, + [293] = 293, + [294] = 294, + [295] = 295, + [296] = 296, + [297] = 297, + [298] = 298, + [299] = 299, + [300] = 300, + [301] = 301, + [302] = 302, + [303] = 303, + [304] = 304, + [305] = 305, + [306] = 306, + [307] = 307, + [308] = 308, + [309] = 309, + [310] = 310, + [311] = 311, + [312] = 312, + [313] = 313, + [314] = 314, + [315] = 315, + [316] = 316, + [317] = 317, + [318] = 318, + [319] = 319, + [320] = 320, + [321] = 321, + [322] = 322, + [323] = 323, + [324] = 324, + [325] = 325, + [326] = 326, + [327] = 327, + [328] = 328, + [329] = 329, + [330] = 330, + [331] = 331, + [332] = 332, + [333] = 333, + [334] = 334, + [335] = 335, + [336] = 336, + [337] = 337, + [338] = 338, + [339] = 339, + [340] = 340, + [341] = 341, + [342] = 342, + [343] = 343, + [344] = 344, + [345] = 345, + [346] = 346, + [347] = 347, + [348] = 364, + [349] = 365, + [350] = 382, + [351] = 383, + [352] = 396, + [353] = 397, + [354] = 398, + [355] = 399, + [356] = 400, + [357] = 401, + [358] = 420, + [359] = 421, + [360] = 426, + [361] = 427, + [362] = 428, + [363] = 429, + [364] = 430, + [365] = 431, + [366] = 432, + [367] = 433, + [368] = 434, + [369] = 435, + [370] = 436, + [371] = 437, + [372] = 438, + [373] = 439, + [374] = 440, + [375] = 441, + [376] = 442, + [377] = 443, + [378] = 444, + [379] = 445, + [380] = 446, + [381] = 447, + [382] = 448, + [383] = 449, + [384] = 450, + [385] = 451, + [386] = 452, + [387] = 453, + [388] = 454, + [389] = 455, + [390] = 456, + [391] = 457, + [392] = 458, + [393] = 459, + [394] = 460, + [395] = 461, + [396] = 462, + [397] = 463, + [398] = 464, + [399] = 465, + [400] = 466, + [401] = 467, + [402] = 468, + [403] = 469, + [404] = 470, + [405] = 471, + [406] = 472, + [407] = 473, + [408] = 474, + [409] = 475, + [410] = 476, + [411] = 477, + [412] = 478, + [413] = 479, + [414] = 480, + [415] = 481, + [416] = 482, + [417] = 483, + [418] = 484, + [419] = 485, + [420] = 486, + [421] = 487, + [422] = 488, + [423] = 489, + [424] = 490, + [425] = 491, + [426] = 492, + [427] = 493, + [428] = 494, + [429] = 495, + [430] = 496, + [431] = 497, + [432] = 498, + [433] = 499, + [434] = 500, + [435] = 501, + [436] = 502, + [437] = 503, + [438] = 504, + [439] = 505, + [440] = 506, + [441] = 507, + [442] = 508, + [443] = 509, + [444] = 510, + [445] = 511, + [446] = 512, + [447] = 513, + [448] = 514, + [449] = 515, + [450] = 516, + [451] = 517, + [452] = 518, + [453] = 519, + [454] = 520, + [455] = 521, + [456] = 522, + [457] = 523, + [458] = 524, + [459] = 525, + [460] = 526, + [461] = 527, + [462] = 528, + [463] = 529, + [464] = 530, + [465] = 531, + [466] = 532, + [467] = 533, + [468] = 534, + [469] = 535, + [470] = 536, + [471] = 537, + [472] = 538, + [473] = 539, + [474] = 540, + [475] = 541, + [476] = 542, + [477] = 543, + [478] = 544, + [479] = 545, + [480] = 546, + [481] = 547, + [482] = 548, + [483] = 549, + [484] = 550, + [485] = 551, + [486] = 552, + [487] = 553, + [488] = 554, + [489] = 555, + [490] = 556, + [491] = 557, + [492] = 558, + [493] = 559, + [494] = 560, + [495] = 561, + [496] = 562, + [497] = 563, + [498] = 564, + [499] = 565, + [500] = 566, + [501] = 567, + [502] = 568, + [503] = 569, + [504] = 570, + [505] = 571, + [506] = 572, + [507] = 573, + [508] = 574, + [509] = 575, + [510] = 576, + [511] = 577, + [512] = 578, + [513] = 579, + [514] = 580, + [515] = 581, + [516] = 582, + [517] = 583, + [518] = 584, + [519] = 585, + [520] = 586, + [521] = 587, + [522] = 588, + [523] = 589, + [524] = 590, + [525] = 591, + [526] = 592, + [527] = 593, + [528] = 594, + [529] = 595, + [530] = 596, + [531] = 597, + [532] = 598, + [533] = 599, + [534] = 600, + [535] = 601, + [536] = 602, + [537] = 603, + [538] = 604, + [539] = 605, + [540] = 606, + [541] = 607, + [542] = 608, + [543] = 609, + [544] = 610, + [545] = 611, + [546] = 612, + [547] = 613, + [548] = 614, + [549] = 615, + [550] = 616, + [551] = 617, + [552] = 618, + [553] = 619, + [554] = 620, + [555] = 621, + [556] = 622, + [557] = 623, + [558] = 624, + [559] = 625, + [560] = 626, + [561] = 627, + [562] = 628, + [563] = 629, + [564] = 630, + [565] = 631, + [566] = 632, + [567] = 633, + [568] = 634, + [569] = 635, + [570] = 636, + [571] = 637, + [572] = 638, + [573] = 639, + [574] = 640, + [575] = 641, + [576] = 642, + [577] = 643, + [578] = 644, + [579] = 645, + [580] = 646, + [581] = 647, + [582] = 648, + [583] = 649, + [584] = 650, + [585] = 651, + [586] = 652, + [587] = 653, + [588] = 654, + [589] = 655, + [590] = 656, + [591] = 657, + [592] = 658, + [593] = 659, + [594] = 660, + [595] = 661, + [596] = 662, + [597] = 663, + [598] = 664, + [599] = 665, + [600] = 666, + [601] = 667, + [602] = 668, + [603] = 669, + [604] = 670, + [605] = 671, + [606] = 672, + [607] = 673, + [608] = 674, + [609] = 675, + [610] = 676, + [611] = 677, + [612] = 678, + [613] = 679, + [614] = 680, + [615] = 681, + [616] = 682, + [617] = 683, + [619] = 685, + [620] = 686, + [621] = 687, + [622] = 688, + [623] = 689, + [624] = 690, + [625] = 691, + [626] = 692, + [627] = 693, + [628] = 694, + [629] = 695, + [630] = 696, + [631] = 697, + [632] = 698, + [633] = 699, + [634] = 700, + [635] = 701, + [636] = 702, + [637] = 703, + [638] = 704, + [639] = 705, + [640] = 706, + [641] = 707, + [642] = 708, + [643] = 709, + [644] = 710, + [645] = 711, + [646] = 712, + [647] = 713, + [648] = 714, + [649] = 715, + [650] = 716, + [651] = 717, + [652] = 718, + [653] = 719, + [654] = 720, + [655] = 721, + [656] = 722, + [657] = 723, + [658] = 724, + [659] = 725, + [660] = 726, + [661] = 727, + [662] = 728, + [663] = 729, + [664] = 730, + [665] = 731, + [666] = 732, + [667] = 733, + [668] = 734, + [669] = 735, + [670] = 736, + [671] = 737, + [672] = 738, + [673] = 739, + [674] = 740, + [675] = 741, + [676] = 742, + [677] = 743, + [678] = 744, + [679] = 745, + [680] = 746, + [681] = 747, + [682] = 748, + [683] = 749, + [684] = 750, + [685] = 751, + [686] = 752, + [687] = 753, + [688] = 754, + [689] = 755, + [690] = 756, + [691] = 757, + [692] = 758, + [693] = 759, + [694] = 760, + [695] = 761, + [696] = 762, + [697] = 763, + [698] = 764, + [699] = 765, + [700] = 766, + [701] = 767, + [702] = 768, + [703] = 769, + [704] = 770, + [705] = 771, + [706] = 772, + [707] = 773, + [708] = 774, + [709] = 775, + [710] = 776, + [711] = 777, + [712] = 778, + [713] = 779, + [714] = 780, + [715] = 781, + [716] = 782, + [717] = 783, + [718] = 784, + [719] = 785, + [720] = 786, + [721] = 787, + [722] = 788, + [723] = 789, + [724] = 790, + [725] = 791, + [726] = 792, + [727] = 793, + [728] = 794, + [729] = 795, + [730] = 796, + [731] = 797, + [732] = 798, + [733] = 799, + [734] = 800, + [735] = 801, + [736] = 802, + [737] = 803, + [738] = 804, + [739] = 805, + [740] = 806, + [741] = 807, + [742] = 808, + [743] = 809, + [744] = 810, + [745] = 811, + [746] = 812, + [747] = 813, + [748] = 814, + [749] = 815, + [750] = 816, + [751] = 817, + [752] = 818, + [753] = 819, + [754] = 820, + [755] = 821, + [756] = 822, + [757] = 823, + [758] = 824, + [759] = 825, + [760] = 826, + [761] = 827, + [762] = 828, + [763] = 829, + [764] = 830, + [765] = 831, + [766] = 832, + [767] = 833, + [768] = 834, + [769] = 835, + [770] = 836, + [771] = 837, + [772] = 838, + [773] = 839, + [774] = 840, + [775] = 841, + [776] = 842, + [777] = 843, + [778] = 844, + [779] = 845, + [780] = 846, + [781] = 847, + [782] = 848, + [783] = 849, + [784] = 850, + [785] = 851, + [786] = 852, + [787] = 853, + [788] = 854, + [789] = 855, + [790] = 856, + [791] = 857, + [792] = 858, + [793] = 859, + [794] = 860, + [795] = 861, + [796] = 862, + [797] = 863, + [798] = 864, + [799] = 865, + [800] = 866, + [801] = 867, + [802] = 868, + [803] = 869, + [804] = 870, + [805] = 871, + [806] = 872, + [807] = 873, + [808] = 874, + [809] = 875, + [810] = 876, + [811] = 877, + [812] = 878, + [813] = 879, + [814] = 880, + [815] = 881, + [816] = 882, + [817] = 883, + [818] = 884, + [819] = 885, + [820] = 886, + [821] = 887, + [822] = 888, + [823] = 889, + [824] = 890, + [825] = 891, + [826] = 892, + [827] = 893, + [828] = 894, + [829] = 895, + [830] = 896, + [831] = 897, + [832] = 898, + [833] = 899, + [834] = 900, + [835] = 901, + [836] = 902, + [837] = 903, + [838] = 904, + [839] = 905, + [840] = 906, + [841] = 907, + [842] = 908, + [843] = 909, + [844] = 910, + [845] = 911, + [846] = 912, + [847] = 913, + [848] = 914, + [849] = 915, + [850] = 916, + [851] = 917, + [852] = 918, + [853] = 919, + [854] = 920, + [855] = 921, + [856] = 922, + [857] = 923, + [858] = 924, + [859] = 925, + [860] = 926, + [861] = 927, + [862] = 928, + [863] = 929, + [864] = 930, + [865] = 931, + [866] = 932, + [867] = 933, + [868] = 934, + [869] = 935, + [870] = 936, + [871] = 937, + [872] = 938, + [873] = 939, + [874] = 940, + [875] = 941, + [876] = 942, + [877] = 943, + [878] = 944, + [879] = 945, + [880] = 946, + [881] = 947, + [882] = 948, + [883] = 949, + [884] = 950, + [885] = 951, + [886] = 952, + [887] = 953, + [888] = 954, + [889] = 955, + [890] = 956, + [891] = 957, + [892] = 958, + [893] = 959, + [894] = 960, + [895] = 961, + [896] = 962, + [897] = 963, + [898] = 964, + [899] = 965, + [900] = 966, + [901] = 967, + [902] = 968, + [903] = 969, + [904] = 970, + [905] = 971, + [906] = 972, + [907] = 973, + [908] = 974, + [909] = 975, + [910] = 984, + [911] = 985, + [912] = 997, + [913] = 998, + [914] = 999, + [915] = 1000, + [916] = 1001, + [917] = 1002, + [918] = 1003, + [919] = 1004, + [920] = 1005, + [921] = 1006, + [922] = 1007, + [923] = 1027, + [924] = 1028, + [925] = 1029, + [926] = 1030, + [927] = 1031, + [928] = 1032, + [929] = 1033, + [930] = 1034, + [931] = 1035, + [932] = 1036, + [933] = 1037, + [934] = 1038, + [935] = 1039, + [936] = 1040, + [937] = 1041, + [938] = 1042, + [939] = 1043, + [940] = 1044, + [941] = 1045, + [942] = 1046, + [943] = 1047, + [944] = 1048, + [945] = 1049, + [946] = 1050, + [947] = 1051, + [948] = 1052, + [949] = 1053, + [950] = 1054, + [951] = 1055, + [952] = 1056, + [953] = 1057, + [954] = 1058, + [955] = 1059, + [956] = 1060, + [957] = 1061, + [958] = 1062, + [959] = 1063, + [960] = 1064, + [961] = 1065, + [962] = 1066, + [963] = 1067, + [964] = 1068, + [965] = 1069, + [966] = 1070, + [967] = 1071, + [968] = 1072, + [969] = 1077, + [970] = 1083, + [971] = 1085, + [972] = 1095, + [973] = 1096, + [974] = 1097, + [975] = 1098, + [976] = 1099, + [977] = 1100, + [978] = 1101, + [979] = 1102, + [980] = 1103, + [981] = 1104, + [982] = 1105, + [983] = 1106, + [984] = 1107, + [985] = 1108, + [986] = 1109, + [987] = 1110, + [988] = 1111, + [989] = 1112, + [990] = 1113, + [991] = 1114, + [992] = 1115, + [993] = 1116, + [994] = 1117, + [995] = 1118, + [996] = 1119, + [997] = 1120, + [998] = 1121, + [999] = 1122, + [1000] = 1123, + [1001] = 1124, + [1002] = 1125, + [1003] = 1126, + [1004] = 1127, + [1005] = 1128, + [1006] = 1129, + [1007] = 1130, + [1008] = 1131, + [1009] = 1132, + [1010] = 1133, + [1011] = 1134, + [1012] = 1135, + [1013] = 1136, + [1014] = 1137, + [1015] = 1138, + [1016] = 1139, + [1017] = 1140, + [1018] = 1141, + [1019] = 1142, + [1020] = 1143, + [1526] = 1649, + [1527] = 1650, + [1528] = 1651, + [1529] = 1652, + [1530] = 1653, + [1531] = 1654, + [1532] = 1655, + [1533] = 1656, + [1534] = 1657, + [1535] = 1658, + [1536] = 1659, + [1537] = 1660, + [1538] = 1661, + [1539] = 1662, + [1540] = 1663, + [1541] = 1664, + [1542] = 1665, + [1543] = 1666, + [1544] = 1667, + [1545] = 1668, + [1546] = 1669, + [1547] = 1670, + [1548] = 1671, + [1549] = 1672, + [1550] = 1673, + [1551] = 1674, + [1552] = 1675, + [1553] = 1676, + [1554] = 1677, + [1555] = 1678, + [1556] = 1679, + [1557] = 1680, + [1558] = 1681, + [1559] = 1682, + [1560] = 1683, + [1561] = 1684, + [1562] = 1685, + [1563] = 1686, + [1564] = 1687, + [1565] = 1688, + [1566] = 1689, + [1567] = 1690, + [1568] = 1691, + [1569] = 1692, + [1570] = 1693, + [1571] = 1694, + [1572] = 1695, + [1573] = 1696, + [1574] = 1697, + [1575] = 1698, + [1576] = 1699, + [1577] = 1700, + [1578] = 1701, + [1579] = 1702, + [1580] = 1703, + [1581] = 1704, + [1582] = 1705, + [1583] = 1706, + [1584] = 1707, + [1585] = 1708, + [1586] = 1709, + [1587] = 1710, + [1588] = 1711, + [1589] = 1712, + [1590] = 1713, + [1591] = 1714, + [1592] = 1715, + [1593] = 1716, + [1594] = 1717, + [1595] = 1718, + [1596] = 1719, + [1597] = 1720, + [1598] = 1721, + [1599] = 1722, + [1600] = 1723, + [1601] = 1724, + [1602] = 1725, + [1603] = 1726, + [1604] = 1727, + [1605] = 1728, + [1606] = 1729, + [1607] = 1730, + [1608] = 1731, + [1609] = 1732, + [1610] = 1733, + [1611] = 1734, + [1612] = 1735, + [1613] = 1736, + [1614] = 1737, + [1615] = 1738, + [1616] = 1739, + [1617] = 1740, + [1618] = 1741, + [1619] = 1742, + [1620] = 1743, + [1621] = 1744, + [1622] = 1745, + [1623] = 1746, + [1624] = 1747, + [1625] = 1748, + [1626] = 1749, + [1627] = 1750, + [1628] = 1751, + [1629] = 1752, + [1630] = 1753, + [1631] = 1754, + [1632] = 1755, + [1633] = 1756, + [1634] = 1757, + [1635] = 1758, + [1636] = 1759, + [1637] = 1760, + [1662] = 1785, + [1663] = 1786, + [1664] = 1787, + [1665] = 1788, + [1666] = 1789, + [1667] = 1790, + [1668] = 1791, + [1669] = 1792, + [1670] = 1793, + [1671] = 1794, + [1672] = 1795, + [1673] = 1796, + [1674] = 1797, + [1675] = 1798, + [1676] = 1799, + [1677] = 1800, + [1678] = 1801, + [1679] = 1802, + [1680] = 1803, + [1681] = 1804, + [1682] = 1805, + [1683] = 1806, + [1684] = 1807, + [1685] = 1808, + [1686] = 1809, + [1687] = 1810, + [1705] = 1828, + [1706] = 1829, + [1707] = 1830, + [1708] = 1831, + [1709] = 1832, + [1710] = 1833, + [1711] = 1834, + [1712] = 1835, + [1713] = 1836, + [1714] = 1837, + [1715] = 1838, + [1716] = 1839, + [1717] = 1840, + [1718] = 1841, + [1719] = 1842, + [1720] = 1843, + [1721] = 1844, + [1722] = 1845, + [1723] = 1846, + [1724] = 1847, + [1725] = 1848, + [1726] = 1849, + [1727] = 1850, + [1728] = 1851, + [1729] = 1852, + [1730] = 1853, + [1731] = 1854, + [1732] = 1855, + [1733] = 1856, + [1734] = 1857, + [1735] = 1858, + [1736] = 1859, + [1737] = 1860, + [1738] = 1861, + [1739] = 1862, + [1740] = 1863, + [1741] = 1864, + [1742] = 1865, + [1743] = 1866, + [1744] = 1867, + [1745] = 1868, + [1746] = 1869, + [1747] = 1870, + [1748] = 1871, + [1749] = 1872, + [1750] = 1873, + [1751] = 1874, + [1752] = 1875, + [1753] = 1876, + [1754] = 1877, + [1755] = 1878, + [1756] = 1879, + [1757] = 1880, + [1758] = 1881, + [1759] = 1882, + [1760] = 1883, + [1761] = 1884, + [1762] = 1885, + [1763] = 1886, + [1764] = 1887, + [1765] = 1888, + [1766] = 1889, + [1767] = 1890, + [1768] = 1891, + [1769] = 1892, + [1770] = 1893, + [1771] = 1894, + [1772] = 1895, + [1773] = 1896, + [1774] = 1897, + [1775] = 1898, + [1776] = 1899, + [1777] = 1900, + [1778] = 1901, + [1779] = 1902, + [1780] = 1903, + [1781] = 1904, + [1782] = 1905, + [1783] = 1906, + [1784] = 1907, + [1785] = 1908, + [1786] = 1909, + [1787] = 1910, + [1788] = 1911, + [1789] = 1912, + [1790] = 1913, + [1791] = 1914, + [1792] = 1915, + [1793] = 1916, + [1794] = 1917, + [1795] = 1918, + [1796] = 1919, + [1797] = 1920, + [1798] = 1921, + [1799] = 1922, + [1800] = 1923, + [1801] = 1924, + [1802] = 1925, + [1803] = 1926, + [1804] = 1927, + [1805] = 1928, + [1811] = 1934, + [1812] = 1935, + [1813] = 1936, + [1814] = 1937, + [1815] = 1938, + [1816] = 1939, + [1817] = 1940, + [1818] = 1941, + [1819] = 1942, + [1820] = 1943, + [1821] = 1944, + [1822] = 1945, + [1823] = 1946, + [1824] = 1946, + [1825] = 1947, + [1826] = 1948, + [1827] = 1949, + [1828] = 1950, + [1829] = 1951, + [1830] = 1952, + [1831] = 1953, + [1832] = 1954, + [1833] = 1955, + [1834] = 1956, + [1835] = 1957, + [1836] = 1958, + [1837] = 1959, + [1838] = 1960, + [1840] = 1963, + [1841] = 1964, + [1842] = 1965, + [1843] = 1966, + [1844] = 1967, + [1845] = 1968, + [1846] = 1969, + [1847] = 1970, + [1848] = 1971, + [1849] = 1972, + [1850] = 1973, + [1851] = 1974, + [1852] = 1975, + [1855] = 1978, + [1856] = 1979, + [1857] = 1980, + [1858] = 1981, + [1859] = 1982, + [1860] = 1983, + [1861] = 1984, + [1862] = 1985, + [1863] = 1986, + [1864] = 1987, + [1865] = 1988, + [1866] = 1989, + [1869] = 1992, + [1870] = 1993, + [1871] = 1994, + [1872] = 1995, + [1873] = 1996, + [1874] = 1997, + [1875] = 1998, + [1876] = 1999, + [1877] = 2000, + [1878] = 2001, + [1879] = 2002, + [1880] = 2003, + [1883] = 2006, + [1884] = 2007, + [1885] = 2008, + [1886] = 2009, + [1887] = 2010, + [1888] = 2011, + [1889] = 2012, + [1890] = 2013, + [1891] = 2014, + [1892] = 2015, + [1893] = 2016, + [1894] = 2017, + [1897] = 2020, + [1898] = 2021, + [1899] = 2022, + [1900] = 2023, + [1901] = 2024, + [1902] = 2025, + [1903] = 2026, + [1904] = 2027, + [1905] = 2028, + [1906] = 2029, + [1907] = 2030, + [1908] = 2031, + [1911] = 2034, + [1912] = 2035, + [1913] = 2036, + [1914] = 2037, + [1915] = 2038, + [1916] = 2039, + [1917] = 2040, + [1918] = 2041, + [1919] = 2042, + [1920] = 2043, + [1921] = 2044, + [1922] = 2045, + [1923] = 2046, + [1926] = 2049, + [1927] = 2050, + [1928] = 2051, + [1929] = 2052, + [1930] = 2053, + [1931] = 2054, + [1932] = 2055, + [1933] = 2056, + [1934] = 2057, + [1935] = 2058, + [1936] = 2059, + [1937] = 2060, + [1938] = 2061, + [1941] = 2064, + [1942] = 2065, + [1943] = 2066, + [1944] = 2067, + [1945] = 2068, + [1946] = 2069, + [1947] = 2070, + [1948] = 2071, + [1949] = 2072, + [1950] = 2073, + [1951] = 2074, + [1952] = 2075, + [1953] = 2076, + [1956] = 2079, + [1957] = 2080, + [1958] = 2081, + [1959] = 2082, + [1960] = 2083, + [1961] = 2084, + [1962] = 2085, + [1963] = 2086, + [1964] = 2087, + [1965] = 2088, + [1966] = 2089, + [1967] = 2090, + [1970] = 2093, + [1971] = 2094, + [1972] = 2095, + [1973] = 2096, + [1974] = 2097, + [1975] = 2098, + [1976] = 2099, + [1977] = 2100, + [1978] = 2101, + [1979] = 2102, + [1980] = 2103, + [1981] = 2104, + [1982] = 2105, + [1985] = 2108, + [2018] = 2141, + [2019] = 2142, + [2020] = 2143, + [2021] = 2144, + [2022] = 2145, + [2023] = 2146, + [2024] = 2147, + [2025] = 2148, + [2026] = 2149, + [2027] = 2150, + [2028] = 2151, + [2029] = 2152, + [2030] = 2153, + [2031] = 2154, + [2032] = 2155, + [2033] = 2156, + [2034] = 2157, + [2035] = 2158, + [2036] = 2159, + [2037] = 2160, + [2038] = 2161, + [2039] = 2162, + [2040] = 2163, + [2041] = 2164, + [2042] = 2165, + [2043] = 2166, + [2044] = 2167, + [2045] = 2168, + [2046] = 2169, + [2047] = 2170, + [2048] = 2171, + [2049] = 2172, + [2050] = 2173, + [2051] = 2174, + [2052] = 2175, + [2053] = 2176, + [2054] = 2177, + [2055] = 2178, + [2056] = 2179, + [2057] = 2180, + [2058] = 2181, + [2059] = 2182, + [2060] = 2183, + [2061] = 2184, + [2062] = 2185, + [2063] = 2186, + [2064] = 2187, + [2065] = 2188, + [2066] = 2189, + [2067] = 2190, + [2068] = 2191, + [2069] = 2192, + [2070] = 2193, + [2071] = 2194, + [2072] = 2195, + [2073] = 2196, + [2074] = 2197, + [2075] = 2198, + [2076] = 2199, + [2077] = 2200, + [2078] = 2201, + [2079] = 2202, + [2080] = 2203, + [2081] = 2204, + [2082] = 2205, + [2083] = 2206, + [2084] = 2207, + [2085] = 2208, + [2086] = 2209, + [2087] = 2210, + [2088] = 2211, + [2089] = 2212, + [2090] = 2213, + [2091] = 2214, + [2092] = 2215, + [2093] = 2216, + [2094] = 2217, + [2095] = 2218, + [2096] = 2219, + [2097] = 2220, + [2098] = 2221, + [2099] = 2222, + [2100] = 2223, + [2101] = 2224, + [2102] = 2225, + [2103] = 2226, + [2104] = 2227, + [2105] = 2228, + [2106] = 2229, + [2107] = 2230, + [2108] = 2231, + [2109] = 2232, + [2110] = 2233, + [2111] = 2234, + [2112] = 2235, + [2113] = 2236, + [2114] = 2237, + [2115] = 2238, + [2116] = 2239, + [2117] = 2240, + [2118] = 2241, + [2119] = 2242, + [2120] = 2243, + [2121] = 2244, + [2122] = 2245, + [2123] = 2246, + [2124] = 2247, + [2125] = 2248, + [2126] = 2249, + [2127] = 2250, + [2128] = 2251, + [2129] = 2252, + [2130] = 2253, + [2131] = 2254, + [2132] = 2255, + [2133] = 2256, + [2134] = 2257, + [2135] = 2258, + [2136] = 2259, + [2137] = 2260, + [2138] = 2261, + [2139] = 2262, + [2140] = 2263, + [2141] = 2264, + [2142] = 2265, + [2143] = 2266, + [2144] = 2267, + [2145] = 2268, + [2146] = 2269, + [2147] = 2270, + [2148] = 2271, + [2149] = 2272, + [2150] = 2273, + [2151] = 2274, + [2152] = 2275, + [2153] = 2276, + [2154] = 2277, + [2155] = 2278, + [2156] = 2279, + [2157] = 2280, + [2158] = 2281, + [2159] = 2282, + [2160] = 2283, + [2161] = 2284, + [2162] = 2285, + [2163] = 2286, + [2164] = 2287, + [2165] = 2288, + [2166] = 2289, + [2167] = 2290, + [2168] = 2291, + [2169] = 2292, + [2170] = 2293, + [2171] = 2294, + [2172] = 2295, + [618] = 684, + [1021] = 2223, + [4] = 4, + [6] = 6, + [2212] = 2335, + [2213] = 2336, + [2214] = 2337, + [2215] = 2338, + [2216] = 2339, + [2217] = 2340, + [2218] = 2341, + [2219] = 2342, + [2220] = 2343, + [2221] = 2344, + [2222] = 2345, + [2223] = 2346, + [2224] = 2347, + [2225] = 2348, + [2226] = 2349, + [2227] = 2350, + [2228] = 2351, + [2229] = 2352, + [2230] = 2353, + [2231] = 2354, + [2232] = 2355, + [2233] = 2356, + [2234] = 2357, + [2235] = 2358, + [2236] = 2359, + [2237] = 2360, + [2238] = 2361, + [2239] = 2362, + [2240] = 2363, + [2241] = 2364, + [2242] = 2365, + [2243] = 2366, + [2244] = 2367, + [2245] = 2368, + [2246] = 2369, + [2247] = 2370, + [2248] = 2371, + [2249] = 2372, + [2250] = 2373, + [2251] = 2374, + [2252] = 2375, + [2253] = 2376, + [2254] = 2377, + [2255] = 2378, + [2256] = 2379, + [2257] = 2380, + [2258] = 2381, + [2259] = 2382, + [2260] = 2383, + [2261] = 2384, + [2262] = 2385, + [2263] = 2386, + [2264] = 2387, + [2265] = 2388, + [2266] = 2389, + [2267] = 2390, + [2268] = 2391, + [2269] = 2392, + [2270] = 2393, + [2271] = 2394, + [2272] = 2395, + [2273] = 2396, + [2274] = 2397, + [2275] = 2398, + [2276] = 2399, + [2277] = 2400, + [2278] = 2401, + [2279] = 2402, + [2280] = 2403, + [2281] = 2404, + [2282] = 2405, + [2283] = 2406, + [2284] = 2407, + [2285] = 2408, + [2286] = 2409, + [2287] = 2410, + [2288] = 2411, + [2289] = 2412, + [2290] = 2413, + [2291] = 2414, + [2320] = 2443, + [2321] = 2444, + [2322] = 2445, + [2323] = 2446, + [2324] = 2447, + [2325] = 2448, + [2326] = 2449, + [2327] = 2450, + [2328] = 2451, + [2329] = 2452, + [2330] = 2453, + [2331] = 2454, + [2332] = 2455, + [2333] = 2456, + [2334] = 2457, + [2335] = 2458, + [2336] = 2459, + [2337] = 2460, + [2338] = 2461, + [2339] = 2462, + [2340] = 2463, + [2341] = 2464, + [2342] = 2465, + [2343] = 2466, + [2344] = 2467, + [2345] = 2468, + [2346] = 2469, + [2347] = 2470, + [2348] = 2471, + [2349] = 2472, + [2350] = 2473, + [2351] = 2474, + [2352] = 2475, + [2353] = 2476, + [2354] = 2477, + [2355] = 2478, + [2356] = 2479, + [2357] = 2480, + [2358] = 2481, + [2359] = 2482, + [2360] = 2483, + [2361] = 2484, + [2362] = 2485, + [2363] = 2486, + [2364] = 2487, + [2365] = 2488, + [2366] = 2489, + [2367] = 2490, + [2368] = 2491, + [2369] = 2492, + [2370] = 2493, + [2371] = 2494, + [2372] = 2495, + [2373] = 2496, + [2374] = 2497, + [2375] = 2498, + [2376] = 2499, + [2377] = 2500, + [2378] = 2501, + [2379] = 2502, + [2380] = 2503, + [2381] = 2504, + [2382] = 2505, + [2383] = 2506, + [2384] = 2507, + [2385] = 2508, + [2386] = 2509, + [2387] = 2510, + [2388] = 2511, + [2389] = 2512, + [2390] = 2513, + [2391] = 2514, + [2392] = 2515, + [2393] = 2516, + [2394] = 2517, + [2395] = 2518, + [2396] = 2519, + [2397] = 2520, + [2398] = 2521, + [2399] = 2522, + [2400] = 2523, + [2401] = 2524, + [2402] = 2525, + [2403] = 2526, + [2404] = 2527, + [2405] = 2528, + [2406] = 2529, + [2407] = 2530, + [2408] = 2531, + [2409] = 2532, + [2410] = 2533, + [2411] = 2534, + [2412] = 2535, + [2413] = 2536, + [2414] = 2537, + [2415] = 2538, + [2416] = 2539, + [2417] = 2540, + [2418] = 2541, + [2419] = 2542, + [2420] = 2543, + [2421] = 2544, + [2422] = 2545, + [2423] = 2546, + [2424] = 2547, + [2425] = 2548, + [2426] = 2549, + [2427] = 2550, + [2428] = 2551, + [2429] = 2552, + [2430] = 2553, + [2431] = 2554, + [2432] = 2555, + [2433] = 2556, + [2434] = 2557, + [2435] = 2558, + [2436] = 2559, + [2437] = 2560, + [2438] = 2561, + [2439] = 2562, + [2440] = 2563, + [2441] = 2564, + [2442] = 2565, + [2443] = 2566, + [2444] = 2567, + [2445] = 2568, + [2446] = 2569, + [2447] = 2570, + [2448] = 2571, + [2449] = 2572, + [2450] = 2573, + [2451] = 2574, + [2452] = 2575, + [2453] = 2576, + [2454] = 2577, + [2455] = 2578, + [2456] = 2579, + [2457] = 2580, + [2458] = 2581, + [2459] = 2582, + [2460] = 2583, + [2461] = 2584, + [2462] = 2585, + [2463] = 2586, + [2464] = 2587, + [2465] = 2588, + [2466] = 2589, + [2467] = 2590, + [2468] = 2591, + [2469] = 2592, + [2470] = 2593, + [2471] = 2594, + [2472] = 2595, + [2473] = 2596, + [2474] = 2597, + [2475] = 2598, + [2476] = 2599, + [2477] = 2600, + [2478] = 2601, + [2479] = 2602, + [2480] = 2603, + [2481] = 2604, + [2482] = 2605, + [2483] = 2606, + [2484] = 2607, + [2485] = 2608, + [2486] = 2609, + [2487] = 2610, + [2488] = 2611, + [2489] = 2612, + [2490] = 2613, + [2491] = 2614, + [2492] = 2615, + [2493] = 2616, + [2494] = 2617, + [2495] = 2618, + [2496] = 2619, + [2497] = 2620, + [2498] = 2621, + [2499] = 2622, + [2500] = 2623, + [2501] = 2624, + [2502] = 2625, + [2503] = 2626, + [2504] = 2627, + [2505] = 2628, + [2506] = 2629, + [2507] = 2630, + [2508] = 2631, + [2509] = 2632, + [2510] = 2633, + [2511] = 2634, + [2512] = 2635, + [2513] = 2636, + [2514] = 2637, + [2515] = 2638, + [2516] = 2639, + [2517] = 2640, + [2518] = 2641, + [2519] = 2642, + [2520] = 2643, + [2521] = 2644, + [2522] = 2645, + [2523] = 2646, + [2524] = 2647, + [2525] = 2648, + [2526] = 2649, + [2527] = 2650, + [2528] = 2651, + [2529] = 2652, + [2530] = 2653, + [2531] = 2654, + [2532] = 2655, + [2533] = 2656, + [2534] = 2657, + [2535] = 2658, + [2536] = 2659, + [2537] = 2660, + [2538] = 2661, + [2539] = 2662, + [2540] = 2663, + [2541] = 2664, + [2542] = 2665, + [2543] = 2666, + [2544] = 2667, + [2545] = 2668, + [2546] = 2669, + [2547] = 2670, + [2548] = 2671, + [2549] = 2672, + [2550] = 2673, + [2551] = 2674, + [2552] = 2675, + [2553] = 2676, + [2554] = 2677, + [2555] = 2678, + [2556] = 2679, + [2557] = 2680, + [2558] = 2681, + [2559] = 2682, + [2560] = 2683, + [2561] = 2684, + [2562] = 2685, + [2563] = 2686, + [2564] = 2687, + [2565] = 2688, + [2566] = 2689, + [2567] = 2690, + [2568] = 2691, + [2569] = 2692, + [2570] = 2693, + [2571] = 2694, + [2572] = 2695, + [2573] = 2696, + [2574] = 2697, + [2575] = 2698, + [2576] = 2699, + [2577] = 2700, + [2578] = 2701, + [2579] = 2702, + [2580] = 2703, + [2581] = 2704, + [2582] = 2705, + [2583] = 2706, + [2584] = 2707, + [2585] = 2708, + [2586] = 2709, + [2587] = 2710, + [2588] = 2711, + [2589] = 2712, + [2590] = 2713, + [2591] = 2714, + [2592] = 2715, + [2593] = 2716, + [2594] = 2717, + [2595] = 2718, + [2596] = 2719, + [2597] = 2720, + [2598] = 2721, + [2599] = 2722, + [2600] = 2723, + [2601] = 2724, + [2602] = 2725, + [2603] = 2726, + [2604] = 2727, + [2605] = 2728, + [2606] = 2729, + [2607] = 2730, + [2608] = 2731, + [2609] = 2732, + [2610] = 2733, + [2611] = 2734, + [2612] = 2735, + [2613] = 2736, + [2614] = 2737, + [2615] = 2738, + [2616] = 2739, + [2617] = 2740, + [2618] = 2741, + [2619] = 2742, + [2620] = 2743, + [2621] = 2744, + [2622] = 2745, + [2623] = 2746, + [2624] = 2747, + [2625] = 2748, + [2626] = 2749, + [2627] = 2750, + [2628] = 2751, + [2629] = 2752, + [2630] = 2753, + [2631] = 2754, + [2632] = 2755, + [2633] = 2756, + [2634] = 2757, + [2635] = 2758, + [2636] = 2759, + [2637] = 2760, + [2638] = 2761, + [2639] = 2762, + [2640] = 2763, + [2641] = 2764, + [2642] = 2765, + [2643] = 2766, + [2644] = 2767, + [2645] = 2768, + [2646] = 2769, + [2647] = 2770, + [2648] = 2771, + [2649] = 2772, + [2650] = 2773, + [2651] = 2774, + [2652] = 2775, + [2653] = 2776, + [2654] = 2777, + [2655] = 2778, + [2656] = 2779, + [2657] = 2780, + [2658] = 2781, + [2659] = 2782, + [2660] = 2783, + [2661] = 2784, + [2662] = 2785, + [2663] = 2786, + [2664] = 2787, + [2665] = 2788, + [2666] = 2789, + [2667] = 2790, + [2668] = 2791, + [2669] = 2792, + [2670] = 2793, + [2671] = 2794, + [2672] = 2795, + [2673] = 2796, + [2674] = 2797, + [2675] = 2798, + [2676] = 2799, + [2677] = 2800, + [2678] = 2801, + [2679] = 2802, + [2680] = 2803, + [2681] = 2804, + [2682] = 2805, + [2683] = 2806, + [2684] = 2807, + [2685] = 2808, + [2686] = 2809, + [2687] = 2810, + [2688] = 2811, + [2689] = 2812, + [2690] = 2813, + [2691] = 2814, + [2692] = 2815, + [2693] = 2816, + [2694] = 2817, + [2695] = 2818, + [2696] = 2819, + [2697] = 2820, + [2698] = 2821, + [2699] = 2822, + [2700] = 2823, + [2701] = 2824, + [2702] = 2825, + [2703] = 2826, + [2704] = 2827, + [2705] = 2828, + [2706] = 2829, + [2707] = 2830, + [2708] = 2831, + [2709] = 2832, + [2710] = 2833, + [2711] = 2834, + [2712] = 2835, + [2713] = 2836, + [2714] = 2837, + [2715] = 2838, + [2716] = 2839, + [2717] = 2840, + [2718] = 2841, + [2719] = 2842, + [2720] = 2843, + [2721] = 2844, + [2722] = 2845, + [2723] = 2846, + [2724] = 2847, + [2725] = 2848, + [2726] = 2849, + [2727] = 2850, + [2728] = 2851, + [2729] = 2852, + [2730] = 2853, + [2731] = 2854, + [2732] = 2855, + [2733] = 2856, + [2734] = 2857, + [2735] = 2858, + [2736] = 2859, + [2737] = 2860, + [2738] = 2861, + [2739] = 2862, + [2740] = 2863, + [2741] = 2864, + [2742] = 2865, + [2743] = 2866, + [2744] = 2867, + [2745] = 2868, + [2746] = 2869, + [2747] = 2870, + [2748] = 2871, + [2749] = 2872, + [2750] = 2873, + [2751] = 2874, + [2752] = 2875, + [2753] = 2876, + [2754] = 2877, + [2755] = 2878, + [2756] = 2879, + [2757] = 2880, + [2758] = 2881, + [2759] = 2882, + [2760] = 2883, + [2761] = 2884, + [2762] = 2885, + [2763] = 2886, + [2764] = 2887, + [2765] = 2888, + [2766] = 2889, + [2767] = 2890, + [2768] = 2891, + [2769] = 2892, + [2770] = 2893, + [2771] = 2894, + [2772] = 2895, + [2773] = 2896, + [2774] = 2897, + [2775] = 2898, + [2776] = 2899, + [2777] = 2900, + [2778] = 2901, + [2779] = 2902, + [2780] = 2903, + [2781] = 2904, + [2782] = 2905, + [2783] = 2906, + [2784] = 2907, + [2785] = 2908, + [2786] = 2909, + [2787] = 2910, + [2788] = 2911, + [2789] = 2912, + [2790] = 2913, + [2791] = 2914, + [2792] = 2915, + [2793] = 2916, + [2794] = 2917, + [2795] = 2918, + [2796] = 2919, + [2797] = 2920, + [2798] = 2921, + [2799] = 2922, + [2800] = 2923, + [2801] = 2924, + [2802] = 2925, + [2803] = 2926, + [2804] = 2927, + [2805] = 2928, + [2806] = 2929, + [2807] = 2930, + [2808] = 2931, + [2809] = 2932, + [2810] = 2933, + [2811] = 2934, + [2812] = 2935, + [2813] = 2936, + [2814] = 2937, + [2815] = 2938, + [2816] = 2939, + [2817] = 2940, + [2818] = 2941, + [2819] = 2942, + [2821] = 2944, + [2840] = 2963, + [2841] = 2964, + [2857] = 2980, + [2870] = 2993, + [2871] = 2994, + [2872] = 2995, + [2873] = 2996, + [2874] = 2997, + [2875] = 2998, + [2876] = 2999, + [2877] = 3000, + [2880] = 3003, + [2884] = 3007, + [2937] = 3060, + [3005] = 3128, + [3016] = 3139, + [3130] = 3253, + [3131] = 3254, + [3132] = 3255, + [3133] = 3256, + [3134] = 3257, + [3135] = 3258, + [3136] = 3259, + [3137] = 3260, + [3138] = 3261, + [3139] = 3262, + [3140] = 3263, + [3141] = 3264, + [3142] = 3265, + [3143] = 3266, + [3144] = 3267, + [3145] = 3268, + [3146] = 3269, + [3147] = 3270, + [3148] = 3271, + [3149] = 3272, + [3150] = 3273, + [3151] = 3274, + [3152] = 3275, + [3153] = 3276, + [3154] = 3277, + [3155] = 3278, + [3156] = 3279, + [3157] = 3280, + [3158] = 3281, + [3159] = 3282, + [3160] = 3283, + [3161] = 3284, + [3162] = 3285, + [3163] = 3286, + [3164] = 3287, + [3165] = 3288, + [3166] = 3289, + [3167] = 3290, + [3168] = 3291, + [3169] = 3292, + [3170] = 3293, + [3171] = 3294, + [3172] = 3295, + [3173] = 3296, + [3174] = 3297, + [3175] = 3298, + [3176] = 3299, + [3177] = 3300, + [3178] = 3301, + [3179] = 3302, + [3180] = 3303, + [3181] = 3304, + [3182] = 3305, + [3183] = 3306, + [3184] = 3307, + [3185] = 3308, + [3186] = 3309, + [3187] = 3310, + [3188] = 3311, + [3189] = 3312, + [3190] = 3313, + [3191] = 3314, + [3192] = 3315, + [3193] = 3316, + [3194] = 3317, + [3195] = 3318, + [3196] = 3319, + [3197] = 3320, + [3198] = 3321, + [3199] = 3322, + [3200] = 3323, + [3201] = 3324, + [3202] = 3325, + [3203] = 3326, + [3204] = 3327, + [3205] = 3328, + [3206] = 3329, + [3207] = 3330, + [3208] = 3331, + [3209] = 3332, + [3210] = 3333, + [3211] = 3334, + [3212] = 3335, + [3213] = 3336, + [3214] = 3337, + [3215] = 3338, + [3216] = 3339, + [3217] = 3340, + [3218] = 3341, + [3219] = 3342, + [3220] = 3343, + [3221] = 3344, + [3222] = 3345, + [3223] = 3346, + [3224] = 3347, + [3225] = 3348, + [3226] = 3349, + [3227] = 3350, + [3228] = 3351, + [3229] = 3352, + [3230] = 3353, + [3231] = 3354, + [3232] = 3355, + [3233] = 3356, + [3234] = 3357, + [3235] = 3358, + [3236] = 3359, + [3237] = 3360, + [3238] = 3361, + [3239] = 3362, + [3240] = 3363, + [3241] = 3364, + [3242] = 3365, + [3243] = 3366, + [3244] = 3367, + [3245] = 3368, + [3246] = 3369, + [3247] = 3370, + [3248] = 3371, + [3249] = 3372, + [3250] = 3373, + [3251] = 3374, + [3252] = 3375, + [3253] = 3376, + [3254] = 3377, + [3255] = 3378, + [3256] = 3379, + [3257] = 3380, + [3258] = 3381, + [3259] = 3382, + [3260] = 3383, + [3261] = 3384, + [3262] = 3385, + [3263] = 3386, + [3264] = 3387, + [3265] = 3388, + [3266] = 3389, + [3267] = 3390, + [3268] = 3391, + [3269] = 3392, + [3270] = 3393, + [3271] = 3394, + [3272] = 3395, + [3273] = 3396, + [3274] = 3397, + [3275] = 3398, + [3276] = 3399, + [3277] = 3400, + [3278] = 3401, + [3279] = 3402, + [3280] = 3403, + [3281] = 3404, + [3282] = 3405, + [3283] = 3406, + [3284] = 3407, + [3285] = 3408, + [3286] = 3409, + [3287] = 3410, + [3288] = 3411, + [3289] = 3412, + [3290] = 3413, + [3291] = 3414, + [3292] = 3415, + [3293] = 3416, + [3294] = 3417, + [3295] = 3418, + [3296] = 3419, + [3297] = 3420, + [3298] = 3421, + [4795] = 4912, +} + diff --git a/VP-process.lua b/VP-process.lua index c4f65e2..c85cfc5 100644 --- a/VP-process.lua +++ b/VP-process.lua @@ -6,29 +6,37 @@ load "VP-fontwork.lua" load "VP-roomwork.lua" load "VP-miscwork.lua" load "VP-textwork.lua" +load "VP-jp-in-us.lua" -restrict = { +--restrict = { -- [3610] = true, -- [3611] = true, -- [3612] = true, -- [3613] = true, -- [3614] = true, -- [3615] = true, - [3610 + 125] = true, -} +-- [3610 + 125] = true, +--} --dump_glyph = true ---dump_mode = true +dump_mode = true activate_debug_room = true -slusent = nil +slusdirent = nil got_cd1 = false got_cd2 = false got_us = false got_jp = false +got_eu = false got_psp = false +got_add_cd1 = false +got_add_cd2 = false +got_add_us = false +got_add_jp = false +got_add_eu = false +got_add_psp = false pspval1_sec = nil psp_dirtrees = {} @@ -41,8 +49,6 @@ current_file = nil extra_glyphs_file = nil extra_glyphs = {} -globals = {} - biggest_pad = 0 lookup_rooms = nil @@ -66,7 +72,7 @@ function dump_mkdir(dir) if dump_mode then mkdir(dir) end end function log(str) print(str) - log_file:write(str .. "\n") + if log_file then log_file:write(str .. "\n") end end function alignment(size, align) @@ -202,7 +208,7 @@ function do_dump(i) return restrict[i] end -function process_files(index, map, iso, iso_full, cindex) +function process_files(index, map, iso, iso_full, cindex, index_add, jp_in_us) print("Processing files...") local file_in, sig, is_slz, o, mode, dir, ftype for i = 1, (num_entries - 1) do @@ -225,8 +231,14 @@ function process_files(index, map, iso, iso_full, cindex) dump_mkdir("DUMP/" .. dir) current_file = i local file_out - if not dump_mode and not do_dump(i) then + if not dump_mode and not do_dump(i) and not jp_in_us then file_out = file_in + elseif jp_in_us then + local lookup = jp_in_us[i] + if lookup then + log("JP-in-US: replacing file " .. i .. " by file " .. lookup) + file_out = index_add[lookup].cd:cdfile(index_add[lookup].sector, index_add[lookup].size * sec_sizes[mode]) + end elseif not ftype then file_out = process_single_file("DUMP/" .. dir .. string.format("/%04i", i), file_in, file_in:getsize(), ext) elseif ftype == "arcgfx" then @@ -246,14 +258,17 @@ function process_files(index, map, iso, iso_full, cindex) end function main(...) - local cd, cd2, iso_out = startup(...) + local cd, cd2, iso_out, cd3, cd4 = startup(...) iso_identify(cd) if cd2 then iso_identify(cd2) end + if cd3 then iso_identify(cd3, true) end + if cd4 then iso_identify(cd4, true) end + if not jp_in_us and not slz_decomp then error "luaslz module not found." end local false_sect = Buffer(true) false_sect:writeU8(0) load_glyphes() dump_mkdir "DUMP" - log_file = Output "log.txt" + _, log_file = pcall(Output, "log.txt") local index, fkey, skey, fr, sr = load_index(cd) if cd2 then local index2 = load_index(cd2) @@ -261,13 +276,33 @@ function main(...) if not index[k] then index[k] = v end end end - for k, v in pairs(VP_maintypes) do - dump_mkdir("DUMP/" .. v) + local index_add + if cd3 then + index_add = load_index(cd3) + end + if cd4 and index_add then + local index2_add = load_index(cd4) + for k, v in pairs(index2_add) do + if not index_add[k] then index_add[k] = v end + end + end + if dump_mode then + for k, v in pairs(VP_maintypes) do + dump_mkdir("DUMP/" .. v) + end end local iso_full = true for i = 1, (num_files - 1) do if not index[i] then iso_full = false end end + local iso_add_full = false + if index_add then + iso_add_full = true + for i = 1, (num_files - 1) do + if not index_add[i] then iso_add_full = false end + end + end + if jp_in_us then dump_mode = false end local iso, cindex if not dump_mode then iso = prepare_out(iso_out) @@ -277,7 +312,7 @@ function main(...) lookup_rooms = Output "DUMP/GAME/rooms.lua" lookup_rooms:write "rooms_lookup = {\n" end - process_files(index, VP_map, iso, iso_full, cindex) + process_files(index, VP_map, iso, iso_full, cindex, index_add, jp_in_us and VP_jp_in_us or nil) if dump_mode then local o = Output "DUMP/GAME/rooms.xml" o:write('<roomscripts>\n') @@ -303,3 +338,4 @@ function main(...) log("Biggest pad = " .. biggest_pad) log_file:destroy() end + diff --git a/script-editor/AboutBox.Designer.cs b/script-editor/AboutBox.Designer.cs new file mode 100644 index 0000000..375663d --- /dev/null +++ b/script-editor/AboutBox.Designer.cs @@ -0,0 +1,139 @@ +namespace VPScriptEditor +{ + partial class AboutBox + { + private System.ComponentModel.IContainer components = null; + + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutBox)); + this.labelProductName = new System.Windows.Forms.Label(); + this.okButton = new System.Windows.Forms.Button(); + this.labelCopyright = new System.Windows.Forms.Label(); + this.labelVersion = new System.Windows.Forms.Label(); + this.logoPictureBox = new System.Windows.Forms.PictureBox(); + this.labelWebsite = new System.Windows.Forms.Label(); + this.linkLblWebsite = new System.Windows.Forms.LinkLabel(); + ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit(); + this.SuspendLayout(); + // + // labelProductName + // + this.labelProductName.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelProductName.Location = new System.Drawing.Point(78, 0); + this.labelProductName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); + this.labelProductName.Name = "labelProductName"; + this.labelProductName.Size = new System.Drawing.Size(205, 43); + this.labelProductName.TabIndex = 19; + this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // okButton + // + this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.okButton.Location = new System.Drawing.Point(110, 110); + this.okButton.Name = "okButton"; + this.okButton.Size = new System.Drawing.Size(75, 22); + this.okButton.TabIndex = 24; + this.okButton.Text = "&OK"; + this.okButton.Click += new System.EventHandler(this.okButton_Click); + // + // labelCopyright + // + this.labelCopyright.AutoSize = true; + this.labelCopyright.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelCopyright.Location = new System.Drawing.Point(78, 64); + this.labelCopyright.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); + this.labelCopyright.Name = "labelCopyright"; + this.labelCopyright.Size = new System.Drawing.Size(0, 13); + this.labelCopyright.TabIndex = 21; + this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelVersion + // + this.labelVersion.AutoSize = true; + this.labelVersion.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelVersion.Location = new System.Drawing.Point(78, 43); + this.labelVersion.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); + this.labelVersion.Name = "labelVersion"; + this.labelVersion.Size = new System.Drawing.Size(0, 13); + this.labelVersion.TabIndex = 0; + this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // logoPictureBox + // + this.logoPictureBox.Anchor = System.Windows.Forms.AnchorStyles.None; + this.logoPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("logoPictureBox.Image"))); + this.logoPictureBox.Location = new System.Drawing.Point(12, 43); + this.logoPictureBox.Name = "logoPictureBox"; + this.logoPictureBox.Size = new System.Drawing.Size(48, 48); + this.logoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.logoPictureBox.TabIndex = 12; + this.logoPictureBox.TabStop = false; + // + // labelWebsite + // + this.labelWebsite.AutoSize = true; + this.labelWebsite.Location = new System.Drawing.Point(78, 85); + this.labelWebsite.Name = "labelWebsite"; + this.labelWebsite.Size = new System.Drawing.Size(52, 13); + this.labelWebsite.TabIndex = 25; + this.labelWebsite.Text = "Web site:"; + this.labelWebsite.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // linkLblWebsite + // + this.linkLblWebsite.AutoSize = true; + this.linkLblWebsite.Location = new System.Drawing.Point(136, 86); + this.linkLblWebsite.Name = "linkLblWebsite"; + this.linkLblWebsite.Size = new System.Drawing.Size(122, 13); + this.linkLblWebsite.TabIndex = 26; + this.linkLblWebsite.TabStop = true; + this.linkLblWebsite.Text = "http://www.bessab.com"; + this.linkLblWebsite.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLblWebsite_LinkClicked); + // + // AboutBox + // + this.AcceptButton = this.okButton; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.okButton; + this.ClientSize = new System.Drawing.Size(295, 138); + this.Controls.Add(this.linkLblWebsite); + this.Controls.Add(this.labelWebsite); + this.Controls.Add(this.labelProductName); + this.Controls.Add(this.labelVersion); + this.Controls.Add(this.logoPictureBox); + this.Controls.Add(this.labelCopyright); + this.Controls.Add(this.okButton); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "AboutBox"; + this.Padding = new System.Windows.Forms.Padding(9); + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + private System.Windows.Forms.Label labelProductName; + private System.Windows.Forms.Button okButton; + private System.Windows.Forms.Label labelCopyright; + private System.Windows.Forms.Label labelVersion; + private System.Windows.Forms.PictureBox logoPictureBox; + private System.Windows.Forms.Label labelWebsite; + private System.Windows.Forms.LinkLabel linkLblWebsite; + } +} diff --git a/script-editor/AboutBox.cs b/script-editor/AboutBox.cs new file mode 100644 index 0000000..dc107d0 --- /dev/null +++ b/script-editor/AboutBox.cs @@ -0,0 +1,75 @@ +using System; +using System.Reflection; +using System.Windows.Forms; + +namespace VPScriptEditor +{ + partial class AboutBox : Form + { + public AboutBox() + { + InitializeComponent(); + Text = String.Format("About {0}", AssemblyTitle); + labelProductName.Text = AssemblyProduct; + labelVersion.Text = String.Format("Version {0}", AssemblyVersion); + labelCopyright.Text = AssemblyCopyright; + } + + public static string AssemblyTitle + { + get + { + object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false); + if (attributes.Length > 0) + { + AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0]; + if (titleAttribute.Title != "") + return titleAttribute.Title; + } + return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase); + } + } + + public static string AssemblyVersion + { + get + { + return Assembly.GetExecutingAssembly().GetName().Version.ToString(); + } + } + + public static string AssemblyProduct + { + get + { + object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false); + if (attributes.Length == 0) + return ""; + else + return ((AssemblyProductAttribute)attributes[0]).Product; + } + } + + public static string AssemblyCopyright + { + get + { + object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); + if (attributes.Length == 0) + return ""; + else + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; + } + } + + private void okButton_Click(object sender, EventArgs e) + { + Close(); + } + + private void linkLblWebsite_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + System.Diagnostics.Process.Start(linkLblWebsite.Text); + } + } +} diff --git a/script-editor/AboutBox.resx b/script-editor/AboutBox.resx new file mode 100644 index 0000000..cee9442 --- /dev/null +++ b/script-editor/AboutBox.resx @@ -0,0 +1,181 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="logoPictureBox.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAADG1JREFUaEPtWXl4 + VPUVBWULCRAUIkuDQBBQwSKLVlFBRRBUxIV+VIXPtmpdURAhoMgSwhayAwkhJGSDkBCSgEDYjIhYQVqL + CIUqiLK0zcy8bTJLZjs9v5dJTCKTyQT5q+b73pftzbx77u/cc8+906LFr1+/ZuD/KwPW8qW4Zoil6Ccg + rRgL04KhMM7rB+MHvfnzYEjRIyHHTbqqB1sPR0Fa1QdK6ihYyqOv6r3qJUBaPgrGud1hePcGGN6LgOlD + BrtiMpTVL0Pb+C7k+GmQljzKe26HYW44jO93hTFqEJTkPzU5CHPpJEgp1/FqA2Xd3U1+nc+TkuNfgXHR + QAYcCtPC+xjoYti/OAjXhcvwVFYBHtT78jg8cJlU2I6Vwbx5EUFNhWFmTxgiu0Je9YTPgOzfpEHNuw3K + puuh7eoAZXMbaAVjrw6AtHwYKmZ2hCn6WdgOHagO2N+XR4bzv+XQNo2F9fBC/W7Ht99CzYyCYXYfUu0m + yLEv1gZmO7YSWuFoyBntoJW0hXlvB/1SNreGueSp5gFQN8xixoJhjBwO68dl8DjcfsK2wyX/HfZ/JPKh + j0NO6wIpuSUzeB+qzuXDU3VOf73zh0tQEl6H8cMwSAm3Q1nfHfKG66EWMttlDHzfT5eSJ05gQuAA5Lhn + yPF2UBKnw2WQ/eUbbutFZnoOlMy+kNeRt3mtoG0Phnl3R6hbgiCv7whl4y2wfjYLHvtZ3n8JajZBZpIq + O3hfTeD7GXzNtacDk9ASln3vBAZAWjGelAmBlpvEdPmNHW7zWWjbxjCLLaFuIwV2Vx+/nkkRDL9rO0Og + FjEhmQRWeDfMu8ZDLQhl4CE/BdwgeCWL75czIrDg5eQXUDEjCOaCdP+R8w6P0whz6UTI2aQKM1YbdN1g + vCD0//EeAUTQRfxcm+269xO8mhcErXhiYMGr6ZGkTVuoG5Y3KXjADftXCZBTWzPrPjLZEEhdMHVOqBaI + CH5rCKQ1N6HqzNbAABjnhVHPp5KjriYB8FRdhrppJCWPSiEoc6VgG/ubt1i1nd4aYB2o+VS7uI6Qk4cG + Frwc/yg1vh+c584zeCuchqPU8a8FSXyCcVV8DiWtJ7TS9r6p4weAtp1Fnt8LSnYnKBkhbHgdYIwOQeVH + ywMDUDGzHcyFaXqwVadyISUOo3xN4W8mHwDccF7cR8XpUq0iNXQI5BREcW8N1otaK3yEcjoCtiPrKa8D + IcX7bnY/67ZSzANs+cOYcU2oNKwHZ8O0rA01vDsq97zMvx+7Igjnvw8SQLdquWwugNJgyOndYD+ZCPvX + G/TnmPPiYZgV2vQTMMylnBWkVDeZSwfIwa6Uu/Y8Vh7nkhakyVA4vtsqemk9IC7lFJQNt+qq0mwAO9qz + jnqh6mwu39tSHcOPF9mtIyAnPucfhJL8IpUnHM6zP+gBmrdNg3EBG09aOI1UKOXsLpiWBsO0qiecF3YJ + gtWC8DgrqNOjdP1vVhF76aYVB7HJ9YTj/I7a95aTXoVxYV//AExRwyAte1YoItyWf8EU1Q9q7jjICbfS + DjwN+5lVkFbTgK0JhRTbA7ajibUPcVvPQ04azlMYyAbWmSACkNIGtaIWtoKaNRBu5aT+/tb9JbQxTaCR + YU4PusV4/UVuy2kGOUS3r6boHrAemUUr8CyktW15IkE6ndTMx2qP2mX6J6zlC+D4Phvqxu7stqyFQIq4 + XueldGa0ROX+V/n+LqrhD6yDcNJoWuOnYJgVBttn+3UAVWdyGWQYbXMXmFbeDFMMM0+VkVNv5KncC8O8 + drB8sph3eqXV4+RPCh/6FguRDlL4meYCoAjoViP9FrgrT8NjqeJgNJLD0hg/AGb3ZYGeoZ85TjrcBtOi + UBgXd4XlwIsMegjllGaraBz5WYDK3e/SURoaKJIN2pbJrBevB7oKAFoJFSmlG5z/Oag/Q46dymGov28A + yuq/sNoHUM9PUYcfh2lFK3K/D2kUwd/H0EXeSQA81j0v0POwyD1UCU/DLu2B236ZHn4y5KxWzS9m0RNK + QgigKxwX9ukA1JS3ISjue8qKnUJaDILj3GeQ1w6g0jDbBaNg3jERplgqw4ZQHmkQZe5O+vzPeX0Fl3Kc + VvjCz4A4Lh7ge7AnMIvNllT2E3ndjXBc3F0NYH0k5+xejQCIe94L4DCH5wGQ4npBXt0fti+nU9bCeRFA + DienzCDy/Gmom3/H/0fQ0y/yymlNLTjg8aisj5ksdibhI2YzEHNXI6e04fLa1uzGS70A5hBAeCMUSvZS + 6NJpBktLHH8Hm9YQqkEE7S5VpYiFtS1UD0gtFCcRTJfYknPufAZsYj1chv3Yao6OR4TwsRlt4YQVyiwG + c6C5UX9dk09DUIi+SErqzN7yON/PDCVlOineCIUEtwyze8Nx+gTc2nHK5/3kYASU3PYcqKnpwq/XeHyh + 8fxZ2AZ1C0/hrzN4zdZPzXGhmGB+pAwfh/1UAqx/m8O6eYog2KF9ef6Gxc77lJyOFAT2oLgRjOc7Dv9T + YJx/u38ZtX6yU6eEZe9bLFpmu7Qj9Z/B152saudUPoTtX8lrq7tHJYv94vBrqNz7AgebCbB+MZ10m0y6 + 3UywBN1EjySmOFFzWv4E9qBB7PpHaeruhhzjZx42zKEdzo7Wm5P103nkIH0QT0DOIg3yu0AtZsBcb9Qd + tGsmK/FQEaSSSzBZvLI5C2fwO38PyOAJkHyGvI7WJXc8qfMwqk58THvfE0rSy42fgLTsPi6hxnPjYIF5 + JzcFC9nSNw+FefsjpFMXBhbG2ZXqskMUZh0gNRTwjol6ExOXuKex0dLHhKYWcYQs5HC0cSxsX60jG/II + 4Ab/XkhNe5NmLoyIj8MlHaUPv5WrvEGwHnuNg8ZAZpVZye/GqxO5z8Lc0Xy/47NL7+XGIrstn90blkNR + 8LirIMU8x6bqh/81DcIw9waoGVG6dDl+LOY4xz3NeqpOEemzk5ln9hWOeuZdDxFEONWlmVp/pezvForV + hvLbm/IZo/sgx5lvmf3upNJr/k9AgJBjH+ML+sN1+RJVJJ3ehysVkWnvdkwrI5BS/o2jn1Y0nJJKMIHS + 5ArBi16h5JCm64cwcWW1FkVNm6tv7gLaSBtmM9M5C9mM5tFStGBHrea0WkiDxaJWsoRn56nkkkalHIDq + 7n2a43/E2jCnNWffKezwx4UVrjaUJ75BxdtsnonPBwZASZnGptGNW7BUmrY/MithDJjzaslozq3jULlr + EoNno8vmSQhVEgBon7US7pB8nUZjEiq6bmo7jpFrhZHXg/fY3DAt+T2F5DeBBV9zVKao/iycMVwlclRM + H0FrzQecjKG8zmKTe0BfdZhimLlMLqaKREOj1hdyfsjgWFjA5uftG2IuUIv5t20EuIt0awhEWGfKr5TU + qR51zJvWoELfS73fPAB6Z47kYMFxznIwiqNla/rx3rTXEVSF4QSThcqdb/JEnmbD68RJrTvve4nW+w9c + Ld5DQFSqYq4QC3vzuoPKNZiSLNaHddaL20jDfCpOMmla+CRdrqRn31q+hxtBTn3+Gpe/wlAzuJ2LJOfX + vsF6WEJ/NIQKNZEu9JvqY3bItM8XSLPXYZjfgsfNgDbeSQAs7gIxlBDApgGcpe+lL6I5XNOZgCnFBe3Y + qCiXqbfwNO+g1XhD36mKL9vhT/nZQQ9IK0c2P/N1gclJr3DNQnlb/QZcRvGQ+tuIaiAGutIlHDEfon6L + 7i0GGmEzSLGMm2gLhtFaTKI1f4rzBd8rbQD3TTlwq6dpx7/3uln2/7JSVEzvCtPy4b9M8DVA1NQZBBHC + sW4cleFErcTV/8Gtj5TWQ+9zbr6u2kZvFyvxDjy9P7OjfsDRlONpDLceXNfU/XKrFmgZy1DxDh1u3IO/ + bPA1IMw5K0mRPly101pnxcBVIV8RiMfGiayIn2kltKT9CIIpnvWxintW0sWwoAXr5qVapQE/erIdKufn + ag9x2uIEtmrytQm+HqVin6TEcm85dzC3ZglwnCUFGnxYI4rRdmQl5ZefE6SMZi+JYPGTTul3kYbHSB2a + xfIySEufYbG2p1w20Sb4K9pA/i/FPEggofRON7PgpnCXuhb2Lz+H8zxnAUnjZ2dmriG/pzR+iaqT/HCv + dDEqS1ZCTX9PX11WzOhEme4PdV2An7gEEmRT7pWWcWZeNJgUCKNi8ePWSGZ7/m9hWnwPpKj7+f0uevnb + eAIDuFXoQVvQh7vWa8TzpgTs7x459nlynjWwlIq09EFIy+npk6Zee277C+zX/1+jDPwPYm+dIGt6DfoA + AAAASUVORK5CYII= +</value> + </data> +</root>
\ No newline at end of file diff --git a/script-editor/CommentForm.Designer.cs b/script-editor/CommentForm.Designer.cs new file mode 100644 index 0000000..3400912 --- /dev/null +++ b/script-editor/CommentForm.Designer.cs @@ -0,0 +1,83 @@ +namespace VPScriptEditor +{ + partial class CommentForm + { + private System.ComponentModel.IContainer components = null; + + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.richTxtComment = new System.Windows.Forms.RichTextBox(); + this.bttnOK = new System.Windows.Forms.Button(); + this.tableLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 1; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Controls.Add(this.richTxtComment, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.bttnOK, 0, 1); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(5, 5); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 2; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(636, 308); + this.tableLayoutPanel1.TabIndex = 0; + // + // richTxtComment + // + this.richTxtComment.Dock = System.Windows.Forms.DockStyle.Fill; + this.richTxtComment.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.richTxtComment.Location = new System.Drawing.Point(3, 3); + this.richTxtComment.Name = "richTxtComment"; + this.richTxtComment.Size = new System.Drawing.Size(630, 272); + this.richTxtComment.TabIndex = 0; + this.richTxtComment.Text = ""; + // + // bttnOK + // + this.bttnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.bttnOK.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.bttnOK.Location = new System.Drawing.Point(282, 281); + this.bttnOK.Name = "bttnOK"; + this.bttnOK.Size = new System.Drawing.Size(72, 24); + this.bttnOK.TabIndex = 1; + this.bttnOK.Text = "OK"; + this.bttnOK.UseVisualStyleBackColor = true; + this.bttnOK.Click += new System.EventHandler(this.bttnOK_Click); + // + // CommentForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.bttnOK; + this.ClientSize = new System.Drawing.Size(646, 318); + this.Controls.Add(this.tableLayoutPanel1); + this.MinimizeBox = false; + this.Name = "CommentForm"; + this.Padding = new System.Windows.Forms.Padding(5); + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.tableLayoutPanel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.RichTextBox richTxtComment; + private System.Windows.Forms.Button bttnOK; + } +}
\ No newline at end of file diff --git a/script-editor/CommentForm.cs b/script-editor/CommentForm.cs new file mode 100644 index 0000000..12106fe --- /dev/null +++ b/script-editor/CommentForm.cs @@ -0,0 +1,28 @@ +using System.Windows.Forms; + +namespace VPScriptEditor +{ + public partial class CommentForm : Form + { + public string Comment + { + get + { + return richTxtComment.Text.Length > 0 ? richTxtComment.Text : null; + } + } + + public CommentForm(int pointerNb, string comment) + { + InitializeComponent(); + + richTxtComment.Text = comment == null ? "" : comment; + this.Text = "Comment for pointer " + (pointerNb + 1); + } + + private void bttnOK_Click(object sender, System.EventArgs e) + { + Close(); + } + } +} diff --git a/script-editor/CommentForm.resx b/script-editor/CommentForm.resx new file mode 100644 index 0000000..19dc0dd --- /dev/null +++ b/script-editor/CommentForm.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/script-editor/CustomControl.cs b/script-editor/CustomControl.cs new file mode 100644 index 0000000..829565c --- /dev/null +++ b/script-editor/CustomControl.cs @@ -0,0 +1,35 @@ +using System.Windows.Forms; + +namespace CustomControl +{ + public class MyPanel : Panel + { + protected override void OnPaintBackground(PaintEventArgs pevent) { } + } + + public class MyRichTextBox : RichTextBox + { + private bool allowedKeypress; + + protected override void OnKeyPress(KeyPressEventArgs e) + { + e.Handled = true; + if (!allowedKeypress) + System.Media.SystemSounds.Beep.Play(); + } + + protected override void OnKeyDown(KeyEventArgs e) + { + allowedKeypress = e.Control && (e.KeyCode == Keys.A || e.KeyCode == Keys.C || e.KeyCode == Keys.Insert || e.KeyCode == Keys.Y || e.KeyCode == Keys.Z); + + if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Back || e.KeyCode == Keys.Delete || (e.Control && (e.KeyCode == Keys.V || e.KeyCode == Keys.X)) || (e.Shift && (e.KeyCode == Keys.Insert || e.KeyCode == Keys.Delete))) + { + if (e.KeyCode == Keys.Delete || (e.Shift && (e.KeyCode == Keys.Insert || e.KeyCode == Keys.Delete))) + System.Media.SystemSounds.Beep.Play(); + e.Handled = true; + } + else + base.OnKeyDown(e); + } + } +} diff --git a/script-editor/FontFile.cs b/script-editor/FontFile.cs index 8bbf61e..cc74763 100644 --- a/script-editor/FontFile.cs +++ b/script-editor/FontFile.cs @@ -61,7 +61,7 @@ namespace VPScriptEditor case "Text": if (attrs[i].Value.Length != 1) - throw new Exception("Invalid database"); + throw new Exception("Invalid database, character " + attrs[i].Value + " not supported"); text = attrs[i].Value[0]; break; @@ -79,8 +79,8 @@ namespace VPScriptEditor XmlDocument fontXml = new XmlDocument(); fontXml.Load(file); XmlNodeList fontNode = fontXml.GetElementsByTagName("Symbol"); - glyphs = new Symbol[fontNode.Count + 1]; - bitmaps = new Bitmap[fontNode.Count + 1]; + glyphs = new Symbol[fontNode.Count]; + bitmaps = new Bitmap[fontNode.Count]; data = new Dictionary<char, int>(); for (int i = 0; i < fontNode.Count; i++) { diff --git a/script-editor/MainForm.Designer.cs b/script-editor/MainForm.Designer.cs index ee72599..f879053 100644 --- a/script-editor/MainForm.Designer.cs +++ b/script-editor/MainForm.Designer.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Drawing; using System.Diagnostics; using System.Windows.Forms; + namespace VPScriptEditor { partial class VPScriptEditor : Form @@ -36,45 +37,76 @@ namespace VPScriptEditor this.txtbxPointerNumber = new System.Windows.Forms.TextBox(); this.bttnPrevious = new System.Windows.Forms.Button(); this.bttnNext = new System.Windows.Forms.Button(); - this.txtbxInputPtr = new System.Windows.Forms.TextBox(); this.grpbxInput = new System.Windows.Forms.GroupBox(); - this.txtbxInputHeight = new System.Windows.Forms.TextBox(); - this.lblInputHeight = new System.Windows.Forms.Label(); - this.txtbxInputWidth = new System.Windows.Forms.TextBox(); - this.lblInputWidth = new System.Windows.Forms.Label(); - this.txtbxInputY = new System.Windows.Forms.TextBox(); - this.lblInputY = new System.Windows.Forms.Label(); - this.txtbxInputX = new System.Windows.Forms.TextBox(); + this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); + this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); + this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); this.lblInputX = new System.Windows.Forms.Label(); + this.txtbxInputX = new System.Windows.Forms.TextBox(); + this.lblInputY = new System.Windows.Forms.Label(); + this.txtbxInputY = new System.Windows.Forms.TextBox(); + this.lblInputWidth = new System.Windows.Forms.Label(); + this.txtbxInputWidth = new System.Windows.Forms.TextBox(); + this.lblInputHeight = new System.Windows.Forms.Label(); + this.txtbxInputHeight = new System.Windows.Forms.TextBox(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.bttnNextUntranslated = new System.Windows.Forms.Button(); + this.bttnNextUnsure = new System.Windows.Forms.Button(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.grpbxOutput = new System.Windows.Forms.GroupBox(); - this.bttnResize = new System.Windows.Forms.Button(); + this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel(); + this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel(); + this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel(); this.bttnReset = new System.Windows.Forms.Button(); - this.txtbxOutputHeight = new System.Windows.Forms.TextBox(); - this.txtbxOutputPtr = new System.Windows.Forms.TextBox(); - this.lblOutputHeight = new System.Windows.Forms.Label(); - this.txtbxOutputWidth = new System.Windows.Forms.TextBox(); - this.txtbxOutputY = new System.Windows.Forms.TextBox(); + this.bttnResize = new System.Windows.Forms.Button(); + this.chkDone = new System.Windows.Forms.CheckBox(); + this.chkUnsure = new System.Windows.Forms.CheckBox(); + this.bttnComment = new System.Windows.Forms.Button(); + this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel(); this.lblOutputX = new System.Windows.Forms.Label(); - this.lblOutputWidth = new System.Windows.Forms.Label(); this.txtbxOutputX = new System.Windows.Forms.TextBox(); this.lblOutputY = new System.Windows.Forms.Label(); - this.tsmiTest = new System.Windows.Forms.ToolStripMenuItem(); + this.txtbxOutputY = new System.Windows.Forms.TextBox(); + this.lblOutputWidth = new System.Windows.Forms.Label(); + this.txtbxOutputWidth = new System.Windows.Forms.TextBox(); + this.lblOutputHeight = new System.Windows.Forms.Label(); + this.txtbxOutputHeight = new System.Windows.Forms.TextBox(); + this.richEditOutputPtr = new System.Windows.Forms.RichTextBox(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.OpenMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.SaveMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.SaveAsMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ExitMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menu = new System.Windows.Forms.MenuStrip(); - this.pnlOutput = new CustomControl.MyPanel(); + this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.wordWarpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.aboutToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.statusStrip = new System.Windows.Forms.StatusStrip(); + this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); + this.lblStatusProgress = new System.Windows.Forms.ToolStripStatusLabel(); this.pnlInput = new CustomControl.MyPanel(); + this.richEditInputPtr = new CustomControl.MyRichTextBox(); + this.pnlOutput = new CustomControl.MyPanel(); this.grpbxInput.SuspendLayout(); + this.tableLayoutPanel2.SuspendLayout(); + this.tableLayoutPanel3.SuspendLayout(); + this.flowLayoutPanel2.SuspendLayout(); + this.flowLayoutPanel1.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); this.grpbxOutput.SuspendLayout(); + this.tableLayoutPanel4.SuspendLayout(); + this.tableLayoutPanel5.SuspendLayout(); + this.flowLayoutPanel3.SuspendLayout(); + this.flowLayoutPanel4.SuspendLayout(); this.menu.SuspendLayout(); + this.statusStrip.SuspendLayout(); this.SuspendLayout(); // // lblPointerNumber // - this.lblPointerNumber.AutoSize = true; - this.lblPointerNumber.Location = new System.Drawing.Point(6, 16); + this.lblPointerNumber.Anchor = System.Windows.Forms.AnchorStyles.None; + this.lblPointerNumber.Location = new System.Drawing.Point(3, 7); this.lblPointerNumber.Name = "lblPointerNumber"; this.lblPointerNumber.Size = new System.Drawing.Size(46, 13); this.lblPointerNumber.TabIndex = 1; @@ -82,17 +114,18 @@ namespace VPScriptEditor // // txtbxRoom // + this.txtbxRoom.Anchor = System.Windows.Forms.AnchorStyles.None; this.txtbxRoom.BackColor = System.Drawing.SystemColors.Window; - this.txtbxRoom.Location = new System.Drawing.Point(371, 40); + this.txtbxRoom.Location = new System.Drawing.Point(413, 4); this.txtbxRoom.Name = "txtbxRoom"; this.txtbxRoom.ReadOnly = true; this.txtbxRoom.Size = new System.Drawing.Size(100, 20); - this.txtbxRoom.TabIndex = 7; + this.txtbxRoom.TabIndex = 6; // // lblRoom // - this.lblRoom.AutoSize = true; - this.lblRoom.Location = new System.Drawing.Point(324, 43); + this.lblRoom.Anchor = System.Windows.Forms.AnchorStyles.None; + this.lblRoom.Location = new System.Drawing.Point(366, 7); this.lblRoom.Name = "lblRoom"; this.lblRoom.Size = new System.Drawing.Size(41, 13); this.lblRoom.TabIndex = 3; @@ -100,21 +133,23 @@ namespace VPScriptEditor // // txtbxPointerNumber // + this.txtbxPointerNumber.Anchor = System.Windows.Forms.AnchorStyles.None; this.txtbxPointerNumber.Enabled = false; - this.txtbxPointerNumber.Location = new System.Drawing.Point(58, 13); + this.txtbxPointerNumber.Location = new System.Drawing.Point(91, 4); this.txtbxPointerNumber.MaxLength = 4; this.txtbxPointerNumber.Name = "txtbxPointerNumber"; this.txtbxPointerNumber.Size = new System.Drawing.Size(37, 20); - this.txtbxPointerNumber.TabIndex = 0; + this.txtbxPointerNumber.TabIndex = 2; this.txtbxPointerNumber.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtbxPointerNumber_KeyPress); // // bttnPrevious // + this.bttnPrevious.Anchor = System.Windows.Forms.AnchorStyles.None; this.bttnPrevious.Enabled = false; this.bttnPrevious.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.bttnPrevious.Location = new System.Drawing.Point(118, 13); + this.bttnPrevious.Location = new System.Drawing.Point(55, 3); this.bttnPrevious.Name = "bttnPrevious"; - this.bttnPrevious.Size = new System.Drawing.Size(30, 20); + this.bttnPrevious.Size = new System.Drawing.Size(30, 22); this.bttnPrevious.TabIndex = 1; this.bttnPrevious.Text = "←"; this.bttnPrevious.UseVisualStyleBackColor = true; @@ -122,260 +157,459 @@ namespace VPScriptEditor // // bttnNext // + this.bttnNext.Anchor = System.Windows.Forms.AnchorStyles.None; this.bttnNext.Enabled = false; this.bttnNext.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.bttnNext.Location = new System.Drawing.Point(157, 13); + this.bttnNext.Location = new System.Drawing.Point(134, 3); this.bttnNext.Name = "bttnNext"; - this.bttnNext.Size = new System.Drawing.Size(30, 20); - this.bttnNext.TabIndex = 2; + this.bttnNext.Size = new System.Drawing.Size(30, 22); + this.bttnNext.TabIndex = 3; this.bttnNext.Text = "→"; this.bttnNext.UseVisualStyleBackColor = true; this.bttnNext.Click += new System.EventHandler(this.bttnNext_Click); // - // txtbxInputPtr - // - this.txtbxInputPtr.BackColor = System.Drawing.SystemColors.Window; - this.txtbxInputPtr.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtbxInputPtr.Location = new System.Drawing.Point(9, 66); - this.txtbxInputPtr.Multiline = true; - this.txtbxInputPtr.Name = "txtbxInputPtr"; - this.txtbxInputPtr.ReadOnly = true; - this.txtbxInputPtr.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.txtbxInputPtr.Size = new System.Drawing.Size(593, 174); - this.txtbxInputPtr.TabIndex = 8; - // // grpbxInput // - this.grpbxInput.Controls.Add(this.txtbxInputHeight); - this.grpbxInput.Controls.Add(this.lblInputHeight); - this.grpbxInput.Controls.Add(this.txtbxInputWidth); - this.grpbxInput.Controls.Add(this.lblInputWidth); - this.grpbxInput.Controls.Add(this.txtbxInputY); - this.grpbxInput.Controls.Add(this.lblInputY); - this.grpbxInput.Controls.Add(this.txtbxInputX); - this.grpbxInput.Controls.Add(this.lblInputX); - this.grpbxInput.Controls.Add(this.lblRoom); - this.grpbxInput.Controls.Add(this.txtbxInputPtr); - this.grpbxInput.Controls.Add(this.lblPointerNumber); - this.grpbxInput.Controls.Add(this.bttnNext); - this.grpbxInput.Controls.Add(this.txtbxPointerNumber); - this.grpbxInput.Controls.Add(this.bttnPrevious); - this.grpbxInput.Controls.Add(this.txtbxRoom); - this.grpbxInput.Location = new System.Drawing.Point(12, 27); + this.grpbxInput.Controls.Add(this.tableLayoutPanel2); + this.grpbxInput.Dock = System.Windows.Forms.DockStyle.Fill; + this.grpbxInput.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.grpbxInput.Location = new System.Drawing.Point(3, 33); this.grpbxInput.Name = "grpbxInput"; - this.grpbxInput.Size = new System.Drawing.Size(608, 246); - this.grpbxInput.TabIndex = 1; + this.grpbxInput.Size = new System.Drawing.Size(826, 272); + this.grpbxInput.TabIndex = 5; this.grpbxInput.TabStop = false; this.grpbxInput.Text = "Original text"; // - // txtbxInputHeight + // tableLayoutPanel2 + // + this.tableLayoutPanel2.ColumnCount = 2; + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 330F)); + this.tableLayoutPanel2.Controls.Add(this.pnlInput, 1, 0); + this.tableLayoutPanel2.Controls.Add(this.tableLayoutPanel3, 0, 0); + this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 17); + this.tableLayoutPanel2.Name = "tableLayoutPanel2"; + this.tableLayoutPanel2.RowCount = 1; + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel2.Size = new System.Drawing.Size(820, 252); + this.tableLayoutPanel2.TabIndex = 16; + // + // tableLayoutPanel3 + // + this.tableLayoutPanel3.ColumnCount = 1; + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel3.Controls.Add(this.flowLayoutPanel2, 0, 0); + this.tableLayoutPanel3.Controls.Add(this.richEditInputPtr, 0, 1); + this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel3.Location = new System.Drawing.Point(3, 3); + this.tableLayoutPanel3.Name = "tableLayoutPanel3"; + this.tableLayoutPanel3.RowCount = 2; + this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel3.Size = new System.Drawing.Size(484, 246); + this.tableLayoutPanel3.TabIndex = 16; + // + // flowLayoutPanel2 + // + this.flowLayoutPanel2.Controls.Add(this.lblInputX); + this.flowLayoutPanel2.Controls.Add(this.txtbxInputX); + this.flowLayoutPanel2.Controls.Add(this.lblInputY); + this.flowLayoutPanel2.Controls.Add(this.txtbxInputY); + this.flowLayoutPanel2.Controls.Add(this.lblInputWidth); + this.flowLayoutPanel2.Controls.Add(this.txtbxInputWidth); + this.flowLayoutPanel2.Controls.Add(this.lblInputHeight); + this.flowLayoutPanel2.Controls.Add(this.txtbxInputHeight); + this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel2.Location = new System.Drawing.Point(3, 3); + this.flowLayoutPanel2.Name = "flowLayoutPanel2"; + this.flowLayoutPanel2.Size = new System.Drawing.Size(478, 24); + this.flowLayoutPanel2.TabIndex = 1; // - this.txtbxInputHeight.BackColor = System.Drawing.SystemColors.Window; - this.txtbxInputHeight.Location = new System.Drawing.Point(287, 40); - this.txtbxInputHeight.Name = "txtbxInputHeight"; - this.txtbxInputHeight.ReadOnly = true; - this.txtbxInputHeight.Size = new System.Drawing.Size(30, 20); - this.txtbxInputHeight.TabIndex = 6; - // - // lblInputHeight + // lblInputX // - this.lblInputHeight.AutoSize = true; - this.lblInputHeight.Location = new System.Drawing.Point(237, 43); - this.lblInputHeight.Name = "lblInputHeight"; - this.lblInputHeight.Size = new System.Drawing.Size(44, 13); - this.lblInputHeight.TabIndex = 15; - this.lblInputHeight.Text = "Height :"; + this.lblInputX.Anchor = System.Windows.Forms.AnchorStyles.None; + this.lblInputX.AutoSize = true; + this.lblInputX.Location = new System.Drawing.Point(3, 6); + this.lblInputX.Name = "lblInputX"; + this.lblInputX.Size = new System.Drawing.Size(20, 13); + this.lblInputX.TabIndex = 9; + this.lblInputX.Text = "X :"; // - // txtbxInputWidth + // txtbxInputX // - this.txtbxInputWidth.BackColor = System.Drawing.SystemColors.Window; - this.txtbxInputWidth.Location = new System.Drawing.Point(201, 40); - this.txtbxInputWidth.Name = "txtbxInputWidth"; - this.txtbxInputWidth.ReadOnly = true; - this.txtbxInputWidth.Size = new System.Drawing.Size(30, 20); - this.txtbxInputWidth.TabIndex = 5; + this.txtbxInputX.Anchor = System.Windows.Forms.AnchorStyles.None; + this.txtbxInputX.BackColor = System.Drawing.SystemColors.Window; + this.txtbxInputX.Location = new System.Drawing.Point(29, 3); + this.txtbxInputX.Name = "txtbxInputX"; + this.txtbxInputX.ReadOnly = true; + this.txtbxInputX.Size = new System.Drawing.Size(30, 20); + this.txtbxInputX.TabIndex = 1; // - // lblInputWidth + // lblInputY // - this.lblInputWidth.AutoSize = true; - this.lblInputWidth.Location = new System.Drawing.Point(154, 43); - this.lblInputWidth.Name = "lblInputWidth"; - this.lblInputWidth.Size = new System.Drawing.Size(41, 13); - this.lblInputWidth.TabIndex = 13; - this.lblInputWidth.Text = "Width :"; + this.lblInputY.Anchor = System.Windows.Forms.AnchorStyles.None; + this.lblInputY.AutoSize = true; + this.lblInputY.Location = new System.Drawing.Point(65, 6); + this.lblInputY.Name = "lblInputY"; + this.lblInputY.Size = new System.Drawing.Size(20, 13); + this.lblInputY.TabIndex = 11; + this.lblInputY.Text = "Y :"; // // txtbxInputY // + this.txtbxInputY.Anchor = System.Windows.Forms.AnchorStyles.None; this.txtbxInputY.BackColor = System.Drawing.SystemColors.Window; - this.txtbxInputY.Location = new System.Drawing.Point(118, 40); + this.txtbxInputY.Location = new System.Drawing.Point(91, 3); this.txtbxInputY.Name = "txtbxInputY"; this.txtbxInputY.ReadOnly = true; this.txtbxInputY.Size = new System.Drawing.Size(30, 20); - this.txtbxInputY.TabIndex = 4; + this.txtbxInputY.TabIndex = 2; // - // lblInputY + // lblInputWidth // - this.lblInputY.AutoSize = true; - this.lblInputY.Location = new System.Drawing.Point(94, 43); - this.lblInputY.Name = "lblInputY"; - this.lblInputY.Size = new System.Drawing.Size(20, 13); - this.lblInputY.TabIndex = 11; - this.lblInputY.Text = "Y :"; + this.lblInputWidth.Anchor = System.Windows.Forms.AnchorStyles.None; + this.lblInputWidth.AutoSize = true; + this.lblInputWidth.Location = new System.Drawing.Point(127, 6); + this.lblInputWidth.Name = "lblInputWidth"; + this.lblInputWidth.Size = new System.Drawing.Size(41, 13); + this.lblInputWidth.TabIndex = 13; + this.lblInputWidth.Text = "Width :"; // - // txtbxInputX + // txtbxInputWidth // - this.txtbxInputX.BackColor = System.Drawing.SystemColors.Window; - this.txtbxInputX.Location = new System.Drawing.Point(58, 40); - this.txtbxInputX.Name = "txtbxInputX"; - this.txtbxInputX.ReadOnly = true; - this.txtbxInputX.Size = new System.Drawing.Size(30, 20); - this.txtbxInputX.TabIndex = 3; + this.txtbxInputWidth.Anchor = System.Windows.Forms.AnchorStyles.None; + this.txtbxInputWidth.BackColor = System.Drawing.SystemColors.Window; + this.txtbxInputWidth.Location = new System.Drawing.Point(174, 3); + this.txtbxInputWidth.Name = "txtbxInputWidth"; + this.txtbxInputWidth.ReadOnly = true; + this.txtbxInputWidth.Size = new System.Drawing.Size(30, 20); + this.txtbxInputWidth.TabIndex = 3; // - // lblInputX + // lblInputHeight // - this.lblInputX.AutoSize = true; - this.lblInputX.Location = new System.Drawing.Point(34, 43); - this.lblInputX.Name = "lblInputX"; - this.lblInputX.Size = new System.Drawing.Size(20, 13); - this.lblInputX.TabIndex = 9; - this.lblInputX.Text = "X :"; + this.lblInputHeight.Anchor = System.Windows.Forms.AnchorStyles.None; + this.lblInputHeight.AutoSize = true; + this.lblInputHeight.Location = new System.Drawing.Point(210, 6); + this.lblInputHeight.Name = "lblInputHeight"; + this.lblInputHeight.Size = new System.Drawing.Size(44, 13); + this.lblInputHeight.TabIndex = 15; + this.lblInputHeight.Text = "Height :"; + // + // txtbxInputHeight + // + this.txtbxInputHeight.Anchor = System.Windows.Forms.AnchorStyles.None; + this.txtbxInputHeight.BackColor = System.Drawing.SystemColors.Window; + this.txtbxInputHeight.Location = new System.Drawing.Point(260, 3); + this.txtbxInputHeight.Name = "txtbxInputHeight"; + this.txtbxInputHeight.ReadOnly = true; + this.txtbxInputHeight.Size = new System.Drawing.Size(30, 20); + this.txtbxInputHeight.TabIndex = 4; + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Controls.Add(this.lblPointerNumber); + this.flowLayoutPanel1.Controls.Add(this.bttnPrevious); + this.flowLayoutPanel1.Controls.Add(this.txtbxPointerNumber); + this.flowLayoutPanel1.Controls.Add(this.bttnNext); + this.flowLayoutPanel1.Controls.Add(this.bttnNextUntranslated); + this.flowLayoutPanel1.Controls.Add(this.bttnNextUnsure); + this.flowLayoutPanel1.Controls.Add(this.lblRoom); + this.flowLayoutPanel1.Controls.Add(this.txtbxRoom); + this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(826, 24); + this.flowLayoutPanel1.TabIndex = 0; + // + // bttnNextUntranslated + // + this.bttnNextUntranslated.Enabled = false; + this.bttnNextUntranslated.Location = new System.Drawing.Point(170, 3); + this.bttnNextUntranslated.Name = "bttnNextUntranslated"; + this.bttnNextUntranslated.Size = new System.Drawing.Size(108, 22); + this.bttnNextUntranslated.TabIndex = 4; + this.bttnNextUntranslated.Text = "Next untranslated"; + this.bttnNextUntranslated.UseVisualStyleBackColor = true; + this.bttnNextUntranslated.Click += new System.EventHandler(this.bttnNextUntranslated_Click); + // + // bttnNextUnsure + // + this.bttnNextUnsure.Enabled = false; + this.bttnNextUnsure.Location = new System.Drawing.Point(284, 3); + this.bttnNextUnsure.Name = "bttnNextUnsure"; + this.bttnNextUnsure.Size = new System.Drawing.Size(76, 22); + this.bttnNextUnsure.TabIndex = 5; + this.bttnNextUnsure.Text = "Next unsure"; + this.bttnNextUnsure.UseVisualStyleBackColor = true; + this.bttnNextUnsure.Click += new System.EventHandler(this.bttnNextUnsure_Click); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 1; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.grpbxInput, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.grpbxOutput, 0, 2); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 24); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 3; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(832, 587); + this.tableLayoutPanel1.TabIndex = 18; // // grpbxOutput // - this.grpbxOutput.Controls.Add(this.bttnResize); - this.grpbxOutput.Controls.Add(this.bttnReset); - this.grpbxOutput.Controls.Add(this.txtbxOutputHeight); - this.grpbxOutput.Controls.Add(this.txtbxOutputPtr); - this.grpbxOutput.Controls.Add(this.lblOutputHeight); - this.grpbxOutput.Controls.Add(this.txtbxOutputWidth); - this.grpbxOutput.Controls.Add(this.txtbxOutputY); - this.grpbxOutput.Controls.Add(this.lblOutputX); - this.grpbxOutput.Controls.Add(this.lblOutputWidth); - this.grpbxOutput.Controls.Add(this.txtbxOutputX); - this.grpbxOutput.Controls.Add(this.lblOutputY); - this.grpbxOutput.Location = new System.Drawing.Point(12, 279); + this.grpbxOutput.Controls.Add(this.tableLayoutPanel4); + this.grpbxOutput.Dock = System.Windows.Forms.DockStyle.Fill; + this.grpbxOutput.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.grpbxOutput.Location = new System.Drawing.Point(3, 311); this.grpbxOutput.Name = "grpbxOutput"; - this.grpbxOutput.Size = new System.Drawing.Size(608, 246); - this.grpbxOutput.TabIndex = 0; + this.grpbxOutput.Size = new System.Drawing.Size(826, 273); + this.grpbxOutput.TabIndex = 10; this.grpbxOutput.TabStop = false; this.grpbxOutput.Text = "Translated text"; // - // bttnResize - // - this.bttnResize.Enabled = false; - this.bttnResize.Location = new System.Drawing.Point(397, 13); - this.bttnResize.Name = "bttnResize"; - this.bttnResize.Size = new System.Drawing.Size(96, 20); - this.bttnResize.TabIndex = 5; - this.bttnResize.Text = "Resize window"; - this.bttnResize.UseVisualStyleBackColor = true; - this.bttnResize.Click += new System.EventHandler(this.bttnResize_Click); + // tableLayoutPanel4 + // + this.tableLayoutPanel4.ColumnCount = 2; + this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 330F)); + this.tableLayoutPanel4.Controls.Add(this.pnlOutput, 1, 0); + this.tableLayoutPanel4.Controls.Add(this.tableLayoutPanel5, 0, 0); + this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tableLayoutPanel4.Location = new System.Drawing.Point(3, 17); + this.tableLayoutPanel4.Name = "tableLayoutPanel4"; + this.tableLayoutPanel4.RowCount = 1; + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel4.Size = new System.Drawing.Size(820, 253); + this.tableLayoutPanel4.TabIndex = 24; + // + // tableLayoutPanel5 + // + this.tableLayoutPanel5.ColumnCount = 1; + this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel5.Controls.Add(this.flowLayoutPanel3, 0, 0); + this.tableLayoutPanel5.Controls.Add(this.flowLayoutPanel4, 0, 1); + this.tableLayoutPanel5.Controls.Add(this.richEditOutputPtr, 0, 2); + this.tableLayoutPanel5.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel5.Location = new System.Drawing.Point(3, 3); + this.tableLayoutPanel5.Name = "tableLayoutPanel5"; + this.tableLayoutPanel5.RowCount = 3; + this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel5.Size = new System.Drawing.Size(484, 247); + this.tableLayoutPanel5.TabIndex = 17; + // + // flowLayoutPanel3 + // + this.flowLayoutPanel3.Controls.Add(this.bttnReset); + this.flowLayoutPanel3.Controls.Add(this.bttnResize); + this.flowLayoutPanel3.Controls.Add(this.chkDone); + this.flowLayoutPanel3.Controls.Add(this.chkUnsure); + this.flowLayoutPanel3.Controls.Add(this.bttnComment); + this.flowLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel3.Location = new System.Drawing.Point(3, 3); + this.flowLayoutPanel3.Name = "flowLayoutPanel3"; + this.flowLayoutPanel3.Size = new System.Drawing.Size(478, 24); + this.flowLayoutPanel3.TabIndex = 9; // // bttnReset // + this.bttnReset.Anchor = System.Windows.Forms.AnchorStyles.None; this.bttnReset.Enabled = false; - this.bttnReset.Location = new System.Drawing.Point(304, 13); + this.bttnReset.Location = new System.Drawing.Point(3, 3); this.bttnReset.Name = "bttnReset"; - this.bttnReset.Size = new System.Drawing.Size(87, 20); - this.bttnReset.TabIndex = 4; + this.bttnReset.Size = new System.Drawing.Size(87, 22); + this.bttnReset.TabIndex = 1; this.bttnReset.Text = "Reset pointer"; this.bttnReset.UseVisualStyleBackColor = true; this.bttnReset.Click += new System.EventHandler(this.bttnReset_Click); // - // txtbxOutputHeight - // - this.txtbxOutputHeight.Location = new System.Drawing.Point(268, 13); - this.txtbxOutputHeight.Name = "txtbxOutputHeight"; - this.txtbxOutputHeight.Size = new System.Drawing.Size(30, 20); - this.txtbxOutputHeight.TabIndex = 3; - this.txtbxOutputHeight.TextChanged += new System.EventHandler(this.txtbxOutput_TextChanged); - // - // txtbxOutputPtr - // - this.txtbxOutputPtr.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtbxOutputPtr.Location = new System.Drawing.Point(9, 39); - this.txtbxOutputPtr.MaxLength = 5000; - this.txtbxOutputPtr.Multiline = true; - this.txtbxOutputPtr.Name = "txtbxOutputPtr"; - this.txtbxOutputPtr.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.txtbxOutputPtr.Size = new System.Drawing.Size(593, 201); - this.txtbxOutputPtr.TabIndex = 8; - this.txtbxOutputPtr.TextChanged += new System.EventHandler(this.txtbxOutput_TextChanged); - this.txtbxOutputPtr.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtbxOutputPtr_KeyPress); - // - // lblOutputHeight - // - this.lblOutputHeight.AutoSize = true; - this.lblOutputHeight.Location = new System.Drawing.Point(218, 16); - this.lblOutputHeight.Name = "lblOutputHeight"; - this.lblOutputHeight.Size = new System.Drawing.Size(44, 13); - this.lblOutputHeight.TabIndex = 23; - this.lblOutputHeight.Text = "Height :"; - // - // txtbxOutputWidth - // - this.txtbxOutputWidth.Location = new System.Drawing.Point(182, 13); - this.txtbxOutputWidth.Name = "txtbxOutputWidth"; - this.txtbxOutputWidth.Size = new System.Drawing.Size(30, 20); - this.txtbxOutputWidth.TabIndex = 2; - this.txtbxOutputWidth.TextChanged += new System.EventHandler(this.txtbxOutput_TextChanged); + // bttnResize // - // txtbxOutputY + this.bttnResize.Anchor = System.Windows.Forms.AnchorStyles.None; + this.bttnResize.Enabled = false; + this.bttnResize.Location = new System.Drawing.Point(96, 3); + this.bttnResize.Name = "bttnResize"; + this.bttnResize.Size = new System.Drawing.Size(96, 22); + this.bttnResize.TabIndex = 2; + this.bttnResize.Text = "Resize window"; + this.bttnResize.UseVisualStyleBackColor = true; + this.bttnResize.Click += new System.EventHandler(this.bttnResize_Click); // - this.txtbxOutputY.Location = new System.Drawing.Point(99, 13); - this.txtbxOutputY.Name = "txtbxOutputY"; - this.txtbxOutputY.Size = new System.Drawing.Size(30, 20); - this.txtbxOutputY.TabIndex = 1; - this.txtbxOutputY.TextChanged += new System.EventHandler(this.txtbxOutput_TextChanged); + // chkDone + // + this.chkDone.Anchor = System.Windows.Forms.AnchorStyles.None; + this.chkDone.AutoSize = true; + this.chkDone.Enabled = false; + this.chkDone.Location = new System.Drawing.Point(205, 5); + this.chkDone.Margin = new System.Windows.Forms.Padding(10, 3, 3, 3); + this.chkDone.Name = "chkDone"; + this.chkDone.Size = new System.Drawing.Size(52, 17); + this.chkDone.TabIndex = 3; + this.chkDone.Text = "Done"; + this.chkDone.UseVisualStyleBackColor = true; + this.chkDone.CheckedChanged += new System.EventHandler(this.chkbx_CheckedChanged); + // + // chkUnsure + // + this.chkUnsure.Anchor = System.Windows.Forms.AnchorStyles.None; + this.chkUnsure.AutoSize = true; + this.chkUnsure.Enabled = false; + this.chkUnsure.Location = new System.Drawing.Point(266, 5); + this.chkUnsure.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3); + this.chkUnsure.Name = "chkUnsure"; + this.chkUnsure.Size = new System.Drawing.Size(60, 17); + this.chkUnsure.TabIndex = 4; + this.chkUnsure.Text = "Unsure"; + this.chkUnsure.UseVisualStyleBackColor = true; + this.chkUnsure.CheckedChanged += new System.EventHandler(this.chkbx_CheckedChanged); + // + // bttnComment + // + this.bttnComment.Enabled = false; + this.bttnComment.Location = new System.Drawing.Point(332, 3); + this.bttnComment.Name = "bttnComment"; + this.bttnComment.Size = new System.Drawing.Size(113, 22); + this.bttnComment.TabIndex = 5; + this.bttnComment.Text = "Add comment"; + this.bttnComment.UseVisualStyleBackColor = true; + this.bttnComment.Click += new System.EventHandler(this.bttnComment_Click); + // + // flowLayoutPanel4 + // + this.flowLayoutPanel4.Controls.Add(this.lblOutputX); + this.flowLayoutPanel4.Controls.Add(this.txtbxOutputX); + this.flowLayoutPanel4.Controls.Add(this.lblOutputY); + this.flowLayoutPanel4.Controls.Add(this.txtbxOutputY); + this.flowLayoutPanel4.Controls.Add(this.lblOutputWidth); + this.flowLayoutPanel4.Controls.Add(this.txtbxOutputWidth); + this.flowLayoutPanel4.Controls.Add(this.lblOutputHeight); + this.flowLayoutPanel4.Controls.Add(this.txtbxOutputHeight); + this.flowLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel4.Location = new System.Drawing.Point(3, 33); + this.flowLayoutPanel4.Name = "flowLayoutPanel4"; + this.flowLayoutPanel4.Size = new System.Drawing.Size(478, 24); + this.flowLayoutPanel4.TabIndex = 10; // // lblOutputX // + this.lblOutputX.Anchor = System.Windows.Forms.AnchorStyles.None; this.lblOutputX.AutoSize = true; - this.lblOutputX.Location = new System.Drawing.Point(11, 16); + this.lblOutputX.Location = new System.Drawing.Point(3, 6); this.lblOutputX.Name = "lblOutputX"; this.lblOutputX.Size = new System.Drawing.Size(20, 13); this.lblOutputX.TabIndex = 17; this.lblOutputX.Text = "X :"; // - // lblOutputWidth - // - this.lblOutputWidth.AutoSize = true; - this.lblOutputWidth.Location = new System.Drawing.Point(135, 16); - this.lblOutputWidth.Name = "lblOutputWidth"; - this.lblOutputWidth.Size = new System.Drawing.Size(41, 13); - this.lblOutputWidth.TabIndex = 21; - this.lblOutputWidth.Text = "Width :"; - // // txtbxOutputX // - this.txtbxOutputX.Location = new System.Drawing.Point(37, 13); + this.txtbxOutputX.Anchor = System.Windows.Forms.AnchorStyles.None; + this.txtbxOutputX.Enabled = false; + this.txtbxOutputX.Location = new System.Drawing.Point(29, 3); this.txtbxOutputX.Name = "txtbxOutputX"; this.txtbxOutputX.Size = new System.Drawing.Size(30, 20); - this.txtbxOutputX.TabIndex = 0; - this.txtbxOutputX.TextChanged += new System.EventHandler(this.txtbxOutput_TextChanged); + this.txtbxOutputX.TabIndex = 6; + this.txtbxOutputX.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtbxOutput_KeyPress); // // lblOutputY // + this.lblOutputY.Anchor = System.Windows.Forms.AnchorStyles.None; this.lblOutputY.AutoSize = true; - this.lblOutputY.Location = new System.Drawing.Point(73, 16); + this.lblOutputY.Location = new System.Drawing.Point(65, 6); this.lblOutputY.Name = "lblOutputY"; this.lblOutputY.Size = new System.Drawing.Size(20, 13); this.lblOutputY.TabIndex = 19; this.lblOutputY.Text = "Y :"; // - // tsmiTest + // txtbxOutputY + // + this.txtbxOutputY.Anchor = System.Windows.Forms.AnchorStyles.None; + this.txtbxOutputY.Enabled = false; + this.txtbxOutputY.Location = new System.Drawing.Point(91, 3); + this.txtbxOutputY.Name = "txtbxOutputY"; + this.txtbxOutputY.Size = new System.Drawing.Size(30, 20); + this.txtbxOutputY.TabIndex = 7; + this.txtbxOutputY.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtbxOutput_KeyPress); + // + // lblOutputWidth + // + this.lblOutputWidth.Anchor = System.Windows.Forms.AnchorStyles.None; + this.lblOutputWidth.AutoSize = true; + this.lblOutputWidth.Location = new System.Drawing.Point(127, 6); + this.lblOutputWidth.Name = "lblOutputWidth"; + this.lblOutputWidth.Size = new System.Drawing.Size(41, 13); + this.lblOutputWidth.TabIndex = 21; + this.lblOutputWidth.Text = "Width :"; + // + // txtbxOutputWidth + // + this.txtbxOutputWidth.Anchor = System.Windows.Forms.AnchorStyles.None; + this.txtbxOutputWidth.Enabled = false; + this.txtbxOutputWidth.Location = new System.Drawing.Point(174, 3); + this.txtbxOutputWidth.Name = "txtbxOutputWidth"; + this.txtbxOutputWidth.Size = new System.Drawing.Size(30, 20); + this.txtbxOutputWidth.TabIndex = 8; + this.txtbxOutputWidth.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtbxOutput_KeyPress); + // + // lblOutputHeight // - this.tsmiTest.AutoToolTip = true; - this.tsmiTest.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.tsmiTest.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.lblOutputHeight.Anchor = System.Windows.Forms.AnchorStyles.None; + this.lblOutputHeight.AutoSize = true; + this.lblOutputHeight.Location = new System.Drawing.Point(210, 6); + this.lblOutputHeight.Name = "lblOutputHeight"; + this.lblOutputHeight.Size = new System.Drawing.Size(44, 13); + this.lblOutputHeight.TabIndex = 23; + this.lblOutputHeight.Text = "Height :"; + // + // txtbxOutputHeight + // + this.txtbxOutputHeight.Anchor = System.Windows.Forms.AnchorStyles.None; + this.txtbxOutputHeight.Enabled = false; + this.txtbxOutputHeight.Location = new System.Drawing.Point(260, 3); + this.txtbxOutputHeight.Name = "txtbxOutputHeight"; + this.txtbxOutputHeight.Size = new System.Drawing.Size(30, 20); + this.txtbxOutputHeight.TabIndex = 9; + this.txtbxOutputHeight.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtbxOutput_KeyPress); + // + // richEditOutputPtr + // + this.richEditOutputPtr.DetectUrls = false; + this.richEditOutputPtr.Dock = System.Windows.Forms.DockStyle.Fill; + this.richEditOutputPtr.Enabled = false; + this.richEditOutputPtr.Font = new System.Drawing.Font("MS PGothic", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); + this.richEditOutputPtr.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.richEditOutputPtr.Location = new System.Drawing.Point(3, 63); + this.richEditOutputPtr.MaxLength = 5000; + this.richEditOutputPtr.Name = "richEditOutputPtr"; + this.richEditOutputPtr.Size = new System.Drawing.Size(478, 181); + this.richEditOutputPtr.TabIndex = 10; + this.richEditOutputPtr.Text = ""; + this.richEditOutputPtr.KeyDown += new System.Windows.Forms.KeyEventHandler(this.richEditOutputPtr_KeyDown); + this.richEditOutputPtr.SelectionChanged += new System.EventHandler(this.richEditOutputPtr_SelectionChanged); + this.richEditOutputPtr.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.richEditOutputPtr_KeyPress); + this.richEditOutputPtr.TextChanged += new System.EventHandler(this.richEditOutputPtr_TextChanged); + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.AutoToolTip = true; + this.fileToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.OpenMenuItem, this.SaveMenuItem, this.SaveAsMenuItem, this.ExitMenuItem}); - this.tsmiTest.Name = "tsmiTest"; - this.tsmiTest.ShortcutKeyDisplayString = ""; - this.tsmiTest.Size = new System.Drawing.Size(37, 20); - this.tsmiTest.Text = "&File"; + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.ShortcutKeyDisplayString = ""; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); + this.fileToolStripMenuItem.Text = "&File"; // // OpenMenuItem // @@ -383,7 +617,7 @@ namespace VPScriptEditor this.OpenMenuItem.Name = "OpenMenuItem"; this.OpenMenuItem.ShortcutKeyDisplayString = ""; this.OpenMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); - this.OpenMenuItem.Size = new System.Drawing.Size(152, 22); + this.OpenMenuItem.Size = new System.Drawing.Size(146, 22); this.OpenMenuItem.Text = "&Open"; this.OpenMenuItem.Click += new System.EventHandler(this.OpenMenuItem_Click); // @@ -393,7 +627,7 @@ namespace VPScriptEditor this.SaveMenuItem.Enabled = false; this.SaveMenuItem.Name = "SaveMenuItem"; this.SaveMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); - this.SaveMenuItem.Size = new System.Drawing.Size(152, 22); + this.SaveMenuItem.Size = new System.Drawing.Size(146, 22); this.SaveMenuItem.Text = "&Save"; this.SaveMenuItem.Click += new System.EventHandler(this.SaveMenuItem_Click); // @@ -402,7 +636,7 @@ namespace VPScriptEditor this.SaveAsMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.SaveAsMenuItem.Enabled = false; this.SaveAsMenuItem.Name = "SaveAsMenuItem"; - this.SaveAsMenuItem.Size = new System.Drawing.Size(152, 22); + this.SaveAsMenuItem.Size = new System.Drawing.Size(146, 22); this.SaveAsMenuItem.Text = "S&ave as"; this.SaveAsMenuItem.Click += new System.EventHandler(this.SaveAsMenuItem_Click); // @@ -410,55 +644,147 @@ namespace VPScriptEditor // this.ExitMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.ExitMenuItem.Name = "ExitMenuItem"; - this.ExitMenuItem.Size = new System.Drawing.Size(152, 22); + this.ExitMenuItem.Size = new System.Drawing.Size(146, 22); this.ExitMenuItem.Text = "E&xit"; this.ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItem_Click); // // menu // this.menu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.tsmiTest}); + this.fileToolStripMenuItem, + this.editToolStripMenuItem, + this.aboutToolStripMenuItem}); this.menu.Location = new System.Drawing.Point(0, 0); this.menu.Name = "menu"; this.menu.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; - this.menu.Size = new System.Drawing.Size(961, 24); + this.menu.Size = new System.Drawing.Size(832, 24); this.menu.TabIndex = 5; this.menu.Text = "MenuStrip1"; // - // pnlOutput + // editToolStripMenuItem // - this.pnlOutput.Location = new System.Drawing.Point(632, 284); - this.pnlOutput.Name = "pnlOutput"; - this.pnlOutput.Size = new System.Drawing.Size(320, 240); - this.pnlOutput.TabIndex = 16; - this.pnlOutput.Paint += new System.Windows.Forms.PaintEventHandler(this.pnlOutput_Paint); + this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.wordWarpToolStripMenuItem}); + this.editToolStripMenuItem.Name = "editToolStripMenuItem"; + this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20); + this.editToolStripMenuItem.Text = "&Edit"; + // + // wordWarpToolStripMenuItem + // + this.wordWarpToolStripMenuItem.Checked = true; + this.wordWarpToolStripMenuItem.CheckOnClick = true; + this.wordWarpToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; + this.wordWarpToolStripMenuItem.Name = "wordWarpToolStripMenuItem"; + this.wordWarpToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W))); + this.wordWarpToolStripMenuItem.Size = new System.Drawing.Size(177, 22); + this.wordWarpToolStripMenuItem.Text = "Word warp"; + this.wordWarpToolStripMenuItem.CheckedChanged += new System.EventHandler(this.wordWarpToolStripMenuItem_CheckedChanged); + // + // aboutToolStripMenuItem + // + this.aboutToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.aboutToolStripMenuItem1}); + this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; + this.aboutToolStripMenuItem.Size = new System.Drawing.Size(24, 20); + this.aboutToolStripMenuItem.Text = "&?"; + // + // aboutToolStripMenuItem1 + // + this.aboutToolStripMenuItem1.Name = "aboutToolStripMenuItem1"; + this.aboutToolStripMenuItem1.ShortcutKeys = System.Windows.Forms.Keys.F1; + this.aboutToolStripMenuItem1.Size = new System.Drawing.Size(126, 22); + this.aboutToolStripMenuItem1.Text = "&About"; + this.aboutToolStripMenuItem1.Click += new System.EventHandler(this.aboutToolStripMenuItem1_Click); + // + // statusStrip + // + this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripStatusLabel1, + this.lblStatusProgress}); + this.statusStrip.Location = new System.Drawing.Point(0, 611); + this.statusStrip.Name = "statusStrip"; + this.statusStrip.Size = new System.Drawing.Size(832, 22); + this.statusStrip.TabIndex = 17; + this.statusStrip.Text = "statusStrip1"; + // + // toolStripStatusLabel1 + // + this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; + this.toolStripStatusLabel1.Size = new System.Drawing.Size(408, 17); + this.toolStripStatusLabel1.Spring = true; + this.toolStripStatusLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lblStatusProgress + // + this.lblStatusProgress.Name = "lblStatusProgress"; + this.lblStatusProgress.Size = new System.Drawing.Size(408, 17); + this.lblStatusProgress.Spring = true; + this.lblStatusProgress.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // pnlInput // - this.pnlInput.Location = new System.Drawing.Point(632, 33); + this.pnlInput.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pnlInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlInput.Location = new System.Drawing.Point(495, 6); + this.pnlInput.MinimumSize = new System.Drawing.Size(320, 240); this.pnlInput.Name = "pnlInput"; this.pnlInput.Size = new System.Drawing.Size(320, 240); this.pnlInput.TabIndex = 15; this.pnlInput.Paint += new System.Windows.Forms.PaintEventHandler(this.pnlInput_Paint); // + // richEditInputPtr + // + this.richEditInputPtr.BackColor = System.Drawing.SystemColors.Window; + this.richEditInputPtr.DetectUrls = false; + this.richEditInputPtr.Dock = System.Windows.Forms.DockStyle.Fill; + this.richEditInputPtr.Font = new System.Drawing.Font("MS PGothic", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); + this.richEditInputPtr.Location = new System.Drawing.Point(3, 33); + this.richEditInputPtr.Name = "richEditInputPtr"; + this.richEditInputPtr.Size = new System.Drawing.Size(478, 210); + this.richEditInputPtr.TabIndex = 5; + this.richEditInputPtr.Text = ""; + this.richEditInputPtr.SelectionChanged += new System.EventHandler(this.richEdit_SelectionChanged); + this.richEditInputPtr.TextChanged += new System.EventHandler(this.richEditInputPtr_TextChanged); + // + // pnlOutput + // + this.pnlOutput.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pnlOutput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlOutput.Location = new System.Drawing.Point(495, 6); + this.pnlOutput.MinimumSize = new System.Drawing.Size(320, 240); + this.pnlOutput.Name = "pnlOutput"; + this.pnlOutput.Size = new System.Drawing.Size(320, 240); + this.pnlOutput.TabIndex = 16; + this.pnlOutput.Paint += new System.Windows.Forms.PaintEventHandler(this.pnlOutput_Paint); + // // VPScriptEditor // - this.ClientSize = new System.Drawing.Size(961, 536); - this.Controls.Add(this.pnlOutput); - this.Controls.Add(this.pnlInput); - this.Controls.Add(this.grpbxOutput); - this.Controls.Add(this.grpbxInput); + this.ClientSize = new System.Drawing.Size(832, 633); + this.Controls.Add(this.tableLayoutPanel1); + this.Controls.Add(this.statusStrip); this.Controls.Add(this.menu); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MainMenuStrip = this.menu; this.Name = "VPScriptEditor"; - this.Text = "VPScriptEditor"; this.grpbxInput.ResumeLayout(false); - this.grpbxInput.PerformLayout(); + this.tableLayoutPanel2.ResumeLayout(false); + this.tableLayoutPanel3.ResumeLayout(false); + this.flowLayoutPanel2.ResumeLayout(false); + this.flowLayoutPanel2.PerformLayout(); + this.flowLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.PerformLayout(); + this.tableLayoutPanel1.ResumeLayout(false); this.grpbxOutput.ResumeLayout(false); - this.grpbxOutput.PerformLayout(); + this.tableLayoutPanel4.ResumeLayout(false); + this.tableLayoutPanel5.ResumeLayout(false); + this.flowLayoutPanel3.ResumeLayout(false); + this.flowLayoutPanel3.PerformLayout(); + this.flowLayoutPanel4.ResumeLayout(false); + this.flowLayoutPanel4.PerformLayout(); this.menu.ResumeLayout(false); this.menu.PerformLayout(); + this.statusStrip.ResumeLayout(false); + this.statusStrip.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -469,10 +795,10 @@ namespace VPScriptEditor private TextBox txtbxPointerNumber; private Button bttnPrevious; private Button bttnNext; - private TextBox txtbxInputPtr; + private CustomControl.MyRichTextBox richEditInputPtr; + private RichTextBox richEditOutputPtr; private GroupBox grpbxInput; private GroupBox grpbxOutput; - private TextBox txtbxOutputPtr; private Label lblInputX; private TextBox txtbxInputX; private TextBox txtbxInputY; @@ -493,12 +819,33 @@ namespace VPScriptEditor private Button bttnResize; private CustomControl.MyPanel pnlInput; private CustomControl.MyPanel pnlOutput; - private ToolStripMenuItem tsmiTest; + private ToolStripMenuItem fileToolStripMenuItem; private ToolStripMenuItem OpenMenuItem; private ToolStripMenuItem SaveMenuItem; private ToolStripMenuItem ExitMenuItem; private MenuStrip menu; - private ToolStripMenuItem SaveAsMenuItem; + private ToolStripMenuItem SaveAsMenuItem; + private StatusStrip statusStrip; + private TableLayoutPanel tableLayoutPanel1; + private TableLayoutPanel tableLayoutPanel2; + private TableLayoutPanel tableLayoutPanel3; + private FlowLayoutPanel flowLayoutPanel1; + private FlowLayoutPanel flowLayoutPanel2; + private TableLayoutPanel tableLayoutPanel4; + private TableLayoutPanel tableLayoutPanel5; + private FlowLayoutPanel flowLayoutPanel3; + private FlowLayoutPanel flowLayoutPanel4; + private ToolStripMenuItem editToolStripMenuItem; + private ToolStripMenuItem wordWarpToolStripMenuItem; + private ToolStripMenuItem aboutToolStripMenuItem; + private ToolStripMenuItem aboutToolStripMenuItem1; + private ToolStripStatusLabel toolStripStatusLabel1; + private CheckBox chkDone; + private CheckBox chkUnsure; + private Button bttnComment; + private ToolStripStatusLabel lblStatusProgress; + private Button bttnNextUntranslated; + private Button bttnNextUnsure; } } diff --git a/script-editor/MainForm.cs b/script-editor/MainForm.cs index 110eb61..fe1bcb0 100644 --- a/script-editor/MainForm.cs +++ b/script-editor/MainForm.cs @@ -6,13 +6,18 @@ using System.IO; using System.Text; using System.Text.RegularExpressions; using System.Windows.Forms; +using System.Xml; +using System.Xml.Serialization; +using tom; namespace VPScriptEditor { public partial class VPScriptEditor { private Pointer[] inputPtr, outputPtr; - private int currPointerNb; + private PointerAnnotation[] annotations; + private ITextDocument inDoc, outDoc; + private int currPointerNb, nbUndefinedPtr, nextUntranslatedPtr, nextUnsurePtr; private string outputFileName; private FontFile vpFont; private Bitmap conersBmp; @@ -26,40 +31,54 @@ namespace VPScriptEditor dfile.Close(); Stream imgStream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("VPScriptEditor.corners.png"); - if (imgStream == null) - throw new Exception("Can't open embedded image"); - + if (imgStream == null) throw new Exception("Can't open embedded image"); conersBmp = new Bitmap(imgStream); - this.ActiveControl = txtbxOutputPtr; + inDoc = getDocument(richEditInputPtr); + outDoc = getDocument(richEditOutputPtr); + + updateTitle(); + } + + [System.Runtime.InteropServices.DllImport("user32.dll", CharSet = System.Runtime.InteropServices.CharSet.Auto)] + private extern static IntPtr SendMessage(IntPtr hWnd, int msg, int wParam, out IntPtr lParam); + private const int WM_USER = 0x400, EM_GETOLEINTERFACE = WM_USER + 60; + private ITextDocument getDocument(RichTextBox rtb) + { + IntPtr iRichEditOle = IntPtr.Zero; + if (SendMessage(rtb.Handle, EM_GETOLEINTERFACE, 0, out iRichEditOle) == IntPtr.Zero) + throw new Exception("Can't access IRichEditOle object from RichTextBox"); + + return (ITextDocument)System.Runtime.InteropServices.Marshal.GetTypedObjectForIUnknown(iRichEditOle, typeof(tom.ITextDocument)); } private Pointer[] parseXML(String content) { Match match = Regex.Match(content.Replace("\r\n", "\n"), "^<roomscripts>\\n*((?:.|\\n)*?)(?:\\n\\n)?</roomscripts>\\n*$"); - if (!match.Success) - throw new Exception("Bad script format!"); + if (!match.Success) throw new Exception("Bad script format!"); MatchCollection matches = Regex.Matches(match.Groups[1].Value, "<ptr n=\"(\\d+)\" room=\"(.+?)\"/>\\n(<nowindowdetected/>|<window (type=\"fixed\"|x=\"(.+?)\" y=\"(.+?)\" width=\"(.+?)\" height=\"(.+?)\")/>)\\n((?:.|\\n)*?)(?=(?:\\n\\n<ptr n=\"\\d+\".*/>|$))"); + if (matches.Count == 0) throw new Exception("Void script!"); Pointer[] pointers = new Pointer[matches.Count]; for (int i = 0; i < matches.Count; i++) { int nb = int.Parse(matches[i].Groups[1].Value); + if (nb <= 0 || nb > matches.Count) throw new Exception("Pointer no " + nb + " out of range!"); - if (nb <= 0 || nb > matches.Count) - throw new Exception("Pointer no " + nb + " out of range!"); - - if (pointers[nb - 1] != null) - throw new Exception("Duplicate pointer no " + nb); - + if (pointers[nb - 1] != null) throw new Exception("Duplicate pointer no " + nb); pointers[nb - 1] = new Pointer(matches[i].Groups[2].Value, matches[i].Groups[5].Value.Length > 0 ? WindowType.Normal : (matches[i].Groups[4].Value.Length > 0 ? WindowType.Fixed : WindowType.None), matches[i].Groups[5].Value, matches[i].Groups[6].Value, matches[i].Groups[7].Value, matches[i].Groups[8].Value, matches[i].Groups[9].Value); } return pointers; } + private string getAnnotationFileName(string filename) + { + return Path.GetDirectoryName(filename) + "\\" + Path.GetFileNameWithoutExtension(filename) + ".annotation.xml"; + } + private void OpenMenuItem_Click(System.Object sender, System.EventArgs e) { StreamReader sr = null; @@ -72,31 +91,59 @@ namespace VPScriptEditor if (ofd.ShowDialog() != DialogResult.OK) return; - String origFileName = ofd.FileName; + String origFileName = ofd.FileName, outputFileName; sr = new StreamReader(ofd.OpenFile()); - inputPtr = parseXML(sr.ReadToEnd()); + Pointer[] inputPtr = parseXML(sr.ReadToEnd()); sr.Close(); ofd.Title = "Select *translated* script file"; while (true) - { if (ofd.ShowDialog() != DialogResult.OK) return; - - if ((outputFileName = ofd.FileName) == origFileName) - MessageBox.Show("Select a different file than the original script!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); else - { - sr = new StreamReader(ofd.OpenFile()); - outputPtr = parseXML(sr.ReadToEnd()); - break; - } + if ((outputFileName = ofd.FileName) == origFileName) + MessageBox.Show("Select a different file than the original script!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + else + break; + + sr = new StreamReader(ofd.OpenFile()); + Pointer[] outputPtr = parseXML(sr.ReadToEnd()); + sr.Close(); + if (outputPtr.Length != inputPtr.Length) throw new Exception("The two scripts don't contain same number of pointers"); + + String annotationFileName = getAnnotationFileName(outputFileName); + PointerAnnotation[] annotations; + if (System.IO.File.Exists(annotationFileName)) + { + XmlSerializer serializer = new XmlSerializer(typeof(PointerAnnotation[])); + sr = new StreamReader(annotationFileName); + annotations = (PointerAnnotation[])serializer.Deserialize(sr); } + else + { + MessageBox.Show("No annotation file found for " + Path.GetFileName(outputFileName) + "\nA new one will be created on next save", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); + annotations = new PointerAnnotation[inputPtr.Length]; + for (int i = 0; i < inputPtr.Length; i++) + annotations[i] = new PointerAnnotation(); + } + + this.inputPtr = inputPtr; + this.outputPtr = outputPtr; + this.outputFileName = outputFileName; + this.annotations = annotations; + + nbUndefinedPtr = 0; + foreach (PointerAnnotation pa in annotations) + if (pa.state == PointerState.Undefined) + nbUndefinedPtr++; + + toolStripStatusLabel1.Text = Path.GetFileName(outputFileName) + " successfully loaded"; } catch (Exception ex) { - MessageBox.Show(ex.Message); + MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; } finally { @@ -106,13 +153,64 @@ namespace VPScriptEditor initInterface(); } - public string[] getText(string input) + private void saveCurrentPointer() { - string input_new = Regex.Replace(Regex.Replace(input, "<st rep=\"(\\d+)\"/>(.+?)<rrep/>", new MatchEvaluator(delegate(Match m) { return new String(m.Groups[2].Value[0], int.Parse(m.Groups[1].Value)); })), "<.+?/>", ""); - return Regex.Split(input_new, "\r\n"); + outputPtr[currPointerNb].setVars(inputPtr[currPointerNb].rooms, inputPtr[currPointerNb].type, txtbxOutputX.Text, txtbxOutputY.Text, txtbxOutputWidth.Text, txtbxOutputHeight.Text, richEditOutputPtr.Text.Replace("\r\n", "\n")); + annotations[currPointerNb].state = chkDone.Checked ? PointerState.Done : (chkUnsure.Checked ? PointerState.Unsure : PointerState.Undefined); + } + + private bool saveOutput(string fileName) + { + saveCurrentPointer(); + + StreamWriter sw = null; + try + { + StringBuilder str = new StringBuilder("<roomscripts>\n\n"); + + for (int i = 0; i < outputPtr.Length; i++) + { + Pointer p = outputPtr[i]; + + str.Append("<ptr n=\"" + (i + 1) + "\" room=\"" + p.rooms + "\"/>\n"); + if (p.type == WindowType.None) + str.Append("<nowindowdetected/>"); + else + if (p.type == WindowType.Fixed) + str.Append("<window type=\"fixed\"/>"); + else + str.Append("<window x=\"" + p.x + "\" y=\"" + p.y + "\" width=\"" + p.width + "\" height=\"" + p.height + "\"/>"); + + str.Append("\n"); + str.Append(p.content.Replace("\r\n", "\n")); + str.Append("\n\n"); + } + + str.Append("</roomscripts>\n"); + + sw = new StreamWriter(fileName); + sw.Write(str); + sw.Close(); + + XmlSerializer serializer = new XmlSerializer(typeof(PointerAnnotation[])); + sw = new StreamWriter(getAnnotationFileName(fileName)); + serializer.Serialize(sw, annotations); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + return false; + } + finally + { + if (sw != null) sw.Close(); + } + + toolStripStatusLabel1.Text = "Last save on " + DateTime.Now.ToString(); + return true; } - public void updateInputPtr() + private void updateInputPtr() { Pointer p = inputPtr[currPointerNb]; @@ -121,151 +219,141 @@ namespace VPScriptEditor txtbxInputY.Text = p.y; txtbxInputWidth.Text = p.width; txtbxInputHeight.Text = p.height; - txtbxInputPtr.Text = p.content.Replace("\n", "\r\n"); + richEditInputPtr.Text = p.content; } - public void updateOutputPtr() + private void updateOutputPtr() { Pointer p = outputPtr[currPointerNb]; - txtbxOutputX.Text = p.x; txtbxOutputY.Text = p.y; txtbxOutputWidth.Text = p.width; txtbxOutputHeight.Text = p.height; - txtbxOutputPtr.Text = p.content.Replace("\n", "\r\n"); + richEditOutputPtr.Text = p.content; + txtbxOutputX.Enabled = txtbxOutputY.Enabled = txtbxOutputWidth.Enabled = txtbxOutputHeight.Enabled = bttnResize.Enabled = p.type == WindowType.Normal; + + PointerState ps = annotations[currPointerNb].state; + chkDone.CheckedChanged -= this.chkbx_CheckedChanged; + chkDone.Checked = ps == PointerState.Done; + chkDone.CheckedChanged += this.chkbx_CheckedChanged; + chkUnsure.CheckedChanged -= this.chkbx_CheckedChanged; + chkUnsure.Checked = ps == PointerState.Unsure; + chkUnsure.CheckedChanged += this.chkbx_CheckedChanged; + } - bttnResize.Enabled = p.type == WindowType.Normal; + private void updateCommentBttn() + { + bttnComment.Text = annotations[currPointerNb].comment == null ? "Add comment" : "View/Edit comment"; } - public void updateInterface() + private void updateInterface() { + nextUntranslatedPtr = searchPointer(PointerState.Undefined); + nextUnsurePtr = searchPointer(PointerState.Unsure); + bttnNext.Enabled = currPointerNb < inputPtr.Length - 1; bttnPrevious.Enabled = currPointerNb > 0; + bttnNextUntranslated.Enabled = nextUntranslatedPtr != -1; + bttnNextUnsure.Enabled = nextUnsurePtr != -1; txtbxPointerNumber.Text = Convert.ToString(currPointerNb + 1); updateInputPtr(); updateOutputPtr(); + updateCommentBttn(); pnlInput.Invalidate(); pnlOutput.Invalidate(); } - public void updateTitle() + private void updateTitle() { - this.Text = "VPScriptEditor - " + Path.GetFileName(outputFileName); + this.Text = AboutBox.AssemblyProduct + (outputFileName != null ? " - " + Path.GetFileName(outputFileName) : ""); } - public void initInterface() + private void updateStatusProgress() + { + lblStatusProgress.Text = (inputPtr.Length - nbUndefinedPtr) + "/" + inputPtr.Length; + } + + private void initInterface() { currPointerNb = 0; - txtbxPointerNumber.Enabled = true; - bttnReset.Enabled = true; - SaveMenuItem.Enabled = SaveAsMenuItem.Enabled = true; + txtbxPointerNumber.Enabled = bttnReset.Enabled = SaveMenuItem.Enabled = SaveAsMenuItem.Enabled = chkDone.Enabled = chkUnsure.Enabled = bttnComment.Enabled = richEditOutputPtr.Enabled = true; updateInterface(); updateTitle(); - } + updateStatusProgress(); - private void bttnNext_Click(System.Object sender, System.EventArgs e) - { - saveCurrentPointer(); - ++currPointerNb; - updateInterface(); + ActiveControl = richEditOutputPtr; } - private void bttnPrevious_Click(System.Object sender, System.EventArgs e) + private int searchPointer(PointerState ps) { - saveCurrentPointer(); - --currPointerNb; - updateInterface(); - } + for (int i = 1; i < annotations.Length; i++) + if (annotations[(currPointerNb + i) % annotations.Length].state == ps) + return (currPointerNb + i) % annotations.Length; - private void bttnReset_Click(System.Object sender, System.EventArgs e) - { - outputPtr[currPointerNb] = new Pointer(inputPtr[currPointerNb]); - updateOutputPtr(); + return -1; } - private void ExitMenuItem_Click(System.Object sender, System.EventArgs e) + private void gotoPointer(int nb) { - Application.Exit(); + saveCurrentPointer(); + currPointerNb = nb; + updateInterface(); } - private void gotoPointer() + private void txtbxPointerNumber_KeyPress(object sender, KeyPressEventArgs e) { - saveCurrentPointer(); - - try + if (e.KeyChar == (char)Keys.Return) { - int nb = int.Parse(txtbxPointerNumber.Text); - if (nb > 0 && nb <= inputPtr.Length) - currPointerNb = nb - 1; + e.Handled = true; + int nb; + if (int.TryParse(txtbxPointerNumber.Text, out nb) && nb > 0 && nb <= inputPtr.Length) + gotoPointer(nb - 1); else { MessageBox.Show("Pointer out of range. Please enter a number between 1 and " + inputPtr.Length + ".", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); - return; + txtbxPointerNumber.Text = System.Convert.ToString(currPointerNb + 1); } } - catch (System.FormatException) - { - MessageBox.Show("Incorrect pointer number", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); - return; - } - finally - { - txtbxPointerNumber.Text = System.Convert.ToString(currPointerNb + 1); - } - - updateInterface(); } - private bool saveOutputXML(string fileName) + private void bttnPrevious_Click(System.Object sender, System.EventArgs e) { - saveCurrentPointer(); - - StreamWriter sw = null; - try - { - StringBuilder str = new StringBuilder("<roomscripts>\n\n"); - - for (int i = 0; i < outputPtr.Length; i++) - { - Pointer p = outputPtr[i]; + gotoPointer(currPointerNb - 1); + } - str.Append("<ptr n=\"" + (i + 1) + "\" room=\"" + p.rooms + "\"/>\n"); - if (p.type == WindowType.None) - str.Append("<nowindowdetected/>"); - else - if (p.type == WindowType.Fixed) - str.Append("<window type=\"fixed\"/>"); - else - str.Append("<window x=\"" + p.x + "\" y=\"" + p.y + "\" width=\"" + p.width + "\" height=\"" + p.height + "\"/>"); + private void bttnNext_Click(System.Object sender, System.EventArgs e) + { + gotoPointer(currPointerNb + 1); + } + + private void bttnNextUntranslated_Click(object sender, EventArgs e) + { + gotoPointer(nextUntranslatedPtr); + } - str.Append("\n"); - str.Append(p.content.Replace("\r\n", "\n")); - str.Append("\n\n"); - } + private void bttnNextUnsure_Click(object sender, EventArgs e) + { + gotoPointer(nextUnsurePtr); + } - str.Append("</roomscripts>\n"); + private void bttnReset_Click(System.Object sender, System.EventArgs e) + { + outputPtr[currPointerNb].copyFrom(inputPtr[currPointerNb]); + chkDone.Checked = chkUnsure.Checked = false; + updateOutputPtr(); + } - sw = new StreamWriter(fileName); - sw.Write(str); - } - catch (Exception ex) - { - MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - return false; - } - finally - { - if (sw != null) sw.Close(); - } - return true; + private void ExitMenuItem_Click(System.Object sender, System.EventArgs e) + { + Application.Exit(); } private void SaveMenuItem_Click(System.Object sender, System.EventArgs e) { - saveOutputXML(outputFileName); + saveOutput(outputFileName); } private void SaveAsMenuItem_Click(object sender, EventArgs e) @@ -277,95 +365,89 @@ namespace VPScriptEditor if (sfd.ShowDialog() != DialogResult.OK) return; - if (saveOutputXML(sfd.FileName)) + if (saveOutput(sfd.FileName)) { outputFileName = sfd.FileName; updateTitle(); } } - public void saveCurrentPointer() + private void colorizeRichEdit(ITextDocument itd) { - outputPtr[currPointerNb] = new Pointer(inputPtr[currPointerNb].rooms, inputPtr[currPointerNb].type, txtbxOutputX.Text, txtbxOutputY.Text, txtbxOutputWidth.Text, txtbxOutputHeight.Text, txtbxOutputPtr.Text.Replace("\r\n", "\n")); - } + itd.Freeze(); + itd.Undo((int)tomConstants.tomSuspend); - private void bttnResize_Click(System.Object sender, System.EventArgs e) - { - String[] text = getText(txtbxOutputPtr.Text); - int w = 0, h = 0; + ITextRange r = itd.Range(0, 0); + r.MoveEnd((int)tomConstants.tomCharacter, r.StoryLength); + r.Font.ForeColor = 0; - for (int j = 0; j <= text.Length - 1; j++) + MatchCollection matches = Regex.Matches(r.Text, "<(.*?)/>"); + for (int i = 0; i < matches.Count; i++) { - int curr_w = 0; - - foreach (char ch in text[j]) - try - { - curr_w += vpFont.getSymbolWidth(ch); - } - catch (System.Collections.Generic.KeyNotFoundException ex) { } - - w = curr_w > w ? curr_w : w; - h += 14; + r.Start = matches[i].Groups[0].Index; + r.End = r.Start + matches[i].Groups[0].Length; + r.Font.ForeColor = 0xFF; } - txtbxOutputWidth.Text = System.Convert.ToString(w); - txtbxOutputHeight.Text = System.Convert.ToString(h); + itd.Undo((int)tomConstants.tomResume); + itd.Unfreeze(); + } - pnlOutput.Invalidate(); + private void parseScriptLines(string[] input, int a, int b) + { + for (int i = a; i < b; i++) + input[i] = Regex.Replace(Regex.Replace(input[i], "<st rep=\"(\\d+)\"/>(.+?)<rrep/>", new MatchEvaluator(delegate(Match m) { return new String(m.Groups[2].Value[0], int.Parse(m.Groups[1].Value)); })), "<.+?/>", ""); } - private Bitmap drawPointer(String[] text, string xStr, string yStr, string wStr, string hStr) + private static bool isNewTag(String s) { return s == "<new/>"; } + + private Bitmap drawPointer(RichTextBox rtb, string xStr, string yStr, string wStr, string hStr) { + String[] text = Regex.Split(rtb.Text, "\n"); + int currLineNb = Regex.Matches(rtb.Text.Substring(0, rtb.SelectionStart), "\\n").Count; + + int begLineNb = Array.FindLastIndex(text, currLineNb, isNewTag) + 1, endLineNb = Array.FindIndex(text, currLineNb + 1, isNewTag); + if (endLineNb < 0) endLineNb = text.Length; + parseScriptLines(text, begLineNb, endLineNb); + Bitmap bmp = new Bitmap(320, 240, PixelFormat.Format32bppArgb); Graphics gBmp = Graphics.FromImage(bmp); gBmp.CompositingMode = CompositingMode.SourceOver; gBmp.FillRectangle(Brushes.White, 0, 0, bmp.Width, bmp.Height); - int x_base, x_curr, y_curr; + int x_base, y_curr, h, w; - try - { - x_base = x_curr = int.Parse(xStr); - y_curr = int.Parse(yStr); - } - catch (System.FormatException e) - { - x_curr = x_base = y_curr = 10; - } + if (!int.TryParse(xStr, out x_base) || !int.TryParse(yStr, out y_curr)) + x_base = y_curr = 10; - try + if (int.TryParse(wStr, out w) && int.TryParse(hStr, out h)) { - int h = int.Parse(hStr), w = int.Parse(wStr); - SolidBrush innerBrush = new SolidBrush(Color.FromArgb(248, 216, 96)), outerBrush = new SolidBrush(Color.FromArgb(88, 64, 8)); - - gBmp.FillRectangle(outerBrush, x_curr - 8, y_curr, 1, h); - gBmp.FillRectangle(innerBrush, x_curr - 7, y_curr, 2, h); - gBmp.FillRectangle(outerBrush, x_curr - 2, y_curr - 7, w + 5, 1); - gBmp.FillRectangle(innerBrush, x_curr - 2, y_curr - 6, w + 5, 2); - gBmp.FillRectangle(outerBrush, x_curr + w + 9, y_curr, 1, h); - gBmp.FillRectangle(innerBrush, x_curr + w + 7, y_curr, 2, h); - gBmp.FillRectangle(outerBrush, x_curr - 2, y_curr + h + 6, w + 5, 1); - gBmp.FillRectangle(innerBrush, x_curr - 2, y_curr + h + 4, w + 5, 2); - - gBmp.DrawImage(conersBmp, x_curr - 8, y_curr - 7, new Rectangle(0, 0, 7, 7), GraphicsUnit.Pixel); - gBmp.DrawImage(conersBmp, x_curr - 8, y_curr + h, new Rectangle(0, 7, 7, 7), GraphicsUnit.Pixel); - gBmp.DrawImage(conersBmp, x_curr + w + 3, y_curr - 7, new Rectangle(7, 0, 7, 7), GraphicsUnit.Pixel); - gBmp.DrawImage(conersBmp, x_curr + w + 3, y_curr + h, new Rectangle(7, 7, 7, 7), GraphicsUnit.Pixel); + gBmp.FillRectangle(outerBrush, x_base - 8, y_curr, 1, h); + gBmp.FillRectangle(innerBrush, x_base - 7, y_curr, 2, h); + gBmp.FillRectangle(outerBrush, x_base - 2, y_curr - 7, w + 5, 1); + gBmp.FillRectangle(innerBrush, x_base - 2, y_curr - 6, w + 5, 2); + gBmp.FillRectangle(outerBrush, x_base + w + 9, y_curr, 1, h); + gBmp.FillRectangle(innerBrush, x_base + w + 7, y_curr, 2, h); + gBmp.FillRectangle(outerBrush, x_base - 2, y_curr + h + 6, w + 5, 1); + gBmp.FillRectangle(innerBrush, x_base - 2, y_curr + h + 4, w + 5, 2); + + gBmp.DrawImage(conersBmp, x_base - 8, y_curr - 7, new Rectangle(0, 0, 7, 7), GraphicsUnit.Pixel); + gBmp.DrawImage(conersBmp, x_base - 8, y_curr + h, new Rectangle(0, 7, 7, 7), GraphicsUnit.Pixel); + gBmp.DrawImage(conersBmp, x_base + w + 3, y_curr - 7, new Rectangle(7, 0, 7, 7), GraphicsUnit.Pixel); + gBmp.DrawImage(conersBmp, x_base + w + 3, y_curr + h, new Rectangle(7, 7, 7, 7), GraphicsUnit.Pixel); } - catch (System.FormatException e) { } - for (int j = 0; j <= text.Length - 1; j++) + int x_curr = x_base; + for (int j = begLineNb; j < endLineNb; j++) { foreach (char ch in text[j]) - try + if (vpFont.containsSymbol(ch)) { gBmp.DrawImage(vpFont.getBitmap(ch), x_curr, y_curr); x_curr += vpFont.getSymbolWidth(ch); } - catch (System.Collections.Generic.KeyNotFoundException e) { } x_curr = x_base; y_curr += 14; @@ -376,35 +458,131 @@ namespace VPScriptEditor private void pnlInput_Paint(object sender, PaintEventArgs e) { - e.Graphics.DrawImage(drawPointer(getText(txtbxInputPtr.Text), txtbxInputX.Text, txtbxInputY.Text, txtbxInputWidth.Text, txtbxInputHeight.Text), 0, 0); + e.Graphics.DrawImage(drawPointer(richEditInputPtr, txtbxInputX.Text, txtbxInputY.Text, txtbxInputWidth.Text, txtbxInputHeight.Text), 0, 0); } private void pnlOutput_Paint(object sender, PaintEventArgs e) { - e.Graphics.DrawImage(drawPointer(getText(txtbxOutputPtr.Text), txtbxOutputX.Text, txtbxOutputY.Text, txtbxOutputWidth.Text, txtbxOutputHeight.Text), 0, 0); + e.Graphics.DrawImage(drawPointer(richEditOutputPtr, txtbxOutputX.Text, txtbxOutputY.Text, txtbxOutputWidth.Text, txtbxOutputHeight.Text), 0, 0); } - private void txtbxOutput_TextChanged(object sender, EventArgs e) + private void richEdit_SelectionChanged(object sender, EventArgs e) + { + ((RichTextBox)sender == richEditInputPtr ? pnlInput : pnlOutput).Invalidate(); + } + + private void richEditInputPtr_TextChanged(object sender, EventArgs e) + { + colorizeRichEdit(inDoc); + } + + private void richEditOutputPtr_SelectionChanged(object sender, EventArgs e) { pnlOutput.Invalidate(); } - private void txtbxPointerNumber_KeyPress(object sender, KeyPressEventArgs e) + private void richEditOutputPtr_TextChanged(object sender, EventArgs e) { - if (e.KeyChar == (char)Keys.Return) + colorizeRichEdit(outDoc); + // simple trick to circumvent a stupid vertical scroll bug + richEditOutputPtr.SelectionStart = richEditOutputPtr.SelectionStart; + } + + private void richEditOutputPtr_KeyDown(object sender, KeyEventArgs e) + { + if ((e.Shift && e.KeyCode == Keys.Insert) || (e.Control && e.KeyCode == Keys.V)) { + richEditOutputPtr.Paste(DataFormats.GetFormat("Text")); e.Handled = true; - gotoPointer(); } + else + if ((e.Modifiers == Keys.None || e.Modifiers == Keys.Control) && e.KeyCode == Keys.Delete) + pnlOutput.Invalidate(); } - private void txtbxOutputPtr_KeyPress(object sender, KeyPressEventArgs e) + private void richEditOutputPtr_KeyPress(object sender, KeyPressEventArgs e) { - if (!vpFont.containsSymbol(e.KeyChar) && e.KeyChar >= ' ') + if (e.KeyChar >= ' ' && e.KeyChar != (char)Keys.F16 && !vpFont.containsSymbol(e.KeyChar)) { e.Handled = true; System.Media.SystemSounds.Beep.Play(); } } + + private void bttnResize_Click(System.Object sender, System.EventArgs e) + { + String[] text = Regex.Split(richEditOutputPtr.Text, "\n"); + int w = 0, h = 0, curr_h = 0; + + for (int j = 0; j < text.Length; j++) + if (isNewTag(text[j])) + { + h = Math.Max(curr_h, h); + curr_h = 0; + } + else + { + int curr_w = 0; + parseScriptLines(text, j, j + 1); + + foreach (char ch in text[j]) + if (vpFont.containsSymbol(ch)) + curr_w += vpFont.getSymbolWidth(ch); + + w = Math.Max(curr_w, w); + curr_h += 14; + } + + h = Math.Max(curr_h, h); + + txtbxOutputWidth.Text = System.Convert.ToString(w); + txtbxOutputHeight.Text = System.Convert.ToString(h); + + pnlOutput.Invalidate(); + } + + private void chkbx_CheckedChanged(object sender, EventArgs e) + { + CheckBox chk = (CheckBox)sender, chk2 = chk == chkDone ? chkUnsure : chkDone; + if (chk.Checked && chk2.Checked) + { + nbUndefinedPtr++; + chk2.Checked = false; + } + else + { + nbUndefinedPtr += (!chkDone.Checked && !chkUnsure.Checked ? 1 : -1); + updateStatusProgress(); + } + } + + private void bttnComment_Click(object sender, EventArgs e) + { + CommentForm cf = new CommentForm(currPointerNb, annotations[currPointerNb].comment); + cf.ShowDialog(); + annotations[currPointerNb].comment = cf.Comment; + updateCommentBttn(); + } + + private void txtbxOutput_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar == (char)Keys.Return) + { + e.Handled = true; + pnlOutput.Invalidate(); + } + } + + private void wordWarpToolStripMenuItem_CheckedChanged(object sender, EventArgs e) + { + richEditInputPtr.WordWrap = richEditOutputPtr.WordWrap = ((ToolStripMenuItem)sender).Checked; + inDoc = getDocument(richEditInputPtr); + outDoc = getDocument(richEditOutputPtr); + } + + private void aboutToolStripMenuItem1_Click(object sender, EventArgs e) + { + new AboutBox().ShowDialog(); + } } }
\ No newline at end of file diff --git a/script-editor/MainForm.resx b/script-editor/MainForm.resx index a35674e..512b0e8 100644 --- a/script-editor/MainForm.resx +++ b/script-editor/MainForm.resx @@ -120,6 +120,9 @@ <metadata name="menu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>22, 26</value> </metadata> + <metadata name="statusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>105, 26</value> + </metadata> <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> diff --git a/script-editor/MyPanel.cs b/script-editor/MyPanel.cs deleted file mode 100644 index 60d7a7b..0000000 --- a/script-editor/MyPanel.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Windows.Forms; - -namespace CustomControl -{ - public class MyPanel : Panel - { - protected override void OnPaintBackground(PaintEventArgs pevent) - { - } - } -} diff --git a/script-editor/Pointer.cs b/script-editor/Pointer.cs index 73a050c..24aa7d9 100644 --- a/script-editor/Pointer.cs +++ b/script-editor/Pointer.cs @@ -1,9 +1,25 @@ -using System; -using System.Collections.Generic; -using System.Text; +using System.Xml.Serialization; namespace VPScriptEditor { + public enum PointerState { Undefined, Unsure, Done }; + + public class PointerAnnotation + { + [XmlElement("State")] + public PointerState state; + [XmlElement("Comment")] + public string comment; + + public PointerAnnotation() : this(PointerState.Undefined, null) { } + + public PointerAnnotation(PointerState state, string comment) + { + this.state = state; + this.comment = comment; + } + } + public enum WindowType { Normal, Fixed, None }; public class Pointer @@ -11,10 +27,18 @@ namespace VPScriptEditor public string rooms, x, y, width, height, content; public WindowType type; - public Pointer(Pointer p) : this(p.rooms, p.type, p.x, p.y, p.width, p.height, p.content) { } - public Pointer(string rooms, WindowType type, string x, string y, string width, string height, string content) { + setVars(rooms, type, x, y, width, height, content); + } + + public void copyFrom(Pointer p) + { + setVars(p.rooms, p.type, p.x, p.y, p.width, p.height, p.content); + } + + public void setVars(string rooms, WindowType type, string x, string y, string width, string height, string content) + { this.rooms = rooms; this.type = type; diff --git a/script-editor/Properties/AssemblyInfo.cs b/script-editor/Properties/AssemblyInfo.cs index dc2b223..c29719e 100644 --- a/script-editor/Properties/AssemblyInfo.cs +++ b/script-editor/Properties/AssemblyInfo.cs @@ -17,7 +17,7 @@ using System.Windows.Forms; [ assembly: AssemblyDescription( "" ) ] [ assembly: AssemblyCompany( "" ) ] [ assembly: AssemblyProduct( "VPScriptEditor" ) ] -[ assembly: AssemblyCopyright( "Copyright © 2009" ) ] +[assembly: AssemblyCopyright("Copyright (C) 2009 Jes, Pixel, Vadd_VII")] [ assembly: AssemblyTrademark( "" ) ] [ assembly: ComVisible( false ) ] @@ -36,6 +36,6 @@ using System.Windows.Forms; // en utilisant '*', comme indiqué ci-dessous : // <Assembly: AssemblyVersion("1.0.*")> -[ assembly: AssemblyVersion( "1.0.0.0" ) ] +[assembly: AssemblyVersion("0.8.0.*")] [ assembly: AssemblyFileVersion( "1.0.0.0" ) ] diff --git a/script-editor/VPScriptEditor_CS.csproj b/script-editor/VPScriptEditor_CS.csproj index 2b8c394..e155850 100644 --- a/script-editor/VPScriptEditor_CS.csproj +++ b/script-editor/VPScriptEditor_CS.csproj @@ -67,7 +67,19 @@ <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> - <Compile Include="MyPanel.cs"> + <Compile Include="AboutBox.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="AboutBox.Designer.cs"> + <DependentUpon>AboutBox.cs</DependentUpon> + </Compile> + <Compile Include="CommentForm.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="CommentForm.Designer.cs"> + <DependentUpon>CommentForm.cs</DependentUpon> + </Compile> + <Compile Include="CustomControl.cs"> <SubType>Component</SubType> </Compile> <Compile Include="Pointer.cs" /> @@ -99,6 +111,12 @@ </EmbeddedResource> </ItemGroup> <ItemGroup> + <EmbeddedResource Include="AboutBox.resx"> + <DependentUpon>AboutBox.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="CommentForm.resx"> + <DependentUpon>CommentForm.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="MainForm.resx"> <DependentUpon>MainForm.cs</DependentUpon> </EmbeddedResource> @@ -118,4 +136,14 @@ <Install>true</Install> </BootstrapperPackage> </ItemGroup> + <ItemGroup> + <COMReference Include="tom"> + <Guid>{8CC497C9-A1DF-11CE-8098-00AA0047BE5D}</Guid> + <VersionMajor>1</VersionMajor> + <VersionMinor>0</VersionMinor> + <Lcid>0</Lcid> + <WrapperTool>tlbimp</WrapperTool> + <Isolated>False</Isolated> + </COMReference> + </ItemGroup> </Project>
\ No newline at end of file |