From 7d308772cf08bd97081ecc8996d6033c018dc99b Mon Sep 17 00:00:00 2001 From: dimentox Date: Thu, 29 Apr 2010 03:23:31 +0000 Subject: [PATCH] Initial import git-svn-id: https://lsleditor.svn.sourceforge.net/svnroot/lsleditor@1 3f4676ac-adda-40fd-8265-58d1435b1672 --- About.Designer.cs | 145 + About.cs | 80 + About.resx | 120 + BZip2Decompress/BZip2.cs | 24 + BZip2Decompress/BZip2Constants.cs | 122 + BZip2Decompress/BZip2InputStream.cs | 924 ++++ BZip2Decompress/IChecksum.cs | 93 + BZip2Decompress/MD5Verify.cs | 18 + BZip2Decompress/StrangeCrc.cs | 207 + Browser.Designer.cs | 81 + Browser.cs | 179 + Browser.resx | 123 + BugReport/BugReportForm.Designer.cs | 437 ++ BugReport/BugReportForm.cs | 298 ++ BugReport/BugReportForm.resx | 129 + BugReport/UploadBugReport.cs | 222 + Decompressor/Decompress.cs | 97 + Decompressor/ZipEntry.cs | 371 ++ EditForm.Designer.cs | 113 + EditForm.cs | 449 ++ EditForm.resx | 126 + Editor/GListBox.Designer.cs | 36 + Editor/GListBox.cs | 152 + Editor/GListBoxWindow.Designer.cs | 64 + Editor/GListBoxWindow.cs | 177 + Editor/GListBoxWindow.resx | 120 + Editor/KeyWords.cs | 410 ++ Editor/MsXsltContext.cs | 43 + Editor/Numbered.Designer.cs | 37 + Editor/Numbered.cs | 142 + Editor/NumberedTextBoxUC.cs | 83 + Editor/NumberedTextBoxUC.designer.cs | 106 + Editor/NumberedTextBoxUC.resx | 120 + Editor/RichLabel.Designer.cs | 42 + Editor/RichLabel.cs | 272 ++ Editor/RichLabel.resx | 120 + Editor/RoundCorners.cs | 189 + Editor/SyntaxRichTextBox.cs | 2078 ++++++++ Editor/SyntaxRichTextBox.resx | 42 + Editor/TooltipWindow.cs | 162 + Editor/TooltipWindow.designer.cs | 62 + Editor/TooltipWindow.resx | 120 + FindWindow.Designer.cs | 212 + FindWindow.cs | 315 ++ FindWindow.resx | 120 + Form1.cs | 1109 +++++ Form1.resx | 348 ++ GotoWindow.Designer.cs | 104 + GotoWindow.cs | 98 + GotoWindow.resx | 120 + Helpers/AutoFormatter.cs | 373 ++ Helpers/CodeCompletion.cs | 105 + Helpers/CompilerHelper.cs | 145 + Helpers/FileAssociator.cs | 115 + Helpers/GetTemplate.cs | 71 + Helpers/GroupboxEvent.cs | 190 + Helpers/GroupboxEvent.resx | 130 + Helpers/HTTPRequest.cs | 204 + Helpers/LSL2CSharp.cs | 642 +++ Helpers/Measure.cs | 70 + Helpers/OopsFormatter.cs | 66 + Helpers/PrinterHelper.cs | 703 +++ Helpers/SendMyKeys.cs | 273 ++ Helpers/Settings.cs | 71 + Helpers/SmtpClient.cs | 355 ++ Helpers/TabControlExtended.Designer.cs | 28 + Helpers/TabControlExtended.cs | 249 + Helpers/TaskQueue.cs | 263 ++ Helpers/WebRequestClass.cs | 251 + Helpers/XMLRPC.cs | 322 ++ Icons/ADDITEM.GIF | Bin 0 -> 192 bytes Icons/COPY.GIF | Bin 0 -> 115 bytes Icons/CUT.GIF | Bin 0 -> 99 bytes Icons/DEINDENT.GIF | Bin 0 -> 93 bytes Icons/DELETE.GIF | Bin 0 -> 96 bytes Icons/END.GIF | Bin 0 -> 75 bytes Icons/FIND.GIF | Bin 0 -> 111 bytes Icons/ININDENT.GIF | Bin 0 -> 93 bytes Icons/NEWDOC.GIF | Bin 0 -> 102 bytes Icons/NEWPROJ.GIF | Bin 0 -> 342 bytes Icons/OPEN.GIF | Bin 0 -> 131 bytes Icons/PASTE.GIF | Bin 0 -> 144 bytes Icons/PRINT.GIF | Bin 0 -> 129 bytes Icons/PROJECT.GIF | Bin 0 -> 149 bytes Icons/PROPS.GIF | Bin 0 -> 122 bytes Icons/REDO.GIF | Bin 0 -> 87 bytes Icons/SAVE.GIF | Bin 0 -> 119 bytes Icons/SAVEALL.GIF | Bin 0 -> 125 bytes Icons/SAVEAS.GIF | Bin 0 -> 125 bytes Icons/START.GIF | Bin 0 -> 73 bytes Icons/UNDO.GIF | Bin 0 -> 85 bytes Images/Class.gif | Bin 0 -> 150 bytes Images/Close-Active.gif | Bin 0 -> 1012 bytes Images/Close-Disabled.gif | Bin 0 -> 598 bytes Images/Close-Inactive.gif | Bin 0 -> 1016 bytes Images/Constants.gif | Bin 0 -> 88 bytes Images/Enum.gif | Bin 0 -> 110 bytes Images/Events.gif | Bin 0 -> 80 bytes Images/Functions.gif | Bin 0 -> 109 bytes Images/Namespace.gif | Bin 0 -> 74 bytes Images/Properties.gif | Bin 0 -> 113 bytes Images/SealedClass.gif | Bin 0 -> 127 bytes Images/Thumbs.db | Bin 0 -> 18432 bytes Images/Unknown.gif | Bin 0 -> 55 bytes Images/Vars.gif | Bin 0 -> 110 bytes Images/logo.gif | Bin 0 -> 6455 bytes ImagesSolutionExplorer/Animation.gif | Bin 0 -> 129 bytes ImagesSolutionExplorer/Animations.gif | Bin 0 -> 1030 bytes ImagesSolutionExplorer/Body Parts.gif | Bin 0 -> 166 bytes ImagesSolutionExplorer/Calling Cards.gif | Bin 0 -> 162 bytes ImagesSolutionExplorer/Clothes.gif | Bin 0 -> 230 bytes ImagesSolutionExplorer/Eyes.gif | Bin 0 -> 375 bytes ImagesSolutionExplorer/Folder.gif | Bin 0 -> 126 bytes ImagesSolutionExplorer/Gesture.gif | Bin 0 -> 136 bytes ImagesSolutionExplorer/Gestures.gif | Bin 0 -> 1023 bytes ImagesSolutionExplorer/Gloves.gif | Bin 0 -> 591 bytes ImagesSolutionExplorer/Hair.gif | Bin 0 -> 128 bytes ImagesSolutionExplorer/Inventory.gif | Bin 0 -> 126 bytes ImagesSolutionExplorer/Jacket.gif | Bin 0 -> 249 bytes ImagesSolutionExplorer/Landmark.gif | Bin 0 -> 154 bytes ImagesSolutionExplorer/Landmarks.gif | Bin 0 -> 1023 bytes ImagesSolutionExplorer/Lost And Found.gif | Bin 0 -> 165 bytes ImagesSolutionExplorer/Notecard.gif | Bin 0 -> 342 bytes ImagesSolutionExplorer/Notecards.gif | Bin 0 -> 1022 bytes ImagesSolutionExplorer/Object.gif | Bin 0 -> 1027 bytes ImagesSolutionExplorer/Objects.gif | Bin 0 -> 166 bytes ImagesSolutionExplorer/Pants.gif | Bin 0 -> 224 bytes ImagesSolutionExplorer/Photo Album.gif | Bin 0 -> 347 bytes ImagesSolutionExplorer/Prim.gif | Bin 0 -> 1027 bytes ImagesSolutionExplorer/Project.gif | Bin 0 -> 353 bytes ImagesSolutionExplorer/Script.gif | Bin 0 -> 170 bytes ImagesSolutionExplorer/Scripts.gif | Bin 0 -> 600 bytes ImagesSolutionExplorer/Shape.gif | Bin 0 -> 1035 bytes ImagesSolutionExplorer/Shirt.gif | Bin 0 -> 587 bytes ImagesSolutionExplorer/Shoes.gif | Bin 0 -> 334 bytes ImagesSolutionExplorer/Skin.gif | Bin 0 -> 125 bytes ImagesSolutionExplorer/Skirt.gif | Bin 0 -> 595 bytes ImagesSolutionExplorer/Snapshot.gif | Bin 0 -> 1070 bytes ImagesSolutionExplorer/Socks.gif | Bin 0 -> 160 bytes ImagesSolutionExplorer/Solution.gif | Bin 0 -> 1046 bytes ImagesSolutionExplorer/Sound.gif | Bin 0 -> 317 bytes ImagesSolutionExplorer/Sounds.gif | Bin 0 -> 171 bytes ImagesSolutionExplorer/Texture.gif | Bin 0 -> 591 bytes ImagesSolutionExplorer/Textures.gif | Bin 0 -> 1024 bytes ImagesSolutionExplorer/Trash.gif | Bin 0 -> 357 bytes ImagesSolutionExplorer/Underpants.gif | Bin 0 -> 224 bytes ImagesSolutionExplorer/Undershirt.gif | Bin 0 -> 380 bytes ImagesSolutionExplorer/Unknown.gif | Bin 0 -> 986 bytes ImagesSolutionExplorer/question.gif | Bin 0 -> 986 bytes LSLEditor.RES | Bin 0 -> 68612 bytes LSLEditor.aps | Bin 0 -> 26284 bytes LSLEditor.rc | 5 + LSLEditorForm.Designer.cs | 1222 +++++ LSLEditorForm.cs | 1880 ++++++++ LSLEditorForm.resx | 348 ++ MakeZipFile.cmd | 13 + PermissionsForm.Designer.cs | 136 + PermissionsForm.cs | 112 + PermissionsForm.resx | 120 + Plugins/Generic.cs | 109 + Plugins/LSLint.cs | 189 + Plugins/Particles.cs | 74 + Plugins/Svn.cs | 148 + Properties/Resources.Designer.cs | 210 + Properties/Resources.resx | 184 + Properties/Settings.Designer.cs | 1225 +++++ Properties/Settings.settings | 356 ++ Resource/About.htm | 212 + Resource/App.ico | Bin 0 -> 11886 bytes Resource/AssemblyInfo.cs | 101 + Resource/ConfCSharp.xml | 102 + Resource/ConfLSL.xml | 4188 +++++++++++++++++ Resource/ReleaseNotes.htm | 1382 ++++++ Resource/Test.snk | Bin 0 -> 596 bytes Resource/ToolsOptions.xml | 30 + Resource/app.config | 139 + Resource/thanks.gif | Bin 0 -> 1164 bytes RuntimeConsole.Designer.cs | 228 + RuntimeConsole.cs | 412 ++ RuntimeConsole.resx | 123 + SecondLife/Float.cs | 272 ++ SecondLife/SecondLifeHst.cs | 948 ++++ SecondLife/SecondLifeMain.cs | 3800 +++++++++++++++ SecondLife/String.cs | 140 + SecondLife/integer.cs | 294 ++ SecondLife/key.cs | 170 + SecondLife/list.cs | 349 ++ SecondLife/rotation.cs | 281 ++ SecondLife/vector.cs | 292 ++ SimulatorConsole.Designer.cs | 181 + SimulatorConsole.cs | 410 ++ SimulatorConsole.resx | 123 + Solution/GuidProperty.Designer.cs | 115 + Solution/GuidProperty.cs | 89 + Solution/GuidProperty.resx | 120 + Solution/NewProject.Designer.cs | 205 + Solution/NewProject.cs | 158 + Solution/NewProject.resx | 123 + Solution/SolutionExplorer.cs | 2436 ++++++++++ Solution/SolutionExplorer.designer.cs | 118 + Solution/SolutionExplorer.resx | 120 + Solution/SvnAguments.Designer.cs | 139 + Solution/SvnAguments.cs | 107 + Solution/SvnAguments.resx | 120 + SyntaxError.Designer.cs | 166 + SyntaxError.cs | 183 + SyntaxError.resx | 175 + Tools/EnvironmentBrowser.Designer.cs | 74 + Tools/EnvironmentBrowser.cs | 65 + Tools/EnvironmentBrowser.resx | 120 + Tools/EnvironmentGeneral.Designer.cs | 231 + Tools/EnvironmentGeneral.cs | 103 + Tools/EnvironmentGeneral.resx | 120 + Tools/EnvironmentHelp.Designer.cs | 224 + Tools/EnvironmentHelp.cs | 135 + Tools/EnvironmentHelp.resx | 120 + Tools/EnvironmentPlugins.Designer.cs | 74 + Tools/EnvironmentPlugins.cs | 131 + Tools/EnvironmentPlugins.resx | 120 + Tools/ProjectSettings.Designer.cs | 126 + Tools/ProjectSettings.cs | 93 + Tools/ProjectSettings.resx | 123 + Tools/RuntimeExternal.Designer.cs | 129 + Tools/RuntimeExternal.cs | 71 + Tools/RuntimeExternal.resx | 120 + Tools/RuntimeGeneral.Designer.cs | 182 + Tools/RuntimeGeneral.cs | 77 + Tools/RuntimeGeneral.resx | 120 + Tools/RuntimeInternal.Designer.cs | 313 ++ Tools/RuntimeInternal.cs | 175 + Tools/RuntimeInternal.resx | 120 + Tools/RuntimeSmtp.Designer.cs | 274 ++ Tools/RuntimeSmtp.cs | 113 + Tools/RuntimeSmtp.resx | 120 + Tools/TextEditorCodeCompletion.Designer.cs | 113 + Tools/TextEditorCodeCompletion.cs | 70 + Tools/TextEditorCodeCompletion.resx | 120 + Tools/TextEditorFontColors.Designer.cs | 165 + Tools/TextEditorFontColors.cs | 125 + Tools/TextEditorFontColors.resx | 123 + Tools/TextEditorGeneral.Designer.cs | 297 ++ Tools/TextEditorGeneral.cs | 137 + Tools/TextEditorGeneral.resx | 120 + Tools/ToolsOptions.Designer.cs | 153 + Tools/ToolsOptions.cs | 162 + Tools/ToolsOptions.resx | 120 + Tools/VersionControlGeneral.Designer.cs | 160 + Tools/VersionControlGeneral.cs | 93 + Tools/VersionControlGeneral.resx | 123 + UpdateApplicationForm.Designer.cs | 173 + UpdateApplicationForm.cs | 448 ++ UpdateApplicationForm.resx | 120 + Web References/org.lsleditor.www/Reference.cs | 364 ++ .../org.lsleditor.www/Reference.map | 7 + .../org.lsleditor.www/Service1.disco | 6 + .../org.lsleditor.www/Service1.wsdl | 191 + _MakeRelease.cmd | 12 + _ReSharper.lsleditor/BuildScriptCache/.crc | 1 + .../BuildScriptCache/.version | Bin 0 -> 4 bytes .../BuildScriptCache/5/4680b305.dat | Bin 0 -> 80 bytes _ReSharper.lsleditor/ModuleIds.xml | 7 + _ReSharper.lsleditor/NamedArguments/.crc | 1 + _ReSharper.lsleditor/NamedArguments/.version | Bin 0 -> 4 bytes .../NamedArguments/5/4680b305.dat | Bin 0 -> 24541 bytes .../ProjectModel/ProjectModel.dat | Bin 0 -> 100 bytes _ReSharper.lsleditor/Resources/.crc | 1 + _ReSharper.lsleditor/Resources/.version | Bin 0 -> 4 bytes _ReSharper.lsleditor/Resources/5/626cc1d.dat | Bin 0 -> 3900 bytes _ReSharper.lsleditor/SymbolCache.bin | Bin 0 -> 74578 bytes _ReSharper.lsleditor/TagPrefixes/.crc | Bin 0 -> 4 bytes _ReSharper.lsleditor/TagPrefixes/.version | Bin 0 -> 4 bytes _ReSharper.lsleditor/TodoCache/.crc | 1 + _ReSharper.lsleditor/TodoCache/.version | Bin 0 -> 4 bytes _ReSharper.lsleditor/TodoCache/3/79ddd176.dat | Bin 0 -> 22234 bytes .../WebsiteFileReferences/.crc | Bin 0 -> 4 bytes .../WebsiteFileReferences/.version | Bin 0 -> 4 bytes _ReSharper.lsleditor/WordIndex/.crc | 1 + _ReSharper.lsleditor/WordIndex/.version | Bin 0 -> 4 bytes _ReSharper.lsleditor/WordIndex/5/4680b305.dat | Bin 0 -> 66406 bytes _ReSharper.lsleditor/WordIndex/6/bf11a17.dat | Bin 0 -> 64270 bytes app.config | 352 ++ bin/Debug/Default/Default.sol | 3 + bin/Debug/Default/Project/Object/Script.lsl | 13 + bin/Debug/Default/Project/Project.prj | 6 + bin/Debug/Default1/Default1.sol | 3 + bin/Debug/Default1/Project/Object/Script.lsl | 13 + bin/Debug/Default1/Project/Object/new.lsl | 10 + bin/Debug/Default1/Project/Project.prj | 6 + bin/Debug/Default123/Default123.sol | 3 + .../Default123/Project123/Object/Notecard.txt | 7 + .../Project123/Object/Notecard2.txt | 7 + .../Project123/Object/Notecard3.txt | 1 + .../Default123/Project123/Object/new.lsl | 13 + .../Default123/Project123/Project123.prj | 10 + bin/Debug/Default321/Default3210.sol | 3 + bin/Debug/Default321/Project/Project.prj | 2 + bin/Debug/LSLEditor-beta.vshost.exe.config | 135 + bin/Debug/LSLEditor.exe | Bin 0 -> 847872 bytes bin/Debug/LSLEditor.exe.config | 327 ++ bin/Debug/LSLEditor.pdb | Bin 0 -> 1144320 bytes bin/Debug/LSLEditor.vshost.exe | Bin 0 -> 5632 bytes bin/Debug/LSLEditor.vshost.exe.config | 327 ++ bin/Debug/LSLEditorHelp.chm | Bin 0 -> 3366003 bytes bin/Debug/LsLEditor-beta.exe | Bin 0 -> 847872 bytes bin/Debug/Plugins/ConsolePlugin.exe | Bin 0 -> 16384 bytes bin/Debug/Plugins/LSLSnippetsPlugin.exe | Bin 0 -> 16384 bytes bin/Debug/Plugins/Particles.exe | Bin 0 -> 102400 bytes bin/Debug/Plugins/TestPlugin.exe | Bin 0 -> 20480 bytes bin/Debug/Plugins/en/Particles.resources.dll | Bin 0 -> 6144 bytes bin/Debug/Plugins/fr/Particles.resources.dll | Bin 0 -> 6144 bytes bin/Debug/Plugins/lslSnippetsLib.dll | Bin 0 -> 15360 bytes bin/Debug/Plugins/lslint.exe | Bin 0 -> 93184 bytes bin/Debug/Plugins/plugins/License.txt | 23 + bin/Debug/Plugins/scripts/new.lsl | 11 + bin/Debug/Plugins/scripts/tinyscript.lsl | 7 + bin/Debug/Plugins/scripts/touch.lsl | 11 + .../Plugins/snippets/NotecardReaderv3.xml | 93 + bin/Debug/Plugins/snippets/llPlaySound.xml | 14 + bin/Debug/Plugins/snippets/llsay.xml | 10 + bin/Debug/Plugins/snippets/llstateentry.xml | 7 + bin/Debug/Plugins/unins000.dat | Bin 0 -> 1790 bytes bin/Debug/Plugins/unins000.exe | Bin 0 -> 691545 bytes bin/Debug/UTF8/Project/Object/Notecard.txt | 115 + bin/Debug/UTF8/Project/Object/Script.lsl | 83 + bin/Debug/UTF8/Project/Object/new.lsl | 11 + bin/Debug/UTF8/Project/Project.prj | 8 + bin/Debug/UTF8/UTF8.sol | 3 + bin/Debug/new.lsl | 12 + gpl-2.0.txt | 339 ++ llDialogForm.Designer.cs | 288 ++ llDialogForm.cs | 105 + llDialogForm.resx | 120 + lsleditor.5.0.ReSharper.user | 28 + lsleditor.csproj | 672 +++ lsleditor.csproj.user | 70 + lsleditor.sln | 30 + lsleditor.suo | Bin 0 -> 327168 bytes obj/Debug/Editor2.projdata | Bin 0 -> 655624 bytes obj/Debug/Editor2.projdata1 | Bin 0 -> 22280 bytes obj/Debug/LSLEditor.About.resources | Bin 0 -> 180 bytes obj/Debug/LSLEditor.Browser.resources | Bin 0 -> 180 bytes ...SLEditor.BugReport.BugReportForm.resources | Bin 0 -> 180 bytes obj/Debug/LSLEditor.EditForm.resources | Bin 0 -> 180 bytes obj/Debug/LSLEditor.FindWindow.resources | Bin 0 -> 180 bytes obj/Debug/LSLEditor.GListBoxWindow.resources | Bin 0 -> 180 bytes obj/Debug/LSLEditor.GotoWindow.resources | Bin 0 -> 180 bytes obj/Debug/LSLEditor.GroupboxEvent.resources | Bin 0 -> 4957 bytes obj/Debug/LSLEditor.Images.Class.gif | Bin 0 -> 150 bytes obj/Debug/LSLEditor.Images.Close-Active.gif | Bin 0 -> 1012 bytes obj/Debug/LSLEditor.Images.Close-Disabled.gif | Bin 0 -> 598 bytes obj/Debug/LSLEditor.Images.Close-Inactive.gif | Bin 0 -> 1016 bytes obj/Debug/LSLEditor.Images.Constants.gif | Bin 0 -> 88 bytes obj/Debug/LSLEditor.Images.Enum.gif | Bin 0 -> 110 bytes obj/Debug/LSLEditor.Images.Events.gif | Bin 0 -> 80 bytes obj/Debug/LSLEditor.Images.Functions.gif | Bin 0 -> 109 bytes obj/Debug/LSLEditor.Images.Namespace.gif | Bin 0 -> 74 bytes obj/Debug/LSLEditor.Images.Properties.gif | Bin 0 -> 113 bytes obj/Debug/LSLEditor.Images.SealedClass.gif | Bin 0 -> 127 bytes obj/Debug/LSLEditor.Images.Unknown.gif | Bin 0 -> 55 bytes obj/Debug/LSLEditor.Images.Vars.gif | Bin 0 -> 110 bytes ...ditor.ImagesSolutionExplorer.Animation.gif | Bin 0 -> 129 bytes ...itor.ImagesSolutionExplorer.Animations.gif | Bin 0 -> 1030 bytes ...itor.ImagesSolutionExplorer.Body Parts.gif | Bin 0 -> 166 bytes ...r.ImagesSolutionExplorer.Calling Cards.gif | Bin 0 -> 162 bytes ...LEditor.ImagesSolutionExplorer.Clothes.gif | Bin 0 -> 230 bytes .../LSLEditor.ImagesSolutionExplorer.Eyes.gif | Bin 0 -> 375 bytes ...SLEditor.ImagesSolutionExplorer.Folder.gif | Bin 0 -> 126 bytes ...LEditor.ImagesSolutionExplorer.Gesture.gif | Bin 0 -> 136 bytes ...Editor.ImagesSolutionExplorer.Gestures.gif | Bin 0 -> 1023 bytes ...SLEditor.ImagesSolutionExplorer.Gloves.gif | Bin 0 -> 591 bytes .../LSLEditor.ImagesSolutionExplorer.Hair.gif | Bin 0 -> 128 bytes ...ditor.ImagesSolutionExplorer.Inventory.gif | Bin 0 -> 126 bytes ...SLEditor.ImagesSolutionExplorer.Jacket.gif | Bin 0 -> 249 bytes ...Editor.ImagesSolutionExplorer.Landmark.gif | Bin 0 -> 154 bytes ...ditor.ImagesSolutionExplorer.Landmarks.gif | Bin 0 -> 1023 bytes ....ImagesSolutionExplorer.Lost And Found.gif | Bin 0 -> 165 bytes ...Editor.ImagesSolutionExplorer.Notecard.gif | Bin 0 -> 342 bytes ...ditor.ImagesSolutionExplorer.Notecards.gif | Bin 0 -> 1022 bytes ...SLEditor.ImagesSolutionExplorer.Object.gif | Bin 0 -> 1027 bytes ...LEditor.ImagesSolutionExplorer.Objects.gif | Bin 0 -> 166 bytes ...LSLEditor.ImagesSolutionExplorer.Pants.gif | Bin 0 -> 224 bytes ...tor.ImagesSolutionExplorer.Photo Album.gif | Bin 0 -> 347 bytes .../LSLEditor.ImagesSolutionExplorer.Prim.gif | Bin 0 -> 1027 bytes ...LEditor.ImagesSolutionExplorer.Project.gif | Bin 0 -> 353 bytes ...SLEditor.ImagesSolutionExplorer.Script.gif | Bin 0 -> 170 bytes ...LEditor.ImagesSolutionExplorer.Scripts.gif | Bin 0 -> 600 bytes ...LSLEditor.ImagesSolutionExplorer.Shape.gif | Bin 0 -> 1035 bytes ...LSLEditor.ImagesSolutionExplorer.Shirt.gif | Bin 0 -> 587 bytes ...LSLEditor.ImagesSolutionExplorer.Shoes.gif | Bin 0 -> 334 bytes .../LSLEditor.ImagesSolutionExplorer.Skin.gif | Bin 0 -> 125 bytes ...LSLEditor.ImagesSolutionExplorer.Skirt.gif | Bin 0 -> 595 bytes ...Editor.ImagesSolutionExplorer.Snapshot.gif | Bin 0 -> 1070 bytes ...LSLEditor.ImagesSolutionExplorer.Socks.gif | Bin 0 -> 160 bytes ...Editor.ImagesSolutionExplorer.Solution.gif | Bin 0 -> 1046 bytes ...LSLEditor.ImagesSolutionExplorer.Sound.gif | Bin 0 -> 317 bytes ...SLEditor.ImagesSolutionExplorer.Sounds.gif | Bin 0 -> 171 bytes ...LEditor.ImagesSolutionExplorer.Texture.gif | Bin 0 -> 591 bytes ...Editor.ImagesSolutionExplorer.Textures.gif | Bin 0 -> 1024 bytes ...LSLEditor.ImagesSolutionExplorer.Trash.gif | Bin 0 -> 357 bytes ...itor.ImagesSolutionExplorer.Underpants.gif | Bin 0 -> 224 bytes ...itor.ImagesSolutionExplorer.Undershirt.gif | Bin 0 -> 380 bytes ...LEditor.ImagesSolutionExplorer.Unknown.gif | Bin 0 -> 986 bytes ...Editor.ImagesSolutionExplorer.question.gif | Bin 0 -> 986 bytes obj/Debug/LSLEditor.LSLEditorForm.resources | Bin 0 -> 12452 bytes obj/Debug/LSLEditor.NewProject.resources | Bin 0 -> 180 bytes obj/Debug/LSLEditor.PermissionsForm.resources | Bin 0 -> 180 bytes .../LSLEditor.Properties.Resources.resources | Bin 0 -> 12985 bytes obj/Debug/LSLEditor.Resource.About.htm | 212 + obj/Debug/LSLEditor.Resource.ConfCSharp.xml | 102 + obj/Debug/LSLEditor.Resource.ConfLSL.xml | 4118 ++++++++++++++++ obj/Debug/LSLEditor.Resource.ReleaseNotes.htm | 1382 ++++++ obj/Debug/LSLEditor.Resource.ToolsOptions.xml | 29 + obj/Debug/LSLEditor.Resource.thanks.gif | Bin 0 -> 1164 bytes obj/Debug/LSLEditor.RichLabel.resources | Bin 0 -> 180 bytes obj/Debug/LSLEditor.RuntimeConsole.resources | Bin 0 -> 180 bytes .../LSLEditor.SimulatorConsole.resources | Bin 0 -> 180 bytes .../LSLEditor.Solution.GuidProperty.resources | Bin 0 -> 180 bytes ...Editor.Solution.SolutionExplorer.resources | Bin 0 -> 180 bytes .../LSLEditor.Solution.SvnAguments.resources | Bin 0 -> 180 bytes obj/Debug/LSLEditor.SyntaxError.resources | Bin 0 -> 3019 bytes .../LSLEditor.SyntaxRichTextBox.resources | Bin 0 -> 180 bytes ...LEditor.Tools.EnvironmentBrowser.resources | Bin 0 -> 180 bytes ...LEditor.Tools.EnvironmentGeneral.resources | Bin 0 -> 180 bytes .../LSLEditor.Tools.EnvironmentHelp.resources | Bin 0 -> 180 bytes ...LEditor.Tools.EnvironmentPlugins.resources | Bin 0 -> 180 bytes .../LSLEditor.Tools.ProjectSettings.resources | Bin 0 -> 180 bytes .../LSLEditor.Tools.RuntimeExternal.resources | Bin 0 -> 180 bytes .../LSLEditor.Tools.RuntimeGeneral.resources | Bin 0 -> 180 bytes .../LSLEditor.Tools.RuntimeInternal.resources | Bin 0 -> 180 bytes .../LSLEditor.Tools.RuntimeSmtp.resources | Bin 0 -> 180 bytes ...r.Tools.TextEditorCodeCompletion.resources | Bin 0 -> 180 bytes ...ditor.Tools.TextEditorFontColors.resources | Bin 0 -> 180 bytes ...SLEditor.Tools.TextEditorGeneral.resources | Bin 0 -> 180 bytes .../LSLEditor.Tools.ToolsOptions.resources | Bin 0 -> 180 bytes ...itor.Tools.VersionControlGeneral.resources | Bin 0 -> 180 bytes obj/Debug/LSLEditor.TooltipWindow.resources | Bin 0 -> 180 bytes .../LSLEditor.UpdateApplicationForm.resources | Bin 0 -> 180 bytes obj/Debug/LSLEditor.exe | Bin 0 -> 847872 bytes obj/Debug/LSLEditor.llDialogForm.resources | Bin 0 -> 180 bytes obj/Debug/LSLEditor.pdb | Bin 0 -> 1144320 bytes ...umberedTextBox.NumberedTextBoxUC.resources | Bin 0 -> 180 bytes ...taxHighlighter.SyntaxRichTextBox.resources | Bin 0 -> 188 bytes .../Properties.Resources.Designer.cs.dll | Bin 0 -> 40960 bytes ...erences.org.lsleditor.www.Reference.cs.dll | Bin 0 -> 45056 bytes ...leditor-2.15.csproj.GenerateResource.Cache | Bin 0 -> 3843 bytes ...leditor-beta.csproj.GenerateResource.Cache | Bin 0 -> 2087 bytes .../lsleditor.csproj.GenerateResource.Cache | Bin 0 -> 4178 bytes obj/Debug/lsleditor.projdata | Bin 0 -> 1665160 bytes obj/lsleditor-2.15.csproj.FileList.txt | 101 + obj/lsleditor-beta.csproj.FileList.txt | 45 + obj/lsleditor.csproj.FileList.txt | 107 + obj/lsleditor.csproj.FileListAbsolute.txt | 110 + sharedheader.txt | 43 + 453 files changed, 57506 insertions(+) create mode 100644 About.Designer.cs create mode 100644 About.cs create mode 100644 About.resx create mode 100644 BZip2Decompress/BZip2.cs create mode 100644 BZip2Decompress/BZip2Constants.cs create mode 100644 BZip2Decompress/BZip2InputStream.cs create mode 100644 BZip2Decompress/IChecksum.cs create mode 100644 BZip2Decompress/MD5Verify.cs create mode 100644 BZip2Decompress/StrangeCrc.cs create mode 100644 Browser.Designer.cs create mode 100644 Browser.cs create mode 100644 Browser.resx create mode 100644 BugReport/BugReportForm.Designer.cs create mode 100644 BugReport/BugReportForm.cs create mode 100644 BugReport/BugReportForm.resx create mode 100644 BugReport/UploadBugReport.cs create mode 100644 Decompressor/Decompress.cs create mode 100644 Decompressor/ZipEntry.cs create mode 100644 EditForm.Designer.cs create mode 100644 EditForm.cs create mode 100644 EditForm.resx create mode 100644 Editor/GListBox.Designer.cs create mode 100644 Editor/GListBox.cs create mode 100644 Editor/GListBoxWindow.Designer.cs create mode 100644 Editor/GListBoxWindow.cs create mode 100644 Editor/GListBoxWindow.resx create mode 100644 Editor/KeyWords.cs create mode 100644 Editor/MsXsltContext.cs create mode 100644 Editor/Numbered.Designer.cs create mode 100644 Editor/Numbered.cs create mode 100644 Editor/NumberedTextBoxUC.cs create mode 100644 Editor/NumberedTextBoxUC.designer.cs create mode 100644 Editor/NumberedTextBoxUC.resx create mode 100644 Editor/RichLabel.Designer.cs create mode 100644 Editor/RichLabel.cs create mode 100644 Editor/RichLabel.resx create mode 100644 Editor/RoundCorners.cs create mode 100644 Editor/SyntaxRichTextBox.cs create mode 100644 Editor/SyntaxRichTextBox.resx create mode 100644 Editor/TooltipWindow.cs create mode 100644 Editor/TooltipWindow.designer.cs create mode 100644 Editor/TooltipWindow.resx create mode 100644 FindWindow.Designer.cs create mode 100644 FindWindow.cs create mode 100644 FindWindow.resx create mode 100644 Form1.cs create mode 100644 Form1.resx create mode 100644 GotoWindow.Designer.cs create mode 100644 GotoWindow.cs create mode 100644 GotoWindow.resx create mode 100644 Helpers/AutoFormatter.cs create mode 100644 Helpers/CodeCompletion.cs create mode 100644 Helpers/CompilerHelper.cs create mode 100644 Helpers/FileAssociator.cs create mode 100644 Helpers/GetTemplate.cs create mode 100644 Helpers/GroupboxEvent.cs create mode 100644 Helpers/GroupboxEvent.resx create mode 100644 Helpers/HTTPRequest.cs create mode 100644 Helpers/LSL2CSharp.cs create mode 100644 Helpers/Measure.cs create mode 100644 Helpers/OopsFormatter.cs create mode 100644 Helpers/PrinterHelper.cs create mode 100644 Helpers/SendMyKeys.cs create mode 100644 Helpers/Settings.cs create mode 100644 Helpers/SmtpClient.cs create mode 100644 Helpers/TabControlExtended.Designer.cs create mode 100644 Helpers/TabControlExtended.cs create mode 100644 Helpers/TaskQueue.cs create mode 100644 Helpers/WebRequestClass.cs create mode 100644 Helpers/XMLRPC.cs create mode 100644 Icons/ADDITEM.GIF create mode 100644 Icons/COPY.GIF create mode 100644 Icons/CUT.GIF create mode 100644 Icons/DEINDENT.GIF create mode 100644 Icons/DELETE.GIF create mode 100644 Icons/END.GIF create mode 100644 Icons/FIND.GIF create mode 100644 Icons/ININDENT.GIF create mode 100644 Icons/NEWDOC.GIF create mode 100644 Icons/NEWPROJ.GIF create mode 100644 Icons/OPEN.GIF create mode 100644 Icons/PASTE.GIF create mode 100644 Icons/PRINT.GIF create mode 100644 Icons/PROJECT.GIF create mode 100644 Icons/PROPS.GIF create mode 100644 Icons/REDO.GIF create mode 100644 Icons/SAVE.GIF create mode 100644 Icons/SAVEALL.GIF create mode 100644 Icons/SAVEAS.GIF create mode 100644 Icons/START.GIF create mode 100644 Icons/UNDO.GIF create mode 100644 Images/Class.gif create mode 100644 Images/Close-Active.gif create mode 100644 Images/Close-Disabled.gif create mode 100644 Images/Close-Inactive.gif create mode 100644 Images/Constants.gif create mode 100644 Images/Enum.gif create mode 100644 Images/Events.gif create mode 100644 Images/Functions.gif create mode 100644 Images/Namespace.gif create mode 100644 Images/Properties.gif create mode 100644 Images/SealedClass.gif create mode 100644 Images/Thumbs.db create mode 100644 Images/Unknown.gif create mode 100644 Images/Vars.gif create mode 100644 Images/logo.gif create mode 100644 ImagesSolutionExplorer/Animation.gif create mode 100644 ImagesSolutionExplorer/Animations.gif create mode 100644 ImagesSolutionExplorer/Body Parts.gif create mode 100644 ImagesSolutionExplorer/Calling Cards.gif create mode 100644 ImagesSolutionExplorer/Clothes.gif create mode 100644 ImagesSolutionExplorer/Eyes.gif create mode 100644 ImagesSolutionExplorer/Folder.gif create mode 100644 ImagesSolutionExplorer/Gesture.gif create mode 100644 ImagesSolutionExplorer/Gestures.gif create mode 100644 ImagesSolutionExplorer/Gloves.gif create mode 100644 ImagesSolutionExplorer/Hair.gif create mode 100644 ImagesSolutionExplorer/Inventory.gif create mode 100644 ImagesSolutionExplorer/Jacket.gif create mode 100644 ImagesSolutionExplorer/Landmark.gif create mode 100644 ImagesSolutionExplorer/Landmarks.gif create mode 100644 ImagesSolutionExplorer/Lost And Found.gif create mode 100644 ImagesSolutionExplorer/Notecard.gif create mode 100644 ImagesSolutionExplorer/Notecards.gif create mode 100644 ImagesSolutionExplorer/Object.gif create mode 100644 ImagesSolutionExplorer/Objects.gif create mode 100644 ImagesSolutionExplorer/Pants.gif create mode 100644 ImagesSolutionExplorer/Photo Album.gif create mode 100644 ImagesSolutionExplorer/Prim.gif create mode 100644 ImagesSolutionExplorer/Project.gif create mode 100644 ImagesSolutionExplorer/Script.gif create mode 100644 ImagesSolutionExplorer/Scripts.gif create mode 100644 ImagesSolutionExplorer/Shape.gif create mode 100644 ImagesSolutionExplorer/Shirt.gif create mode 100644 ImagesSolutionExplorer/Shoes.gif create mode 100644 ImagesSolutionExplorer/Skin.gif create mode 100644 ImagesSolutionExplorer/Skirt.gif create mode 100644 ImagesSolutionExplorer/Snapshot.gif create mode 100644 ImagesSolutionExplorer/Socks.gif create mode 100644 ImagesSolutionExplorer/Solution.gif create mode 100644 ImagesSolutionExplorer/Sound.gif create mode 100644 ImagesSolutionExplorer/Sounds.gif create mode 100644 ImagesSolutionExplorer/Texture.gif create mode 100644 ImagesSolutionExplorer/Textures.gif create mode 100644 ImagesSolutionExplorer/Trash.gif create mode 100644 ImagesSolutionExplorer/Underpants.gif create mode 100644 ImagesSolutionExplorer/Undershirt.gif create mode 100644 ImagesSolutionExplorer/Unknown.gif create mode 100644 ImagesSolutionExplorer/question.gif create mode 100644 LSLEditor.RES create mode 100644 LSLEditor.aps create mode 100644 LSLEditor.rc create mode 100644 LSLEditorForm.Designer.cs create mode 100644 LSLEditorForm.cs create mode 100644 LSLEditorForm.resx create mode 100644 MakeZipFile.cmd create mode 100644 PermissionsForm.Designer.cs create mode 100644 PermissionsForm.cs create mode 100644 PermissionsForm.resx create mode 100644 Plugins/Generic.cs create mode 100644 Plugins/LSLint.cs create mode 100644 Plugins/Particles.cs create mode 100644 Plugins/Svn.cs create mode 100644 Properties/Resources.Designer.cs create mode 100644 Properties/Resources.resx create mode 100644 Properties/Settings.Designer.cs create mode 100644 Properties/Settings.settings create mode 100644 Resource/About.htm create mode 100644 Resource/App.ico create mode 100644 Resource/AssemblyInfo.cs create mode 100644 Resource/ConfCSharp.xml create mode 100644 Resource/ConfLSL.xml create mode 100644 Resource/ReleaseNotes.htm create mode 100644 Resource/Test.snk create mode 100644 Resource/ToolsOptions.xml create mode 100644 Resource/app.config create mode 100644 Resource/thanks.gif create mode 100644 RuntimeConsole.Designer.cs create mode 100644 RuntimeConsole.cs create mode 100644 RuntimeConsole.resx create mode 100644 SecondLife/Float.cs create mode 100644 SecondLife/SecondLifeHst.cs create mode 100644 SecondLife/SecondLifeMain.cs create mode 100644 SecondLife/String.cs create mode 100644 SecondLife/integer.cs create mode 100644 SecondLife/key.cs create mode 100644 SecondLife/list.cs create mode 100644 SecondLife/rotation.cs create mode 100644 SecondLife/vector.cs create mode 100644 SimulatorConsole.Designer.cs create mode 100644 SimulatorConsole.cs create mode 100644 SimulatorConsole.resx create mode 100644 Solution/GuidProperty.Designer.cs create mode 100644 Solution/GuidProperty.cs create mode 100644 Solution/GuidProperty.resx create mode 100644 Solution/NewProject.Designer.cs create mode 100644 Solution/NewProject.cs create mode 100644 Solution/NewProject.resx create mode 100644 Solution/SolutionExplorer.cs create mode 100644 Solution/SolutionExplorer.designer.cs create mode 100644 Solution/SolutionExplorer.resx create mode 100644 Solution/SvnAguments.Designer.cs create mode 100644 Solution/SvnAguments.cs create mode 100644 Solution/SvnAguments.resx create mode 100644 SyntaxError.Designer.cs create mode 100644 SyntaxError.cs create mode 100644 SyntaxError.resx create mode 100644 Tools/EnvironmentBrowser.Designer.cs create mode 100644 Tools/EnvironmentBrowser.cs create mode 100644 Tools/EnvironmentBrowser.resx create mode 100644 Tools/EnvironmentGeneral.Designer.cs create mode 100644 Tools/EnvironmentGeneral.cs create mode 100644 Tools/EnvironmentGeneral.resx create mode 100644 Tools/EnvironmentHelp.Designer.cs create mode 100644 Tools/EnvironmentHelp.cs create mode 100644 Tools/EnvironmentHelp.resx create mode 100644 Tools/EnvironmentPlugins.Designer.cs create mode 100644 Tools/EnvironmentPlugins.cs create mode 100644 Tools/EnvironmentPlugins.resx create mode 100644 Tools/ProjectSettings.Designer.cs create mode 100644 Tools/ProjectSettings.cs create mode 100644 Tools/ProjectSettings.resx create mode 100644 Tools/RuntimeExternal.Designer.cs create mode 100644 Tools/RuntimeExternal.cs create mode 100644 Tools/RuntimeExternal.resx create mode 100644 Tools/RuntimeGeneral.Designer.cs create mode 100644 Tools/RuntimeGeneral.cs create mode 100644 Tools/RuntimeGeneral.resx create mode 100644 Tools/RuntimeInternal.Designer.cs create mode 100644 Tools/RuntimeInternal.cs create mode 100644 Tools/RuntimeInternal.resx create mode 100644 Tools/RuntimeSmtp.Designer.cs create mode 100644 Tools/RuntimeSmtp.cs create mode 100644 Tools/RuntimeSmtp.resx create mode 100644 Tools/TextEditorCodeCompletion.Designer.cs create mode 100644 Tools/TextEditorCodeCompletion.cs create mode 100644 Tools/TextEditorCodeCompletion.resx create mode 100644 Tools/TextEditorFontColors.Designer.cs create mode 100644 Tools/TextEditorFontColors.cs create mode 100644 Tools/TextEditorFontColors.resx create mode 100644 Tools/TextEditorGeneral.Designer.cs create mode 100644 Tools/TextEditorGeneral.cs create mode 100644 Tools/TextEditorGeneral.resx create mode 100644 Tools/ToolsOptions.Designer.cs create mode 100644 Tools/ToolsOptions.cs create mode 100644 Tools/ToolsOptions.resx create mode 100644 Tools/VersionControlGeneral.Designer.cs create mode 100644 Tools/VersionControlGeneral.cs create mode 100644 Tools/VersionControlGeneral.resx create mode 100644 UpdateApplicationForm.Designer.cs create mode 100644 UpdateApplicationForm.cs create mode 100644 UpdateApplicationForm.resx create mode 100644 Web References/org.lsleditor.www/Reference.cs create mode 100644 Web References/org.lsleditor.www/Reference.map create mode 100644 Web References/org.lsleditor.www/Service1.disco create mode 100644 Web References/org.lsleditor.www/Service1.wsdl create mode 100644 _MakeRelease.cmd create mode 100644 _ReSharper.lsleditor/BuildScriptCache/.crc create mode 100644 _ReSharper.lsleditor/BuildScriptCache/.version create mode 100644 _ReSharper.lsleditor/BuildScriptCache/5/4680b305.dat create mode 100644 _ReSharper.lsleditor/ModuleIds.xml create mode 100644 _ReSharper.lsleditor/NamedArguments/.crc create mode 100644 _ReSharper.lsleditor/NamedArguments/.version create mode 100644 _ReSharper.lsleditor/NamedArguments/5/4680b305.dat create mode 100644 _ReSharper.lsleditor/ProjectModel/ProjectModel.dat create mode 100644 _ReSharper.lsleditor/Resources/.crc create mode 100644 _ReSharper.lsleditor/Resources/.version create mode 100644 _ReSharper.lsleditor/Resources/5/626cc1d.dat create mode 100644 _ReSharper.lsleditor/SymbolCache.bin create mode 100644 _ReSharper.lsleditor/TagPrefixes/.crc create mode 100644 _ReSharper.lsleditor/TagPrefixes/.version create mode 100644 _ReSharper.lsleditor/TodoCache/.crc create mode 100644 _ReSharper.lsleditor/TodoCache/.version create mode 100644 _ReSharper.lsleditor/TodoCache/3/79ddd176.dat create mode 100644 _ReSharper.lsleditor/WebsiteFileReferences/.crc create mode 100644 _ReSharper.lsleditor/WebsiteFileReferences/.version create mode 100644 _ReSharper.lsleditor/WordIndex/.crc create mode 100644 _ReSharper.lsleditor/WordIndex/.version create mode 100644 _ReSharper.lsleditor/WordIndex/5/4680b305.dat create mode 100644 _ReSharper.lsleditor/WordIndex/6/bf11a17.dat create mode 100644 app.config create mode 100644 bin/Debug/Default/Default.sol create mode 100644 bin/Debug/Default/Project/Object/Script.lsl create mode 100644 bin/Debug/Default/Project/Project.prj create mode 100644 bin/Debug/Default1/Default1.sol create mode 100644 bin/Debug/Default1/Project/Object/Script.lsl create mode 100644 bin/Debug/Default1/Project/Object/new.lsl create mode 100644 bin/Debug/Default1/Project/Project.prj create mode 100644 bin/Debug/Default123/Default123.sol create mode 100644 bin/Debug/Default123/Project123/Object/Notecard.txt create mode 100644 bin/Debug/Default123/Project123/Object/Notecard2.txt create mode 100644 bin/Debug/Default123/Project123/Object/Notecard3.txt create mode 100644 bin/Debug/Default123/Project123/Object/new.lsl create mode 100644 bin/Debug/Default123/Project123/Project123.prj create mode 100644 bin/Debug/Default321/Default3210.sol create mode 100644 bin/Debug/Default321/Project/Project.prj create mode 100644 bin/Debug/LSLEditor-beta.vshost.exe.config create mode 100644 bin/Debug/LSLEditor.exe create mode 100644 bin/Debug/LSLEditor.exe.config create mode 100644 bin/Debug/LSLEditor.pdb create mode 100644 bin/Debug/LSLEditor.vshost.exe create mode 100644 bin/Debug/LSLEditor.vshost.exe.config create mode 100644 bin/Debug/LSLEditorHelp.chm create mode 100644 bin/Debug/LsLEditor-beta.exe create mode 100644 bin/Debug/Plugins/ConsolePlugin.exe create mode 100644 bin/Debug/Plugins/LSLSnippetsPlugin.exe create mode 100644 bin/Debug/Plugins/Particles.exe create mode 100644 bin/Debug/Plugins/TestPlugin.exe create mode 100644 bin/Debug/Plugins/en/Particles.resources.dll create mode 100644 bin/Debug/Plugins/fr/Particles.resources.dll create mode 100644 bin/Debug/Plugins/lslSnippetsLib.dll create mode 100644 bin/Debug/Plugins/lslint.exe create mode 100644 bin/Debug/Plugins/plugins/License.txt create mode 100644 bin/Debug/Plugins/scripts/new.lsl create mode 100644 bin/Debug/Plugins/scripts/tinyscript.lsl create mode 100644 bin/Debug/Plugins/scripts/touch.lsl create mode 100644 bin/Debug/Plugins/snippets/NotecardReaderv3.xml create mode 100644 bin/Debug/Plugins/snippets/llPlaySound.xml create mode 100644 bin/Debug/Plugins/snippets/llsay.xml create mode 100644 bin/Debug/Plugins/snippets/llstateentry.xml create mode 100644 bin/Debug/Plugins/unins000.dat create mode 100644 bin/Debug/Plugins/unins000.exe create mode 100644 bin/Debug/UTF8/Project/Object/Notecard.txt create mode 100644 bin/Debug/UTF8/Project/Object/Script.lsl create mode 100644 bin/Debug/UTF8/Project/Object/new.lsl create mode 100644 bin/Debug/UTF8/Project/Project.prj create mode 100644 bin/Debug/UTF8/UTF8.sol create mode 100644 bin/Debug/new.lsl create mode 100644 gpl-2.0.txt create mode 100644 llDialogForm.Designer.cs create mode 100644 llDialogForm.cs create mode 100644 llDialogForm.resx create mode 100644 lsleditor.5.0.ReSharper.user create mode 100644 lsleditor.csproj create mode 100644 lsleditor.csproj.user create mode 100644 lsleditor.sln create mode 100644 lsleditor.suo create mode 100644 obj/Debug/Editor2.projdata create mode 100644 obj/Debug/Editor2.projdata1 create mode 100644 obj/Debug/LSLEditor.About.resources create mode 100644 obj/Debug/LSLEditor.Browser.resources create mode 100644 obj/Debug/LSLEditor.BugReport.BugReportForm.resources create mode 100644 obj/Debug/LSLEditor.EditForm.resources create mode 100644 obj/Debug/LSLEditor.FindWindow.resources create mode 100644 obj/Debug/LSLEditor.GListBoxWindow.resources create mode 100644 obj/Debug/LSLEditor.GotoWindow.resources create mode 100644 obj/Debug/LSLEditor.GroupboxEvent.resources create mode 100644 obj/Debug/LSLEditor.Images.Class.gif create mode 100644 obj/Debug/LSLEditor.Images.Close-Active.gif create mode 100644 obj/Debug/LSLEditor.Images.Close-Disabled.gif create mode 100644 obj/Debug/LSLEditor.Images.Close-Inactive.gif create mode 100644 obj/Debug/LSLEditor.Images.Constants.gif create mode 100644 obj/Debug/LSLEditor.Images.Enum.gif create mode 100644 obj/Debug/LSLEditor.Images.Events.gif create mode 100644 obj/Debug/LSLEditor.Images.Functions.gif create mode 100644 obj/Debug/LSLEditor.Images.Namespace.gif create mode 100644 obj/Debug/LSLEditor.Images.Properties.gif create mode 100644 obj/Debug/LSLEditor.Images.SealedClass.gif create mode 100644 obj/Debug/LSLEditor.Images.Unknown.gif create mode 100644 obj/Debug/LSLEditor.Images.Vars.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Animation.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Animations.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Body Parts.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Calling Cards.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Clothes.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Eyes.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Folder.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Gesture.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Gestures.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Gloves.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Hair.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Inventory.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Jacket.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Landmark.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Landmarks.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Lost And Found.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Notecard.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Notecards.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Object.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Objects.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Pants.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Photo Album.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Prim.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Project.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Script.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Scripts.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Shape.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Shirt.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Shoes.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Skin.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Skirt.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Snapshot.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Socks.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Solution.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Sound.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Sounds.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Texture.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Textures.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Trash.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Underpants.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Undershirt.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.Unknown.gif create mode 100644 obj/Debug/LSLEditor.ImagesSolutionExplorer.question.gif create mode 100644 obj/Debug/LSLEditor.LSLEditorForm.resources create mode 100644 obj/Debug/LSLEditor.NewProject.resources create mode 100644 obj/Debug/LSLEditor.PermissionsForm.resources create mode 100644 obj/Debug/LSLEditor.Properties.Resources.resources create mode 100644 obj/Debug/LSLEditor.Resource.About.htm create mode 100644 obj/Debug/LSLEditor.Resource.ConfCSharp.xml create mode 100644 obj/Debug/LSLEditor.Resource.ConfLSL.xml create mode 100644 obj/Debug/LSLEditor.Resource.ReleaseNotes.htm create mode 100644 obj/Debug/LSLEditor.Resource.ToolsOptions.xml create mode 100644 obj/Debug/LSLEditor.Resource.thanks.gif create mode 100644 obj/Debug/LSLEditor.RichLabel.resources create mode 100644 obj/Debug/LSLEditor.RuntimeConsole.resources create mode 100644 obj/Debug/LSLEditor.SimulatorConsole.resources create mode 100644 obj/Debug/LSLEditor.Solution.GuidProperty.resources create mode 100644 obj/Debug/LSLEditor.Solution.SolutionExplorer.resources create mode 100644 obj/Debug/LSLEditor.Solution.SvnAguments.resources create mode 100644 obj/Debug/LSLEditor.SyntaxError.resources create mode 100644 obj/Debug/LSLEditor.SyntaxRichTextBox.resources create mode 100644 obj/Debug/LSLEditor.Tools.EnvironmentBrowser.resources create mode 100644 obj/Debug/LSLEditor.Tools.EnvironmentGeneral.resources create mode 100644 obj/Debug/LSLEditor.Tools.EnvironmentHelp.resources create mode 100644 obj/Debug/LSLEditor.Tools.EnvironmentPlugins.resources create mode 100644 obj/Debug/LSLEditor.Tools.ProjectSettings.resources create mode 100644 obj/Debug/LSLEditor.Tools.RuntimeExternal.resources create mode 100644 obj/Debug/LSLEditor.Tools.RuntimeGeneral.resources create mode 100644 obj/Debug/LSLEditor.Tools.RuntimeInternal.resources create mode 100644 obj/Debug/LSLEditor.Tools.RuntimeSmtp.resources create mode 100644 obj/Debug/LSLEditor.Tools.TextEditorCodeCompletion.resources create mode 100644 obj/Debug/LSLEditor.Tools.TextEditorFontColors.resources create mode 100644 obj/Debug/LSLEditor.Tools.TextEditorGeneral.resources create mode 100644 obj/Debug/LSLEditor.Tools.ToolsOptions.resources create mode 100644 obj/Debug/LSLEditor.Tools.VersionControlGeneral.resources create mode 100644 obj/Debug/LSLEditor.TooltipWindow.resources create mode 100644 obj/Debug/LSLEditor.UpdateApplicationForm.resources create mode 100644 obj/Debug/LSLEditor.exe create mode 100644 obj/Debug/LSLEditor.llDialogForm.resources create mode 100644 obj/Debug/LSLEditor.pdb create mode 100644 obj/Debug/NumberedTextBox.NumberedTextBoxUC.resources create mode 100644 obj/Debug/SyntaxHighlighter.SyntaxRichTextBox.resources create mode 100644 obj/Debug/TempPE/Properties.Resources.Designer.cs.dll create mode 100644 obj/Debug/TempPE/Web References.org.lsleditor.www.Reference.cs.dll create mode 100644 obj/Debug/lsleditor-2.15.csproj.GenerateResource.Cache create mode 100644 obj/Debug/lsleditor-beta.csproj.GenerateResource.Cache create mode 100644 obj/Debug/lsleditor.csproj.GenerateResource.Cache create mode 100644 obj/Debug/lsleditor.projdata create mode 100644 obj/lsleditor-2.15.csproj.FileList.txt create mode 100644 obj/lsleditor-beta.csproj.FileList.txt create mode 100644 obj/lsleditor.csproj.FileList.txt create mode 100644 obj/lsleditor.csproj.FileListAbsolute.txt create mode 100644 sharedheader.txt diff --git a/About.Designer.cs b/About.Designer.cs new file mode 100644 index 0000000..65f1179 --- /dev/null +++ b/About.Designer.cs @@ -0,0 +1,145 @@ +namespace LSLEditor +{ + partial class About + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.webBrowser1 = new System.Windows.Forms.WebBrowser(); + this.linkLabel1 = new System.Windows.Forms.LinkLabel(); + this.button1 = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // pictureBox1 + // + this.pictureBox1.Image = global::LSLEditor.Properties.Resources.logo; + this.pictureBox1.Location = new System.Drawing.Point(16, 16); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(184, 80); + this.pictureBox1.TabIndex = 0; + this.pictureBox1.TabStop = false; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Controls.Add(this.webBrowser1); + this.groupBox1.Controls.Add(this.linkLabel1); + this.groupBox1.Controls.Add(this.pictureBox1); + this.groupBox1.Location = new System.Drawing.Point(16, 8); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(320, 360); + this.groupBox1.TabIndex = 1; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "LSL-Editor"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(72, 112); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(16, 13); + this.label2.TabIndex = 4; + this.label2.Text = "..."; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(16, 112); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(45, 13); + this.label1.TabIndex = 3; + this.label1.Text = "Version:"; + // + // webBrowser1 + // + this.webBrowser1.Location = new System.Drawing.Point(8, 128); + this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); + this.webBrowser1.Name = "webBrowser1"; + this.webBrowser1.Size = new System.Drawing.Size(304, 224); + this.webBrowser1.TabIndex = 2; + // + // linkLabel1 + // + this.linkLabel1.AutoSize = true; + this.linkLabel1.Location = new System.Drawing.Point(16, 96); + this.linkLabel1.Name = "linkLabel1"; + this.linkLabel1.Size = new System.Drawing.Size(220, 13); + this.linkLabel1.TabIndex = 1; + this.linkLabel1.TabStop = true; + this.linkLabel1.Text = "(C) 2006,2007,2008 Alphons van der Heijden"; + this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(240, 376); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 2; + this.button1.Text = "Ok"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // About + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(352, 410); + this.Controls.Add(this.button1); + this.Controls.Add(this.groupBox1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "About"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "About"; + this.Load += new System.EventHandler(this.About_Load); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.WebBrowser webBrowser1; + private System.Windows.Forms.LinkLabel linkLabel1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + } +} \ No newline at end of file diff --git a/About.cs b/About.cs new file mode 100644 index 0000000..c10a50e --- /dev/null +++ b/About.cs @@ -0,0 +1,80 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.IO; +using System.Reflection; +using System.ComponentModel; +using System.Windows.Forms; + +namespace LSLEditor +{ + public partial class About : Form + { + public About(LSLEditorForm parent) + { + InitializeComponent(); + + this.Icon = parent.Icon; + + string strVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + this.label2.Text = strVersion; + } + + private void button1_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + System.Diagnostics.Process.Start(Properties.Settings.Default.ContactUrl); + } + + private void About_Load(object sender, EventArgs e) + { + string strExeFileName = Path.GetFileName(Assembly.GetExecutingAssembly().CodeBase); + this.webBrowser1.Navigate("res://" + strExeFileName + "/"+ Properties.Settings.Default.About); + } + } +} \ No newline at end of file diff --git a/About.resx b/About.resx new file mode 100644 index 0000000..ff31a6d --- /dev/null +++ b/About.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/BZip2Decompress/BZip2.cs b/BZip2Decompress/BZip2.cs new file mode 100644 index 0000000..3c736af --- /dev/null +++ b/BZip2Decompress/BZip2.cs @@ -0,0 +1,24 @@ +using System; +using System.IO; + +// BZip2.Decompress(File.OpenRead("in"), File.Create("out")); + + +namespace LSLEditor.BZip2Decompress +{ + public sealed class Decompressor + { + public static void Decompress(Stream inStream, Stream outStream) + { + using ( outStream ) { + using ( BZip2InputStream bzis = new BZip2InputStream(inStream) ) { + int ch = bzis.ReadByte(); + while (ch != -1) { + outStream.WriteByte((byte)ch); + ch = bzis.ReadByte(); + } + } + } + } + } +} diff --git a/BZip2Decompress/BZip2Constants.cs b/BZip2Decompress/BZip2Constants.cs new file mode 100644 index 0000000..e86e8de --- /dev/null +++ b/BZip2Decompress/BZip2Constants.cs @@ -0,0 +1,122 @@ +namespace LSLEditor.BZip2Decompress +{ + + /// + /// Defines internal values for both compression and decompression + /// + public sealed class BZip2Constants + { + /// + /// Random numbers used to randomise repetitive blocks + /// + public readonly static int[] rNums = { + 619, 720, 127, 481, 931, 816, 813, 233, 566, 247, + 985, 724, 205, 454, 863, 491, 741, 242, 949, 214, + 733, 859, 335, 708, 621, 574, 73, 654, 730, 472, + 419, 436, 278, 496, 867, 210, 399, 680, 480, 51, + 878, 465, 811, 169, 869, 675, 611, 697, 867, 561, + 862, 687, 507, 283, 482, 129, 807, 591, 733, 623, + 150, 238, 59, 379, 684, 877, 625, 169, 643, 105, + 170, 607, 520, 932, 727, 476, 693, 425, 174, 647, + 73, 122, 335, 530, 442, 853, 695, 249, 445, 515, + 909, 545, 703, 919, 874, 474, 882, 500, 594, 612, + 641, 801, 220, 162, 819, 984, 589, 513, 495, 799, + 161, 604, 958, 533, 221, 400, 386, 867, 600, 782, + 382, 596, 414, 171, 516, 375, 682, 485, 911, 276, + 98, 553, 163, 354, 666, 933, 424, 341, 533, 870, + 227, 730, 475, 186, 263, 647, 537, 686, 600, 224, + 469, 68, 770, 919, 190, 373, 294, 822, 808, 206, + 184, 943, 795, 384, 383, 461, 404, 758, 839, 887, + 715, 67, 618, 276, 204, 918, 873, 777, 604, 560, + 951, 160, 578, 722, 79, 804, 96, 409, 713, 940, + 652, 934, 970, 447, 318, 353, 859, 672, 112, 785, + 645, 863, 803, 350, 139, 93, 354, 99, 820, 908, + 609, 772, 154, 274, 580, 184, 79, 626, 630, 742, + 653, 282, 762, 623, 680, 81, 927, 626, 789, 125, + 411, 521, 938, 300, 821, 78, 343, 175, 128, 250, + 170, 774, 972, 275, 999, 639, 495, 78, 352, 126, + 857, 956, 358, 619, 580, 124, 737, 594, 701, 612, + 669, 112, 134, 694, 363, 992, 809, 743, 168, 974, + 944, 375, 748, 52, 600, 747, 642, 182, 862, 81, + 344, 805, 988, 739, 511, 655, 814, 334, 249, 515, + 897, 955, 664, 981, 649, 113, 974, 459, 893, 228, + 433, 837, 553, 268, 926, 240, 102, 654, 459, 51, + 686, 754, 806, 760, 493, 403, 415, 394, 687, 700, + 946, 670, 656, 610, 738, 392, 760, 799, 887, 653, + 978, 321, 576, 617, 626, 502, 894, 679, 243, 440, + 680, 879, 194, 572, 640, 724, 926, 56, 204, 700, + 707, 151, 457, 449, 797, 195, 791, 558, 945, 679, + 297, 59, 87, 824, 713, 663, 412, 693, 342, 606, + 134, 108, 571, 364, 631, 212, 174, 643, 304, 329, + 343, 97, 430, 751, 497, 314, 983, 374, 822, 928, + 140, 206, 73, 263, 980, 736, 876, 478, 430, 305, + 170, 514, 364, 692, 829, 82, 855, 953, 676, 246, + 369, 970, 294, 750, 807, 827, 150, 790, 288, 923, + 804, 378, 215, 828, 592, 281, 565, 555, 710, 82, + 896, 831, 547, 261, 524, 462, 293, 465, 502, 56, + 661, 821, 976, 991, 658, 869, 905, 758, 745, 193, + 768, 550, 608, 933, 378, 286, 215, 979, 792, 961, + 61, 688, 793, 644, 986, 403, 106, 366, 905, 644, + 372, 567, 466, 434, 645, 210, 389, 550, 919, 135, + 780, 773, 635, 389, 707, 100, 626, 958, 165, 504, + 920, 176, 193, 713, 857, 265, 203, 50, 668, 108, + 645, 990, 626, 197, 510, 357, 358, 850, 858, 364, + 936, 638 + }; + + /// + /// When multiplied by compression parameter (1-9) gives the block size for compression + /// 9 gives the best compresssion but uses the most memory. + /// + public const int baseBlockSize = 100000; + + /// + /// Backend constant + /// + public const int MAX_ALPHA_SIZE = 258; + + /// + /// Backend constant + /// + public const int MAX_CODE_LEN = 23; + + /// + /// Backend constant + /// + public const int RUNA = 0; + + /// + /// Backend constant + /// + public const int RUNB = 1; + + /// + /// Backend constant + /// + public const int N_GROUPS = 6; + + /// + /// Backend constant + /// + public const int G_SIZE = 50; + + /// + /// Backend constant + /// + public const int N_ITERS = 4; + + /// + /// Backend constant + /// + public const int MAX_SELECTORS = (2 + (900000 / G_SIZE)); + + /// + /// Backend constant + /// + public const int NUM_OVERSHOOT_BYTES = 20; + + private BZip2Constants() + { + } + } +} diff --git a/BZip2Decompress/BZip2InputStream.cs b/BZip2Decompress/BZip2InputStream.cs new file mode 100644 index 0000000..fadd35d --- /dev/null +++ b/BZip2Decompress/BZip2InputStream.cs @@ -0,0 +1,924 @@ +using System; +using System.IO; + +namespace LSLEditor.BZip2Decompress +{ + + /// + /// An input stream that decompresses files in the BZip2 format + /// + public class BZip2InputStream : Stream + { + #region Constants + const int START_BLOCK_STATE = 1; + const int RAND_PART_A_STATE = 2; + const int RAND_PART_B_STATE = 3; + const int RAND_PART_C_STATE = 4; + const int NO_RAND_PART_A_STATE = 5; + const int NO_RAND_PART_B_STATE = 6; + const int NO_RAND_PART_C_STATE = 7; + #endregion + #region Constructors + /// + /// Construct instance for reading from stream + /// + /// Data source + public BZip2InputStream(Stream stream) + { + // init arrays + for (int i = 0; i < BZip2Constants.N_GROUPS; ++i) + { + limit[i] = new int[BZip2Constants.MAX_ALPHA_SIZE]; + baseArray[i] = new int[BZip2Constants.MAX_ALPHA_SIZE]; + perm[i] = new int[BZip2Constants.MAX_ALPHA_SIZE]; + } + + BsSetStream(stream); + Initialize(); + InitBlock(); + SetupBlock(); + } + + #endregion + + /// + /// Get/set flag indicating ownership of underlying stream. + /// When the flag is true will close the underlying stream also. + /// + public bool IsStreamOwner + { + get { return isStreamOwner; } + set { isStreamOwner = value; } + } + + + #region Stream Overrides + /// + /// Gets a value indicating if the stream supports reading + /// + public override bool CanRead + { + get { + return baseStream.CanRead; + } + } + + /// + /// Gets a value indicating whether the current stream supports seeking. + /// + public override bool CanSeek { + get { + return baseStream.CanSeek; + } + } + + /// + /// Gets a value indicating whether the current stream supports writing. + /// This property always returns false + /// + public override bool CanWrite { + get { + return false; + } + } + + /// + /// Gets the length in bytes of the stream. + /// + public override long Length { + get { + return baseStream.Length; + } + } + + /// + /// Gets or sets the streams position. + /// Setting the position is not supported and will throw a NotSupportException + /// + /// Any attempt to set the position + public override long Position { + get { + return baseStream.Position; + } + set { + throw new NotSupportedException("BZip2InputStream position cannot be set"); + } + } + + /// + /// Flushes the stream. + /// + public override void Flush() + { + if (baseStream != null) { + baseStream.Flush(); + } + } + + /// + /// Set the streams position. This operation is not supported and will throw a NotSupportedException + /// + /// Any access + public override long Seek(long offset, SeekOrigin origin) + { + throw new NotSupportedException("BZip2InputStream Seek not supported"); + } + + /// + /// Sets the length of this stream to the given value. + /// This operation is not supported and will throw a NotSupportedExceptionortedException + /// + /// Any access + public override void SetLength(long value) + { + throw new NotSupportedException("BZip2InputStream SetLength not supported"); + } + + /// + /// Writes a block of bytes to this stream using data from a buffer. + /// This operation is not supported and will throw a NotSupportedException + /// + /// Any access + public override void Write(byte[] buffer, int offset, int count) + { + throw new NotSupportedException("BZip2InputStream Write not supported"); + } + + /// + /// Writes a byte to the current position in the file stream. + /// This operation is not supported and will throw a NotSupportedException + /// + /// The value to write. + /// Any access + public override void WriteByte(byte value) + { + throw new NotSupportedException("BZip2InputStream WriteByte not supported"); + } + + /// + /// Read a sequence of bytes and advances the read position by one byte. + /// + /// Array of bytes to store values in + /// Offset in array to begin storing data + /// The maximum number of bytes to read + /// The total number of bytes read into the buffer. This might be less + /// than the number of bytes requested if that number of bytes are not + /// currently available or zero if the end of the stream is reached. + /// + public override int Read(byte[] buffer, int offset, int count) + { + if ( buffer == null ) + { + throw new ArgumentNullException("buffer"); + } + + for (int i = 0; i < count; ++i) { + int rb = ReadByte(); + if (rb == -1) { + return i; + } + buffer[offset + i] = (byte)rb; + } + return count; + } + + /// + /// Closes the stream, releasing any associated resources. + /// + public override void Close() + { + if ( IsStreamOwner && (baseStream != null) ) { + baseStream.Close(); + } + } + /// + /// Read a byte from stream advancing position + /// + /// byte read or -1 on end of stream + public override int ReadByte() + { + if (streamEnd) + { + return -1; // ok + } + + int retChar = currentChar; + switch (currentState) + { + case RAND_PART_B_STATE: + SetupRandPartB(); + break; + case RAND_PART_C_STATE: + SetupRandPartC(); + break; + case NO_RAND_PART_B_STATE: + SetupNoRandPartB(); + break; + case NO_RAND_PART_C_STATE: + SetupNoRandPartC(); + break; + case START_BLOCK_STATE: + case NO_RAND_PART_A_STATE: + case RAND_PART_A_STATE: + break; + default: + break; + } + return retChar; + } + + #endregion + + void MakeMaps() + { + nInUse = 0; + for (int i = 0; i < 256; ++i) { + if (inUse[i]) { + seqToUnseq[nInUse] = (byte)i; + unseqToSeq[i] = (byte)nInUse; + nInUse++; + } + } + } + + void Initialize() + { + char magic1 = BsGetUChar(); + char magic2 = BsGetUChar(); + + char magic3 = BsGetUChar(); + char magic4 = BsGetUChar(); + + if (magic1 != 'B' || magic2 != 'Z' || magic3 != 'h' || magic4 < '1' || magic4 > '9') { + streamEnd = true; + return; + } + + SetDecompressStructureSizes(magic4 - '0'); + computedCombinedCRC = 0; + } + + void InitBlock() + { + char magic1 = BsGetUChar(); + char magic2 = BsGetUChar(); + char magic3 = BsGetUChar(); + char magic4 = BsGetUChar(); + char magic5 = BsGetUChar(); + char magic6 = BsGetUChar(); + + if (magic1 == 0x17 && magic2 == 0x72 && magic3 == 0x45 && magic4 == 0x38 && magic5 == 0x50 && magic6 == 0x90) { + Complete(); + return; + } + + if (magic1 != 0x31 || magic2 != 0x41 || magic3 != 0x59 || magic4 != 0x26 || magic5 != 0x53 || magic6 != 0x59) { + BadBlockHeader(); + streamEnd = true; + return; + } + + storedBlockCRC = BsGetInt32(); + + blockRandomised = (BsR(1) == 1); + + GetAndMoveToFrontDecode(); + + mCrc.Reset(); + currentState = START_BLOCK_STATE; + } + + void EndBlock() + { + computedBlockCRC = (int)mCrc.Value; + + // -- A bad CRC is considered a fatal error. -- + if (storedBlockCRC != computedBlockCRC) { + CrcError(); + } + + // 1528150659 + computedCombinedCRC = ((computedCombinedCRC << 1) & 0xFFFFFFFF) | (computedCombinedCRC >> 31); + computedCombinedCRC = computedCombinedCRC ^ (uint)computedBlockCRC; + } + + void Complete() + { + storedCombinedCRC = BsGetInt32(); + if (storedCombinedCRC != (int)computedCombinedCRC) { + CrcError(); + } + + streamEnd = true; + } + + void BsSetStream(Stream stream) + { + baseStream = stream; + bsLive = 0; + bsBuff = 0; + } + + void FillBuffer() + { + int thech = 0; + + try { + thech = baseStream.ReadByte(); + } catch (Exception) { + CompressedStreamEOF(); + } + + if (thech == -1) { + CompressedStreamEOF(); + } + + bsBuff = (bsBuff << 8) | (thech & 0xFF); + bsLive += 8; + } + + int BsR(int n) + { + while (bsLive < n) { + FillBuffer(); + } + + int v = (bsBuff >> (bsLive - n)) & ((1 << n) - 1); + bsLive -= n; + return v; + } + + char BsGetUChar() + { + return (char)BsR(8); + } + + int BsGetint() + { + int u = BsR(8); + u = (u << 8) | BsR(8); + u = (u << 8) | BsR(8); + u = (u << 8) | BsR(8); + return u; + } + + int BsGetIntVS(int numBits) + { + return BsR(numBits); + } + + int BsGetInt32() + { + return BsGetint(); + } + + void RecvDecodingTables() + { + char[][] len = new char[BZip2Constants.N_GROUPS][]; + for (int i = 0; i < BZip2Constants.N_GROUPS; ++i) { + len[i] = new char[BZip2Constants.MAX_ALPHA_SIZE]; + } + + bool[] inUse16 = new bool[16]; + + //--- Receive the mapping table --- + for (int i = 0; i < 16; i++) { + inUse16[i] = (BsR(1) == 1); + } + + for (int i = 0; i < 16; i++) { + if (inUse16[i]) { + for (int j = 0; j < 16; j++) { + inUse[i * 16 + j] = (BsR(1) == 1); + } + } else { + for (int j = 0; j < 16; j++) { + inUse[i * 16 + j] = false; + } + } + } + + MakeMaps(); + int alphaSize = nInUse + 2; + + //--- Now the selectors --- + int nGroups = BsR(3); + int nSelectors = BsR(15); + + for (int i = 0; i < nSelectors; i++) { + int j = 0; + while (BsR(1) == 1) { + j++; + } + selectorMtf[i] = (byte)j; + } + + //--- Undo the MTF values for the selectors. --- + byte[] pos = new byte[BZip2Constants.N_GROUPS]; + for (int v = 0; v < nGroups; v++) { + pos[v] = (byte)v; + } + + for (int i = 0; i < nSelectors; i++) { + int v = selectorMtf[i]; + byte tmp = pos[v]; + while (v > 0) { + pos[v] = pos[v - 1]; + v--; + } + pos[0] = tmp; + selector[i] = tmp; + } + + //--- Now the coding tables --- + for (int t = 0; t < nGroups; t++) { + int curr = BsR(5); + for (int i = 0; i < alphaSize; i++) { + while (BsR(1) == 1) { + if (BsR(1) == 0) { + curr++; + } else { + curr--; + } + } + len[t][i] = (char)curr; + } + } + + //--- Create the Huffman decoding tables --- + for (int t = 0; t < nGroups; t++) { + int minLen = 32; + int maxLen = 0; + for (int i = 0; i < alphaSize; i++) { + maxLen = Math.Max(maxLen, len[t][i]); + minLen = Math.Min(minLen, len[t][i]); + } + HbCreateDecodeTables(limit[t], baseArray[t], perm[t], len[t], minLen, maxLen, alphaSize); + minLens[t] = minLen; + } + } + + void GetAndMoveToFrontDecode() + { + byte[] yy = new byte[256]; + int nextSym; + + int limitLast = BZip2Constants.baseBlockSize * blockSize100k; + origPtr = BsGetIntVS(24); + + RecvDecodingTables(); + int EOB = nInUse+1; + int groupNo = -1; + int groupPos = 0; + + /*-- + Setting up the unzftab entries here is not strictly + necessary, but it does save having to do it later + in a separate pass, and so saves a block's worth of + cache misses. + --*/ + for (int i = 0; i <= 255; i++) { + unzftab[i] = 0; + } + + for (int i = 0; i <= 255; i++) { + yy[i] = (byte)i; + } + + last = -1; + + if (groupPos == 0) { + groupNo++; + groupPos = BZip2Constants.G_SIZE; + } + + groupPos--; + int zt = selector[groupNo]; + int zn = minLens[zt]; + int zvec = BsR(zn); + int zj; + + while (zvec > limit[zt][zn]) { + if (zn > 20) { // the longest code + throw new Exception("Bzip data error"); + } + zn++; + while (bsLive < 1) { + FillBuffer(); + } + zj = (bsBuff >> (bsLive-1)) & 1; + bsLive--; + zvec = (zvec << 1) | zj; + } + if (zvec - baseArray[zt][zn] < 0 || zvec - baseArray[zt][zn] >= BZip2Constants.MAX_ALPHA_SIZE) { + throw new Exception("Bzip data error"); + } + nextSym = perm[zt][zvec - baseArray[zt][zn]]; + + while (true) { + if (nextSym == EOB) { + break; + } + + if (nextSym == BZip2Constants.RUNA || nextSym == BZip2Constants.RUNB) { + int s = -1; + int n = 1; + do { + if (nextSym == BZip2Constants.RUNA) { + s += (0 + 1) * n; + } else if (nextSym == BZip2Constants.RUNB) { + s += (1 + 1) * n; + } + + n <<= 1; + + if (groupPos == 0) { + groupNo++; + groupPos = BZip2Constants.G_SIZE; + } + + groupPos--; + + zt = selector[groupNo]; + zn = minLens[zt]; + zvec = BsR(zn); + + while (zvec > limit[zt][zn]) { + zn++; + while (bsLive < 1) { + FillBuffer(); + } + zj = (bsBuff >> (bsLive - 1)) & 1; + bsLive--; + zvec = (zvec << 1) | zj; + } + nextSym = perm[zt][zvec - baseArray[zt][zn]]; + } while (nextSym == BZip2Constants.RUNA || nextSym == BZip2Constants.RUNB); + + s++; + byte ch = seqToUnseq[yy[0]]; + unzftab[ch] += s; + + while (s > 0) { + last++; + ll8[last] = ch; + s--; + } + + if (last >= limitLast) { + BlockOverrun(); + } + continue; + } else { + last++; + if (last >= limitLast) { + BlockOverrun(); + } + + byte tmp = yy[nextSym - 1]; + unzftab[seqToUnseq[tmp]]++; + ll8[last] = seqToUnseq[tmp]; + + for (int j = nextSym-1; j > 0; --j) { + yy[j] = yy[j - 1]; + } + yy[0] = tmp; + + if (groupPos == 0) { + groupNo++; + groupPos = BZip2Constants.G_SIZE; + } + + groupPos--; + zt = selector[groupNo]; + zn = minLens[zt]; + zvec = BsR(zn); + while (zvec > limit[zt][zn]) { + zn++; + while (bsLive < 1) { + FillBuffer(); + } + zj = (bsBuff >> (bsLive-1)) & 1; + bsLive--; + zvec = (zvec << 1) | zj; + } + nextSym = perm[zt][zvec - baseArray[zt][zn]]; + continue; + } + } + } + + void SetupBlock() + { + int[] cftab = new int[257]; + + cftab[0] = 0; + Array.Copy(unzftab, 0, cftab, 1, 256); + + for (int i = 1; i <= 256; i++) { + cftab[i] += cftab[i - 1]; + } + + for (int i = 0; i <= last; i++) { + byte ch = ll8[i]; + tt[cftab[ch]] = i; + cftab[ch]++; + } + + cftab = null; + + tPos = tt[origPtr]; + + count = 0; + i2 = 0; + ch2 = 256; /*-- not a char and not EOF --*/ + + if (blockRandomised) { + rNToGo = 0; + rTPos = 0; + SetupRandPartA(); + } else { + SetupNoRandPartA(); + } + } + + void SetupRandPartA() + { + if (i2 <= last) { + chPrev = ch2; + ch2 = ll8[tPos]; + tPos = tt[tPos]; + if (rNToGo == 0) { + rNToGo = BZip2Constants.rNums[rTPos]; + rTPos++; + if (rTPos == 512) { + rTPos = 0; + } + } + rNToGo--; + ch2 ^= (int)((rNToGo == 1) ? 1 : 0); + i2++; + + currentChar = ch2; + currentState = RAND_PART_B_STATE; + mCrc.Update(ch2); + } else { + EndBlock(); + InitBlock(); + SetupBlock(); + } + } + + void SetupNoRandPartA() + { + if (i2 <= last) { + chPrev = ch2; + ch2 = ll8[tPos]; + tPos = tt[tPos]; + i2++; + + currentChar = ch2; + currentState = NO_RAND_PART_B_STATE; + mCrc.Update(ch2); + } else { + EndBlock(); + InitBlock(); + SetupBlock(); + } + } + + void SetupRandPartB() + { + if (ch2 != chPrev) { + currentState = RAND_PART_A_STATE; + count = 1; + SetupRandPartA(); + } else { + count++; + if (count >= 4) { + z = ll8[tPos]; + tPos = tt[tPos]; + if (rNToGo == 0) { + rNToGo = BZip2Constants.rNums[rTPos]; + rTPos++; + if (rTPos == 512) { + rTPos = 0; + } + } + rNToGo--; + z ^= (byte)((rNToGo == 1) ? 1 : 0); + j2 = 0; + currentState = RAND_PART_C_STATE; + SetupRandPartC(); + } else { + currentState = RAND_PART_A_STATE; + SetupRandPartA(); + } + } + } + + void SetupRandPartC() + { + if (j2 < (int)z) { + currentChar = ch2; + mCrc.Update(ch2); + j2++; + } else { + currentState = RAND_PART_A_STATE; + i2++; + count = 0; + SetupRandPartA(); + } + } + + void SetupNoRandPartB() + { + if (ch2 != chPrev) { + currentState = NO_RAND_PART_A_STATE; + count = 1; + SetupNoRandPartA(); + } else { + count++; + if (count >= 4) { + z = ll8[tPos]; + tPos = tt[tPos]; + currentState = NO_RAND_PART_C_STATE; + j2 = 0; + SetupNoRandPartC(); + } else { + currentState = NO_RAND_PART_A_STATE; + SetupNoRandPartA(); + } + } + } + + void SetupNoRandPartC() + { + if (j2 < (int)z) { + currentChar = ch2; + mCrc.Update(ch2); + j2++; + } else { + currentState = NO_RAND_PART_A_STATE; + i2++; + count = 0; + SetupNoRandPartA(); + } + } + + void SetDecompressStructureSizes(int newSize100k) + { + if (!(0 <= newSize100k && newSize100k <= 9 && 0 <= blockSize100k && blockSize100k <= 9)) { + throw new Exception("Invalid block size"); + } + + blockSize100k = newSize100k; + + if (newSize100k == 0) { + return; + } + + int n = BZip2Constants.baseBlockSize * newSize100k; + ll8 = new byte[n]; + tt = new int[n]; + } + + static void CompressedStreamEOF() + { + throw new Exception("BZip2 input stream end of compressed stream"); + } + + static void BlockOverrun() + { + throw new Exception("BZip2 input stream block overrun"); + } + + static void BadBlockHeader() + { + throw new Exception("BZip2 input stream bad block header"); + } + + static void CrcError() + { + throw new Exception("BZip2 input stream crc error"); + } + + static void HbCreateDecodeTables(int[] limit, int[] baseArray, int[] perm, char[] length, int minLen, int maxLen, int alphaSize) + { + int pp = 0; + + for (int i = minLen; i <= maxLen; ++i) + { + for (int j = 0; j < alphaSize; ++j) + { + if (length[j] == i) + { + perm[pp] = j; + ++pp; + } + } + } + + for (int i = 0; i < BZip2Constants.MAX_CODE_LEN; i++) + { + baseArray[i] = 0; + } + + for (int i = 0; i < alphaSize; i++) + { + ++baseArray[length[i] + 1]; + } + + for (int i = 1; i < BZip2Constants.MAX_CODE_LEN; i++) + { + baseArray[i] += baseArray[i - 1]; + } + + for (int i = 0; i < BZip2Constants.MAX_CODE_LEN; i++) + { + limit[i] = 0; + } + + int vec = 0; + + for (int i = minLen; i <= maxLen; i++) + { + vec += (baseArray[i + 1] - baseArray[i]); + limit[i] = vec - 1; + vec <<= 1; + } + + for (int i = minLen + 1; i <= maxLen; i++) + { + baseArray[i] = ((limit[i - 1] + 1) << 1) - baseArray[i]; + } + } + + #region Instance Fields + /*-- + index of the last char in the block, so + the block size == last + 1. + --*/ + int last; + + /*-- + index in zptr[] of original string after sorting. + --*/ + int origPtr; + + /*-- + always: in the range 0 .. 9. + The current block size is 100000 * this number. + --*/ + int blockSize100k; + + bool blockRandomised; + + int bsBuff; + int bsLive; + IChecksum mCrc = new StrangeCRC(); + + bool[] inUse = new bool[256]; + int nInUse; + + byte[] seqToUnseq = new byte[256]; + byte[] unseqToSeq = new byte[256]; + + byte[] selector = new byte[BZip2Constants.MAX_SELECTORS]; + byte[] selectorMtf = new byte[BZip2Constants.MAX_SELECTORS]; + + int[] tt; + byte[] ll8; + + /*-- + freq table collected to save a pass over the data + during decompression. + --*/ + int[] unzftab = new int[256]; + + int[][] limit = new int[BZip2Constants.N_GROUPS][]; + int[][] baseArray = new int[BZip2Constants.N_GROUPS][]; + int[][] perm = new int[BZip2Constants.N_GROUPS][]; + int[] minLens = new int[BZip2Constants.N_GROUPS]; + + Stream baseStream; + bool streamEnd; + + int currentChar = -1; + + int currentState = START_BLOCK_STATE; + + int storedBlockCRC, storedCombinedCRC; + int computedBlockCRC; + uint computedCombinedCRC; + + int count, chPrev, ch2; + int tPos; + int rNToGo; + int rTPos; + int i2, j2; + byte z; + bool isStreamOwner = true; + #endregion + } +} diff --git a/BZip2Decompress/IChecksum.cs b/BZip2Decompress/IChecksum.cs new file mode 100644 index 0000000..75462b8 --- /dev/null +++ b/BZip2Decompress/IChecksum.cs @@ -0,0 +1,93 @@ +// IChecksum.cs - Interface to compute a data checksum +// Copyright (C) 2001 Mike Krueger +// +// This file was translated from java, it was part of the GNU Classpath +// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +// Linking this library statically or dynamically with other modules is +// making a combined work based on this library. Thus, the terms and +// conditions of the GNU General Public License cover the whole +// combination. +// +// As a special exception, the copyright holders of this library give you +// permission to link this library with independent modules to produce an +// executable, regardless of the license terms of these independent +// modules, and to copy and distribute the resulting executable under +// terms of your choice, provided that you also meet, for each linked +// independent module, the terms and conditions of the license of that +// module. An independent module is a module which is not derived from +// or based on this library. If you modify this library, you may extend +// this exception to your version of the library, but you are not +// obligated to do so. If you do not wish to do so, delete this +// exception statement from your version. + +namespace LSLEditor.BZip2Decompress +{ + + /// + /// Interface to compute a data checksum used by checked input/output streams. + /// A data checksum can be updated by one byte or with a byte array. After each + /// update the value of the current checksum can be returned by calling + /// getValue. The complete checksum object can also be reset + /// so it can be used again with new data. + /// + public interface IChecksum + { + /// + /// Returns the data checksum computed so far. + /// + long Value + { + get; + } + + /// + /// Resets the data checksum as if no update was ever called. + /// + void Reset(); + + /// + /// Adds one byte to the data checksum. + /// + /// + /// the data value to add. The high byte of the int is ignored. + /// + void Update(int value); + + /// + /// Updates the data checksum with the bytes taken from the array. + /// + /// + /// buffer an array of bytes + /// + void Update(byte[] buffer); + + /// + /// Adds the byte array to the data checksum. + /// + /// + /// The buffer which contains the data + /// + /// + /// The offset in the buffer where the data starts + /// + /// + /// the number of data bytes to add. + /// + void Update(byte[] buffer, int offset, int count); + } +} diff --git a/BZip2Decompress/MD5Verify.cs b/BZip2Decompress/MD5Verify.cs new file mode 100644 index 0000000..0a6e710 --- /dev/null +++ b/BZip2Decompress/MD5Verify.cs @@ -0,0 +1,18 @@ +using System; +using System.Security.Cryptography; +using System.IO; + +namespace LSLEditor.BZip2Decompress +{ + class MD5Verify + { + public static string ComputeHash(string strFile) + { + MD5CryptoServiceProvider csp = new MD5CryptoServiceProvider(); + FileStream stream = File.OpenRead(strFile); + byte[] hash = csp.ComputeHash(stream); + stream.Close(); + return BitConverter.ToString(hash).Replace("-", "").ToLower(); + } + } +} diff --git a/BZip2Decompress/StrangeCrc.cs b/BZip2Decompress/StrangeCrc.cs new file mode 100644 index 0000000..2a0e452 --- /dev/null +++ b/BZip2Decompress/StrangeCrc.cs @@ -0,0 +1,207 @@ +// StrangeCRC.cs - computes a crc used in the bziplib +// +// Copyright (C) 2001 Mike Krueger +// +// This file was translated from java, it was part of the GNU Classpath +// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +// Linking this library statically or dynamically with other modules is +// making a combined work based on this library. Thus, the terms and +// conditions of the GNU General Public License cover the whole +// combination. +// +// As a special exception, the copyright holders of this library give you +// permission to link this library with independent modules to produce an +// executable, regardless of the license terms of these independent +// modules, and to copy and distribute the resulting executable under +// terms of your choice, provided that you also meet, for each linked +// independent module, the terms and conditions of the license of that +// module. An independent module is a module which is not derived from +// or based on this library. If you modify this library, you may extend +// this exception to your version of the library, but you are not +// obligated to do so. If you do not wish to do so, delete this +// exception statement from your version. + +using System; + +namespace LSLEditor.BZip2Decompress +{ + /// + /// Bzip2 checksum algorithm + /// + public class StrangeCRC : IChecksum + { + readonly static uint[] crc32Table = { + 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, + 0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005, + 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61, + 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, + 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9, + 0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75, + 0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011, + 0x791d4014, 0x7ddc5da3, 0x709f7b7a, 0x745e66cd, + 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039, + 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, + 0xbe2b5b58, 0xbaea46ef, 0xb7a96036, 0xb3687d81, + 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d, + 0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49, + 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95, + 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, + 0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, + 0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae, + 0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072, + 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16, + 0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca, + 0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde, + 0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02, + 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, 0x53dc6066, + 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba, + 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, + 0xbfa1b04b, 0xbb60adfc, 0xb6238b25, 0xb2e29692, + 0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6, + 0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a, + 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e, + 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, + 0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686, + 0xd5b88683, 0xd1799b34, 0xdc3abded, 0xd8fba05a, + 0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637, + 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb, + 0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f, + 0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53, + 0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47, + 0x36194d42, 0x32d850f5, 0x3f9b762c, 0x3b5a6b9b, + 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff, + 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, + 0xf12f560e, 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7, + 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b, + 0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f, + 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3, + 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, + 0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, + 0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f, + 0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3, + 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640, + 0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c, + 0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8, + 0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24, + 0x119b4be9, 0x155a565e, 0x18197087, 0x1cd86d30, + 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec, + 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, + 0x2497d08d, 0x2056cd3a, 0x2d15ebe3, 0x29d4f654, + 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0, + 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c, + 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18, + 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, + 0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0, + 0x9abc8bd5, 0x9e7d9662, 0x933eb0bb, 0x97ffad0c, + 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668, + 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4 + }; + + int globalCrc; + + /// + /// Initialise a default instance of + /// + public StrangeCRC() + { + Reset(); + } + + /// + /// Reset the state of Crc. + /// + public void Reset() + { + globalCrc = -1; + } + + /// + /// Get the current Crc value. + /// + public long Value { + get { + return ~globalCrc; + } + } + + /// + /// Update the Crc value. + /// + /// data update is based on + public void Update(int value) + { + int temp = (globalCrc >> 24) ^ value; + if (temp < 0) { + temp = 256 + temp; + } + globalCrc = unchecked((int)((globalCrc << 8) ^ crc32Table[temp])); + } + + /// + /// Update Crc based on a block of data + /// + public void Update(byte[] buffer) + { + if (buffer == null) { + throw new ArgumentNullException("buffer"); + } + + Update(buffer, 0, buffer.Length); + } + + /// + /// Update Crc based on a portion of a block of data + /// + /// block of data + /// index of first byte to use + /// number of bytes to use + public void Update(byte[] buffer, int offset, int count) + { + if (buffer == null) { + throw new ArgumentNullException("buffer"); + } + + if ( offset < 0 ) + { +#if COMPACT_FRAMEWORK_V10 + throw new ArgumentOutOfRangeException("offset"); +#else + throw new ArgumentOutOfRangeException("offset", "cannot be less than zero"); +#endif + } + + if ( count < 0 ) + { +#if COMPACT_FRAMEWORK_V10 + throw new ArgumentOutOfRangeException("count"); +#else + throw new ArgumentOutOfRangeException("count", "cannot be less than zero"); +#endif + } + + if ( offset + count > buffer.Length ) + { + throw new ArgumentOutOfRangeException("count"); + } + + for (int i = 0; i < count; ++i) { + Update(buffer[offset++]); + } + } + } +} diff --git a/Browser.Designer.cs b/Browser.Designer.cs new file mode 100644 index 0000000..2bf08cb --- /dev/null +++ b/Browser.Designer.cs @@ -0,0 +1,81 @@ +namespace LSLEditor +{ + partial class Browser + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.tabControl1 = new System.Windows.Forms.TabControlExtended(this.components); + this.contextMenuStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // contextMenuStrip1 + // + this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.closeToolStripMenuItem}); + this.contextMenuStrip1.Name = "contextMenuStrip1"; + this.contextMenuStrip1.Size = new System.Drawing.Size(112, 26); + // + // closeToolStripMenuItem + // + this.closeToolStripMenuItem.Name = "closeToolStripMenuItem"; + this.closeToolStripMenuItem.Size = new System.Drawing.Size(111, 22); + this.closeToolStripMenuItem.Text = "Close"; + this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click); + // + // tabControl1 + // + this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl1.Location = new System.Drawing.Point(0, 0); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(592, 366); + this.tabControl1.TabIndex = 1; + this.tabControl1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.tabControl1_MouseDown); + // + // Browser + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(592, 366); + this.Controls.Add(this.tabControl1); + this.Name = "Browser"; + this.Text = "Browser"; + this.contextMenuStrip1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TabControlExtended tabControl1; + private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; + private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem; + } +} \ No newline at end of file diff --git a/Browser.cs b/Browser.cs new file mode 100644 index 0000000..3a0ae25 --- /dev/null +++ b/Browser.cs @@ -0,0 +1,179 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.ComponentModel; +using System.Drawing; +using System.Drawing.Imaging; +using System.Windows.Forms; + +namespace LSLEditor +{ + public partial class Browser : Form + { + private LSLEditorForm lslEditorForm; + + public Browser(LSLEditorForm lslEditorForm) + { + InitializeComponent(); + + this.Icon = lslEditorForm.Icon; + this.lslEditorForm = lslEditorForm; + + // enables close buttons on tabs + this.tabControl1.SetDrawMode(); + } + + private void axWebBrowser1_StatusTextChanged(object sender, EventArgs e) + { + WebBrowser axWebBrowser1 = sender as WebBrowser; + ToolStripStatusLabel status = axWebBrowser1.Tag as ToolStripStatusLabel; + if (status == null) + return; + status.Text = axWebBrowser1.StatusText; + } + + + private void axWebBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e) + { + string strUrl = e.Url.ToString(); + if (strUrl.EndsWith(".lsl")) + { + e.Cancel = true; + if (MessageBox.Show("Import LSL script?", "Import script", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + return; + + WebBrowser axWebBrowser1 = sender as WebBrowser; + axWebBrowser1.Stop(); + + this.lslEditorForm.OpenFile(strUrl,Guid.NewGuid()); + } + } + + public void ShowWebBrowser(string strTabName, string strUrl) + { + WebBrowser axWebBrowser1 = null; + try + { + if (!Properties.Settings.Default.HelpNewTab) + { + TabPage tabPage = this.tabControl1.TabPages[0]; + tabPage.Text = strTabName + " "; + axWebBrowser1 = tabPage.Controls[0] as WebBrowser; + } + } + catch + { + } + + if (axWebBrowser1 == null) + { + TabPage tabPage = new TabPage(strTabName + " "); + tabPage.BackColor = Color.White; + + axWebBrowser1 = new WebBrowser(); + + ToolStripStatusLabel toolStripStatusLabel1 = new ToolStripStatusLabel(); + StatusStrip statusStrip1 = new StatusStrip(); + + statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { toolStripStatusLabel1}); + statusStrip1.Location = new System.Drawing.Point(0, 318); + statusStrip1.Name = "statusStrip1"; + statusStrip1.Size = new System.Drawing.Size(584, 22); + statusStrip1.TabIndex = 0; + statusStrip1.Text = "statusStrip1"; + + toolStripStatusLabel1.Name = "toolStripStatusLabel1"; + toolStripStatusLabel1.Size = new System.Drawing.Size(109, 17); + toolStripStatusLabel1.Text = "toolStripStatusLabel1"; + + tabPage.Controls.Add(axWebBrowser1); + + tabPage.Controls.Add(statusStrip1); + + this.tabControl1.TabPages.Add(tabPage); + this.tabControl1.SelectedIndex = this.tabControl1.TabCount - 1; + + // reference + axWebBrowser1.Tag = toolStripStatusLabel1; + + axWebBrowser1.Dock = DockStyle.Fill; + axWebBrowser1.StatusTextChanged += new EventHandler(axWebBrowser1_StatusTextChanged); + axWebBrowser1.Navigating += new WebBrowserNavigatingEventHandler(axWebBrowser1_Navigating); + } + axWebBrowser1.Navigate(strUrl); + } + + private void closeToolStripMenuItem_Click(object sender, EventArgs e) + { + int intTabToClose = (int)this.contextMenuStrip1.Tag; + if (intTabToClose >= this.tabControl1.TabCount) + return; + this.tabControl1.TabPages.RemoveAt(intTabToClose); + } + + private void tabControl1_MouseDown(object sender, MouseEventArgs e) + { + TabControl tabControl = sender as TabControl; + if (tabControl == null) + return; + if (e.Button == MouseButtons.Right) + { + for (int intI = 0; intI < tabControl.TabCount; intI++) + { + Rectangle rt = tabControl.GetTabRect(intI); + if (e.X > rt.Left && e.X < rt.Right + && e.Y > rt.Top && e.Y < rt.Bottom) + { + this.contextMenuStrip1.Tag = intI; + this.contextMenuStrip1.Show(this.tabControl1, new Point(e.X, e.Y)); + } + } + } + + } + + + + } +} \ No newline at end of file diff --git a/Browser.resx b/Browser.resx new file mode 100644 index 0000000..174d5e9 --- /dev/null +++ b/Browser.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 127, 17 + + \ No newline at end of file diff --git a/BugReport/BugReportForm.Designer.cs b/BugReport/BugReportForm.Designer.cs new file mode 100644 index 0000000..54ad41c --- /dev/null +++ b/BugReport/BugReportForm.Designer.cs @@ -0,0 +1,437 @@ +namespace LSLEditor.BugReport +{ + partial class BugReportForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.textBox3 = new System.Windows.Forms.TextBox(); + this.panel2 = new System.Windows.Forms.Panel(); + this.button4 = new System.Windows.Forms.Button(); + this.label6 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.listView1 = new System.Windows.Forms.ListView(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.panel1 = new System.Windows.Forms.Panel(); + this.button3 = new System.Windows.Forms.Button(); + this.progressBar1 = new System.Windows.Forms.ProgressBar(); + this.button2 = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.textBox5 = new System.Windows.Forms.TextBox(); + this.splitter2 = new System.Windows.Forms.Splitter(); + this.textBox4 = new System.Windows.Forms.TextBox(); + this.splitter1 = new System.Windows.Forms.Splitter(); + this.listView2 = new System.Windows.Forms.ListView(); + this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); + this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.groupBox1.SuspendLayout(); + this.panel2.SuspendLayout(); + this.tabControl1.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.panel1.SuspendLayout(); + this.tabPage2.SuspendLayout(); + this.contextMenuStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.textBox3); + this.groupBox1.Controls.Add(this.panel2); + this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox1.Location = new System.Drawing.Point(3, 3); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Padding = new System.Windows.Forms.Padding(8); + this.groupBox1.Size = new System.Drawing.Size(712, 330); + this.groupBox1.TabIndex = 0; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "report"; + // + // textBox3 + // + this.textBox3.AcceptsReturn = true; + this.textBox3.AcceptsTab = true; + this.textBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.textBox3.Location = new System.Drawing.Point(8, 160); + this.textBox3.Multiline = true; + this.textBox3.Name = "textBox3"; + this.textBox3.ScrollBars = System.Windows.Forms.ScrollBars.Both; + this.textBox3.Size = new System.Drawing.Size(696, 162); + this.textBox3.TabIndex = 4; + // + // panel2 + // + this.panel2.Controls.Add(this.button4); + this.panel2.Controls.Add(this.label6); + this.panel2.Controls.Add(this.label5); + this.panel2.Controls.Add(this.label4); + this.panel2.Controls.Add(this.label3); + this.panel2.Controls.Add(this.label1); + this.panel2.Controls.Add(this.textBox1); + this.panel2.Controls.Add(this.listView1); + this.panel2.Controls.Add(this.textBox2); + this.panel2.Controls.Add(this.label2); + this.panel2.Dock = System.Windows.Forms.DockStyle.Top; + this.panel2.Location = new System.Drawing.Point(8, 21); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(696, 139); + this.panel2.TabIndex = 6; + // + // button4 + // + this.button4.Location = new System.Drawing.Point(312, 112); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(75, 24); + this.button4.TabIndex = 9; + this.button4.Text = "check all"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click); + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(0, 80); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(191, 13); + this.label6.TabIndex = 8; + this.label6.Text = "and will not be made public in any way!"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(0, 64); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(217, 13); + this.label5.TabIndex = 7; + this.label5.Text = "Uploaded files will only be used for bugfixing,"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(208, 8); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(98, 13); + this.label4.TabIndex = 6; + this.label4.Text = "Files to be included"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(0, 104); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(130, 13); + this.label3.TabIndex = 5; + this.label3.Text = "Description of the problem"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(0, 8); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(35, 13); + this.label1.TabIndex = 2; + this.label1.Text = "Name"; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(40, 8); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(168, 20); + this.textBox1.TabIndex = 1; + // + // listView1 + // + this.listView1.CheckBoxes = true; + this.listView1.Location = new System.Drawing.Point(312, 8); + this.listView1.Name = "listView1"; + this.listView1.Size = new System.Drawing.Size(248, 104); + this.listView1.TabIndex = 3; + this.listView1.UseCompatibleStateImageBehavior = false; + this.listView1.View = System.Windows.Forms.View.Details; + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(40, 40); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(168, 20); + this.textBox2.TabIndex = 2; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(0, 40); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(32, 13); + this.label2.TabIndex = 3; + this.label2.Text = "Email"; + // + // tabControl1 + // + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Controls.Add(this.tabPage2); + this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl1.Location = new System.Drawing.Point(8, 8); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(726, 402); + this.tabControl1.TabIndex = 0; + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.groupBox1); + this.tabPage1.Controls.Add(this.panel1); + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(718, 376); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "New bug report"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // panel1 + // + this.panel1.Controls.Add(this.button3); + this.panel1.Controls.Add(this.progressBar1); + this.panel1.Controls.Add(this.button2); + this.panel1.Controls.Add(this.button1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.panel1.Location = new System.Drawing.Point(3, 333); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(712, 40); + this.panel1.TabIndex = 0; + // + // button3 + // + this.button3.Location = new System.Drawing.Point(504, 8); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(75, 23); + this.button3.TabIndex = 7; + this.button3.Text = "Close"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // progressBar1 + // + this.progressBar1.Location = new System.Drawing.Point(8, 8); + this.progressBar1.Name = "progressBar1"; + this.progressBar1.Size = new System.Drawing.Size(280, 23); + this.progressBar1.TabIndex = 0; + // + // button2 + // + this.button2.Enabled = false; + this.button2.Location = new System.Drawing.Point(416, 8); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.TabIndex = 6; + this.button2.Text = "Cancel"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(296, 8); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(112, 23); + this.button1.TabIndex = 5; + this.button1.Text = "Send bug report"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // tabPage2 + // + this.tabPage2.Controls.Add(this.textBox5); + this.tabPage2.Controls.Add(this.splitter2); + this.tabPage2.Controls.Add(this.textBox4); + this.tabPage2.Controls.Add(this.splitter1); + this.tabPage2.Controls.Add(this.listView2); + this.tabPage2.Location = new System.Drawing.Point(4, 22); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(718, 376); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "Bug tracker"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // textBox5 + // + this.textBox5.AcceptsReturn = true; + this.textBox5.AcceptsTab = true; + this.textBox5.Dock = System.Windows.Forms.DockStyle.Fill; + this.textBox5.Location = new System.Drawing.Point(267, 131); + this.textBox5.Multiline = true; + this.textBox5.Name = "textBox5"; + this.textBox5.ReadOnly = true; + this.textBox5.ScrollBars = System.Windows.Forms.ScrollBars.Both; + this.textBox5.Size = new System.Drawing.Size(448, 242); + this.textBox5.TabIndex = 10; + // + // splitter2 + // + this.splitter2.Dock = System.Windows.Forms.DockStyle.Top; + this.splitter2.Location = new System.Drawing.Point(267, 128); + this.splitter2.Name = "splitter2"; + this.splitter2.Size = new System.Drawing.Size(448, 3); + this.splitter2.TabIndex = 3; + this.splitter2.TabStop = false; + // + // textBox4 + // + this.textBox4.AcceptsReturn = true; + this.textBox4.AcceptsTab = true; + this.textBox4.Dock = System.Windows.Forms.DockStyle.Top; + this.textBox4.Location = new System.Drawing.Point(267, 3); + this.textBox4.Multiline = true; + this.textBox4.Name = "textBox4"; + this.textBox4.ReadOnly = true; + this.textBox4.ScrollBars = System.Windows.Forms.ScrollBars.Both; + this.textBox4.Size = new System.Drawing.Size(448, 125); + this.textBox4.TabIndex = 9; + // + // splitter1 + // + this.splitter1.Location = new System.Drawing.Point(264, 3); + this.splitter1.Name = "splitter1"; + this.splitter1.Size = new System.Drawing.Size(3, 370); + this.splitter1.TabIndex = 1; + this.splitter1.TabStop = false; + // + // listView2 + // + this.listView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader1, + this.columnHeader2}); + this.listView2.ContextMenuStrip = this.contextMenuStrip1; + this.listView2.Dock = System.Windows.Forms.DockStyle.Left; + this.listView2.FullRowSelect = true; + this.listView2.HideSelection = false; + this.listView2.Location = new System.Drawing.Point(3, 3); + this.listView2.Name = "listView2"; + this.listView2.Size = new System.Drawing.Size(261, 370); + this.listView2.TabIndex = 8; + this.listView2.UseCompatibleStateImageBehavior = false; + this.listView2.View = System.Windows.Forms.View.Details; + this.listView2.SelectedIndexChanged += new System.EventHandler(this.listView2_SelectedIndexChanged); + // + // columnHeader1 + // + this.columnHeader1.Text = "Number"; + this.columnHeader1.Width = 85; + // + // columnHeader2 + // + this.columnHeader2.Text = "Date/Time"; + this.columnHeader2.Width = 145; + // + // contextMenuStrip1 + // + this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.deleteToolStripMenuItem}); + this.contextMenuStrip1.Name = "contextMenuStrip1"; + this.contextMenuStrip1.Size = new System.Drawing.Size(117, 26); + // + // deleteToolStripMenuItem + // + this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem"; + this.deleteToolStripMenuItem.Size = new System.Drawing.Size(116, 22); + this.deleteToolStripMenuItem.Text = "Delete"; + this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click); + // + // timer1 + // + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // BugReportForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(742, 418); + this.Controls.Add(this.tabControl1); + this.Name = "BugReportForm"; + this.Padding = new System.Windows.Forms.Padding(8); + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "LSLEditor bug report"; + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.tabControl1.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.panel1.ResumeLayout(false); + this.tabPage2.ResumeLayout(false); + this.tabPage2.PerformLayout(); + this.contextMenuStrip1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.ListView listView1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox textBox3; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.ProgressBar progressBar1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.TextBox textBox5; + private System.Windows.Forms.Splitter splitter2; + private System.Windows.Forms.TextBox textBox4; + private System.Windows.Forms.Splitter splitter1; + private System.Windows.Forms.ListView listView2; + private System.Windows.Forms.ColumnHeader columnHeader1; + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; + private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.ColumnHeader columnHeader2; + } +} \ No newline at end of file diff --git a/BugReport/BugReportForm.cs b/BugReport/BugReportForm.cs new file mode 100644 index 0000000..bac561f --- /dev/null +++ b/BugReport/BugReportForm.cs @@ -0,0 +1,298 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using System.Reflection; + +using LSLEditor.org.lsleditor.www; + + +namespace LSLEditor.BugReport +{ + public partial class BugReportForm : Form + { + private bool blnComplete; + private UploadBugReport ubr; + + private LSLEditorForm parent; + + public BugReportForm(LSLEditorForm parent) + { + InitializeComponent(); + this.parent = parent; + this.Icon = parent.Icon; + this.textBox1.Text = Properties.Settings.Default.AvatarName; + this.textBox2.Text = Properties.Settings.Default.EmailAddress; + this.listView1.Columns.Add("ScriptName",this.listView1.Width-30); + foreach (Form form in parent.Children) + { + EditForm editForm = form as EditForm; + if (editForm == null || editForm.IsDisposed) + continue; + ListViewItem lvi = new ListViewItem(editForm.ScriptName); + lvi.Checked = false; + this.listView1.Items.Add(lvi); + } + ShowBugReportsList(); + } + + private void ShowBugReportsList() + { + if (Properties.Settings.Default.Bugreports == null) + return; + this.listView2.Items.Clear(); + foreach (string Handle in Properties.Settings.Default.Bugreports) + { + long result; + if (!long.TryParse(Handle, out result)) + continue; + result *= (long)1e7; + DateTime dateTime = new DateTime(result); + ListViewItem lvi = new ListViewItem(Handle); + lvi.SubItems.Add(dateTime.ToString()); + lvi.Tag = Handle; + this.listView2.Items.Add(lvi); + } + } + + //close + private void button3_Click(object sender, EventArgs e) + { + this.timer1.Stop(); + if (ubr != null) + ubr.Stop(); + this.Close(); + } + + // cancel + private void button2_Click(object sender, EventArgs e) + { + this.button2.Enabled = false; + this.timer1.Stop(); + this.progressBar1.Value = 0; + if (ubr != null) + ubr.Stop(); + this.button1.Enabled = true; + } + + private void button1_Click(object sender, EventArgs e) + { + string strMessage = this.textBox3.Text.Trim(); + if (strMessage == "") + { + MessageBox.Show("The bug report is empty(?!), it is not send!", "Bug report", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + ubr = new UploadBugReport(); + this.button1.Enabled = false; + this.button2.Enabled = true; + this.blnComplete = false; + this.timer1.Start(); + ubr.OnComplete += new UploadBugReport.UploadCompleteHandler(ubr_OnComplete); + List list = new List(); + StringBuilder sb = new StringBuilder(); + + Properties.Settings.Default.AvatarName = this.textBox1.Text; + Properties.Settings.Default.EmailAddress = this.textBox2.Text; + + sb.AppendFormat("Version: {0} {1}\r\n", + this.parent.Text, + Assembly.GetExecutingAssembly().GetName().Version.ToString()); + sb.AppendFormat("Name: {0}\r\n", this.textBox1.Text); + sb.AppendFormat("Email: {0}\r\n\r\n", this.textBox2.Text); + sb.Append(this.textBox3.Text); + list.Add(new UploadBugReport.FileToUpload("bugreport.txt", sb.ToString())); + foreach (ListViewItem lvi in this.listView1.Items) + { + if (!lvi.Checked) + continue; + string strScriptName = lvi.Text; + string strBody = null; + foreach (Form form in parent.Children) + { + EditForm editForm = form as EditForm; + if (editForm == null || editForm.IsDisposed) + continue; + if (editForm.ScriptName == strScriptName) + strBody = editForm.SourceCode; + } + if(strBody != null) + list.Add(new UploadBugReport.FileToUpload(strScriptName, strBody)); + } + ubr.UploadAsync(list, this.progressBar1); + } + + void ubr_OnComplete(object sender, UploadBugReport.UploadCompleteEventArgs e) + { + if(e.TotalBytes == -1) + MessageBox.Show("There is something wrong. Your bug report has not been sent!!", "Oops...", MessageBoxButtons.OK, MessageBoxIcon.Error); + else + MessageBox.Show("Your bug report has been sent (" + e.TotalBytes + " bytes)", "Ready", MessageBoxButtons.OK, MessageBoxIcon.Information); + this.blnComplete = true; + } + + private void timer1_Tick(object sender, EventArgs e) + { + if (this.blnComplete) + { + this.timer1.Stop(); + + this.button1.Enabled = true; + this.button2.Enabled = false; + + this.progressBar1.Value = 0; + this.textBox3.Clear(); + ShowBugReportsList(); + this.tabControl1.SelectedIndex = 1; + } + + if (ubr != null) + { + if (!ubr.blnRunning) + { + this.button1.Enabled = true; + this.timer1.Stop(); + } + } + + } + + private void listView2_SelectedIndexChanged(object sender, EventArgs e) + { + if (this.listView2.SelectedItems.Count == 0) + return; + ListViewItem lvi = this.listView2.SelectedItems[0]; + string Handle = lvi.Tag.ToString(); + + Service1 service1 = new Service1(); + service1.GetStatusCompleted += new GetStatusCompletedEventHandler(service1_GetStatusCompleted); + service1.GetStatusAsync(Handle, Handle); + } + + void service1_GetStatusCompleted(object sender, GetStatusCompletedEventArgs e) + { + this.textBox5.Clear(); + string Handle = e.UserState.ToString(); + if (e.Error != null) + { + this.textBox4.Text = "Bug report [" + Handle + "] not available (at this time)"; + return; + } + + string strResult = e.Result; + if (strResult == null) + { + this.textBox5.Text = "Bug report [" + Handle + "] does not exist (anymore)"; + return; + } + + this.textBox5.Text = strResult.Replace("\n", "\r\n"); + + Service1 service1 = new Service1(); + service1.GetBugReportCompleted += new GetBugReportCompletedEventHandler(service1_GetBugReportCompleted); + service1.GetBugReportAsync(Handle, Handle); + } + + void service1_GetBugReportCompleted(object sender, GetBugReportCompletedEventArgs e) + { + this.textBox4.Clear(); + string Handle = e.UserState.ToString(); + + if (e.Error != null) + { + this.textBox4.Text = "Bug report [" + Handle + "] not available (at this time)"; + return; + } + + string strResult = e.Result; + if (strResult == null) + { + this.textBox4.Text = "Bug report [" + Handle + "] does not extist (anymore)"; + return; + } + + this.textBox4.Text = strResult.Replace("\n", "\r\n"); + } + + private void deleteToolStripMenuItem_Click(object sender, EventArgs e) + { + if (this.listView2.SelectedItems.Count == 0) + return; + + if (MessageBox.Show("Delete " + this.listView2.SelectedItems.Count + " bugreports?", "Delete Bugreports", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) + { + for(int intI=0; intI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 100, 17 + + + 17, 17 + + + 42 + + \ No newline at end of file diff --git a/BugReport/UploadBugReport.cs b/BugReport/UploadBugReport.cs new file mode 100644 index 0000000..db59d22 --- /dev/null +++ b/BugReport/UploadBugReport.cs @@ -0,0 +1,222 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.IO; +using System.Text; +using System.Drawing; +using System.Text.RegularExpressions; +using System.Threading; +using System.Collections; +using System.Collections.Specialized; +using System.Collections.Generic; +using System.Windows.Forms; + +namespace LSLEditor.BugReport +{ + class UploadBugReport + { + public struct FileToUpload + { + public string FileName; + public string Body; + public string Path; + public FileToUpload(string FileName, string Body) + { + this.FileName = FileName; + this.Body = Body; + this.Path = null; + } + } + + public class UploadCompleteEventArgs : EventArgs + { + public int TotalBytes; + public UploadCompleteEventArgs(int intTotal) + { + this.TotalBytes = intTotal; + } + } + + public bool blnRunning; + + public delegate void UploadCompleteHandler(object sender, UploadCompleteEventArgs e); + public event UploadCompleteHandler OnComplete; + + private Thread thread; + private ProgressBar progressbar; + private List list; + + public void UploadAsync(List list, ProgressBar progressbar) + { + this.list = list; + this.progressbar = progressbar; + + this.blnRunning = true; + + thread = new Thread(new ThreadStart(Worker)); + thread.IsBackground = true; + thread.Name = "Worker"; + thread.Start(); + } + + public void Stop() + { + this.blnRunning = false; + if (thread != null) + { + thread.Join(1000); + thread = null; + } + } + + private void Worker() + { + int intTotal = 0; + try + { + org.lsleditor.www.Service1 webservice = new org.lsleditor.www.Service1(); + + string Handle = webservice.Open(); + if (Handle == null) + { + MessageBox.Show("Can't get an upload handle", "Oops..."); + this.blnRunning = false; + return; + } + + if (Properties.Settings.Default.Bugreports == null) + Properties.Settings.Default.Bugreports = new StringCollection(); + Properties.Settings.Default.Bugreports.Add(Handle); + + // Properties.Settings.Default.Save(); + + int intNumber = 0; + foreach (FileToUpload file in this.list) + { + string strFileName = string.Format("{0}-{1}", intNumber, file.FileName); + if (file.Path == null) + { + intTotal += Upload(Handle, strFileName, Encoding.ASCII.GetBytes(file.Body)); + } + else + { + intTotal += Upload(Handle, strFileName, file.Path); + } + intNumber++; + } + } + catch + { + intTotal = -1; + } + if (this.blnRunning) + if (OnComplete != null) + OnComplete(this, new UploadCompleteEventArgs(intTotal)); + this.blnRunning = false; + } + + private delegate void SetValueDelegate(int intValue); + + private void SetMaximum(int intMaximum) + { + if (this.progressbar.InvokeRequired) + { + this.progressbar.Invoke(new SetValueDelegate(SetMaximum), new object[] { intMaximum }); + } + else + { + this.progressbar.Maximum = intMaximum; + } + } + + private void SetValue(int intValue) + { + if (this.progressbar.InvokeRequired) + { + this.progressbar.Invoke(new SetValueDelegate(SetValue), new object[] { intValue }); + } + else + { + this.progressbar.Value = intValue; + } + } + private int Upload(string Handle, string FileName, byte[] buffer) + { + org.lsleditor.www.Service1 webservice = new org.lsleditor.www.Service1(); + if (Handle == null) + return 0; + + SetMaximum(buffer.Length); + int intOffset = 0; + int intTotal = 0; + byte[] smallbuffer = new byte[1024]; + while (this.blnRunning) + { + int intLength = Math.Min(smallbuffer.Length, buffer.Length - intOffset); + if (intLength <= 0) + break; + Array.Copy(buffer, intOffset, smallbuffer, 0, intLength); + intOffset += intLength; + string strError = webservice.Write(Handle, FileName, smallbuffer, intLength); + if (strError != null) + { + MessageBox.Show("Error:" + strError, "Oops...", MessageBoxButtons.OK, MessageBoxIcon.Error); + break; + } + intTotal += intLength; + SetValue(intTotal); + } + return intTotal; + } + + private int Upload(string Handle, string FileName, string strPath) + { + FileStream fs = new FileStream(strPath, FileMode.Open, FileAccess.Read); + byte[] buffer = new byte[fs.Length]; + fs.Read(buffer, 0, (int)fs.Length); + fs.Close(); + return Upload(Handle, FileName, buffer); + } + } +} diff --git a/Decompressor/Decompress.cs b/Decompressor/Decompress.cs new file mode 100644 index 0000000..39e6f0b --- /dev/null +++ b/Decompressor/Decompress.cs @@ -0,0 +1,97 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; // bitconvertor +using System.IO; +using System.IO.Compression; + +using System.Security.Cryptography; + +namespace LSLEditor.Decompressor +{ + public class MD5Verify + { + public static string ComputeHash(string strFile) + { + MD5CryptoServiceProvider csp = new MD5CryptoServiceProvider(); + FileStream stream = File.OpenRead(strFile); + byte[] hash = csp.ComputeHash(stream); + stream.Close(); + return BitConverter.ToString(hash).Replace("-", "").ToLower(); + } + } + + + public sealed class Gzip + { + public static void Decompress(Stream inStream, Stream outStream) + { + using (outStream) + { + using (GZipStream zipStream = new GZipStream(inStream, CompressionMode.Decompress)) + { + int ch = zipStream.ReadByte(); + while (ch != -1) + { + outStream.WriteByte((byte)ch); + ch = zipStream.ReadByte(); + } + } + } + } + } + + + public sealed class Zip + { + public static void Decompress(Stream inStream, Stream outStream) + { + ZipEntry zipEntry = ZipEntry.Read(inStream); + inStream.Close(); + using (outStream) + { + zipEntry.Extract(outStream); + } + } + } +} diff --git a/Decompressor/ZipEntry.cs b/Decompressor/ZipEntry.cs new file mode 100644 index 0000000..0546d60 --- /dev/null +++ b/Decompressor/ZipEntry.cs @@ -0,0 +1,371 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; + +namespace LSLEditor.Decompressor +{ + + public class ZipEntry + { + + private const int ZipEntrySignature = 0x04034b50; + private const int ZipEntryDataDescriptorSignature = 0x08074b50; + + private DateTime _LastModified; + + private string _FileName; + + private Int16 _VersionNeeded; + + private Int16 _BitField; + + private Int16 _CompressionMethod; + + private Int32 _CompressedSize; + + private Int32 _UncompressedSize; + + private Int32 _LastModDateTime; + private Int32 _Crc32; + private byte[] _Extra; + + private byte[] __filedata; + private byte[] _FileData + { + get + { + if (__filedata == null) + { + } + return __filedata; + } + } + + private System.IO.MemoryStream _UnderlyingMemoryStream; + private System.IO.Compression.DeflateStream _CompressedStream; + private System.IO.Compression.DeflateStream CompressedStream + { + get + { + if (_CompressedStream == null) + { + _UnderlyingMemoryStream = new System.IO.MemoryStream(); + bool LeaveUnderlyingStreamOpen = true; + _CompressedStream = new System.IO.Compression.DeflateStream(_UnderlyingMemoryStream, + System.IO.Compression.CompressionMode.Compress, + LeaveUnderlyingStreamOpen); + } + return _CompressedStream; + } + } + + private static bool ReadHeader(System.IO.Stream s, ZipEntry ze) + { + int signature = Shared.ReadSignature(s); + + // return null if this is not a local file header signature + if (SignatureIsNotValid(signature)) + { + s.Seek(-4, System.IO.SeekOrigin.Current); + return false; + } + + byte[] block = new byte[26]; + int n = s.Read(block, 0, block.Length); + if (n != block.Length) return false; + + int i = 0; + ze._VersionNeeded = (short)(block[i++] + block[i++] * 256); + ze._BitField = (short)(block[i++] + block[i++] * 256); + ze._CompressionMethod = (short)(block[i++] + block[i++] * 256); + ze._LastModDateTime = block[i++] + block[i++] * 256 + block[i++] * 256 * 256 + block[i++] * 256 * 256 * 256; + + // the PKZIP spec says that if bit 3 is set (0x0008), then the CRC, Compressed size, and uncompressed size + // come directly after the file data. The only way to find it is to scan the zip archive for the signature of + // the Data Descriptor, and presume that that signature does not appear in the (compressed) data of the compressed file. + + if ((ze._BitField & 0x0008) != 0x0008) + { + ze._Crc32 = block[i++] + block[i++] * 256 + block[i++] * 256 * 256 + block[i++] * 256 * 256 * 256; + ze._CompressedSize = block[i++] + block[i++] * 256 + block[i++] * 256 * 256 + block[i++] * 256 * 256 * 256; + ze._UncompressedSize = block[i++] + block[i++] * 256 + block[i++] * 256 * 256 + block[i++] * 256 * 256 * 256; + } + else + { + // the CRC, compressed size, and uncompressed size are stored later in the stream. + // here, we advance the pointer. + i += 12; + } + + Int16 filenameLength = (short)(block[i++] + block[i++] * 256); + Int16 extraFieldLength = (short)(block[i++] + block[i++] * 256); + + block = new byte[filenameLength]; + n = s.Read(block, 0, block.Length); + ze._FileName = Shared.StringFromBuffer(block, 0, block.Length); + + ze._Extra = new byte[extraFieldLength]; + n = s.Read(ze._Extra, 0, ze._Extra.Length); + + // transform the time data into something usable + ze._LastModified = Shared.PackedToDateTime(ze._LastModDateTime); + + // actually get the compressed size and CRC if necessary + if ((ze._BitField & 0x0008) == 0x0008) + { + long posn = s.Position; + long SizeOfDataRead = Shared.FindSignature(s, ZipEntryDataDescriptorSignature); + if (SizeOfDataRead == -1) return false; + + // read 3x 4-byte fields (CRC, Compressed Size, Uncompressed Size) + block = new byte[12]; + n = s.Read(block, 0, block.Length); + if (n != 12) return false; + i = 0; + ze._Crc32 = block[i++] + block[i++] * 256 + block[i++] * 256 * 256 + block[i++] * 256 * 256 * 256; + ze._CompressedSize = block[i++] + block[i++] * 256 + block[i++] * 256 * 256 + block[i++] * 256 * 256 * 256; + ze._UncompressedSize = block[i++] + block[i++] * 256 + block[i++] * 256 * 256 + block[i++] * 256 * 256 * 256; + + if (SizeOfDataRead != ze._CompressedSize) + throw new Exception("Data format error (bit 3 is set)"); + + // seek back to previous position, to read file data + s.Seek(posn, System.IO.SeekOrigin.Begin); + } + + return true; + } + + + private static bool SignatureIsNotValid(int signature) + { + return (signature != ZipEntrySignature); + } + + public static ZipEntry Read(System.IO.Stream s) + { + ZipEntry entry = new ZipEntry(); + if (!ReadHeader(s, entry)) return null; + + entry.__filedata = new byte[entry._CompressedSize]; + int n = s.Read(entry._FileData, 0, entry._FileData.Length); + if (n != entry._FileData.Length) + { + throw new Exception("badly formatted zip file."); + } + // finally, seek past the (already read) Data descriptor if necessary + if ((entry._BitField & 0x0008) == 0x0008) + { + s.Seek(16, System.IO.SeekOrigin.Current); + } + return entry; + } + + + public void Extract(System.IO.Stream s) + { + using (System.IO.MemoryStream memstream = new System.IO.MemoryStream(_FileData)) + { + System.IO.Stream input = null; + try + { + if (this._CompressedSize == this._UncompressedSize) + { + input = memstream; + } + else + { + input = new System.IO.Compression.DeflateStream(memstream, System.IO.Compression.CompressionMode.Decompress); + } + + System.IO.Stream output = null; + try + { + output = s; + + + byte[] bytes = new byte[4096]; + int n; + + n = 1; // anything non-zero + while (n != 0) + { + n = input.Read(bytes, 0, bytes.Length); + if (n > 0) + { + output.Write(bytes, 0, n); + } + } + } + finally + { + // we only close the output stream if we opened it. + if (output != null) + { + output.Close(); + output.Dispose(); + } + } + } + finally + { + // we only close the output stream if we opened it. + // we cannot use using() here because in some cases we do not want to Dispose the stream! + if ((input != null) && (input != memstream)) + { + input.Close(); + input.Dispose(); + } + } + } + } + + } + + class Shared + { + protected internal static string StringFromBuffer(byte[] buf, int start, int maxlength) + { + int i; + char[] c = new char[maxlength]; + for (i = 0; (i < maxlength) && (i < buf.Length) && (buf[i] != 0); i++) + { + c[i] = (char)buf[i]; // System.BitConverter.ToChar(buf, start+i*2); + } + string s = new System.String(c, 0, i); + return s; + } + + protected internal static int ReadSignature(System.IO.Stream s) + { + int n = 0; + byte[] sig = new byte[4]; + n = s.Read(sig, 0, sig.Length); + if (n != sig.Length) throw new Exception("Could not read signature - no data!"); + int signature = (((sig[3] * 256 + sig[2]) * 256) + sig[1]) * 256 + sig[0]; + return signature; + } + + protected internal static long FindSignature(System.IO.Stream s, int SignatureToFind) + { + long startingPosition = s.Position; + + int BATCH_SIZE = 1024; + byte[] targetBytes = new byte[4]; + targetBytes[0] = (byte)(SignatureToFind >> 24); + targetBytes[1] = (byte)((SignatureToFind & 0x00FF0000) >> 16); + targetBytes[2] = (byte)((SignatureToFind & 0x0000FF00) >> 8); + targetBytes[3] = (byte)(SignatureToFind & 0x000000FF); + byte[] batch = new byte[BATCH_SIZE]; + int n = 0; + bool success = false; + do + { + n = s.Read(batch, 0, batch.Length); + if (n != 0) + { + for (int i = 0; i < n; i++) + { + if (batch[i] == targetBytes[3]) + { + s.Seek(i - n, System.IO.SeekOrigin.Current); + int sig = ReadSignature(s); + success = (sig == SignatureToFind); + if (!success) s.Seek(-3, System.IO.SeekOrigin.Current); + break; // out of for loop + } + } + } + else break; + if (success) break; + } while (true); + if (!success) + { + s.Seek(startingPosition, System.IO.SeekOrigin.Begin); + return -1; // or throw? + } + + // subtract 4 for the signature. + long bytesRead = (s.Position - startingPosition) - 4; + // number of bytes read, should be the same as compressed size of file + return bytesRead; + } + protected internal static DateTime PackedToDateTime(Int32 packedDateTime) + { + Int16 packedTime = (Int16)(packedDateTime & 0x0000ffff); + Int16 packedDate = (Int16)((packedDateTime & 0xffff0000) >> 16); + + int year = 1980 + ((packedDate & 0xFE00) >> 9); + int month = (packedDate & 0x01E0) >> 5; + int day = packedDate & 0x001F; + + + int hour = (packedTime & 0xF800) >> 11; + int minute = (packedTime & 0x07E0) >> 5; + int second = packedTime & 0x001F; + + DateTime d = System.DateTime.Now; + try { d = new System.DateTime(year, month, day, hour, minute, second, 0); } + catch + { + Console.Write("\nInvalid date/time?:\nyear: {0} ", year); + Console.Write("month: {0} ", month); + Console.WriteLine("day: {0} ", day); + Console.WriteLine("HH:MM:SS= {0}:{1}:{2}", hour, minute, second); + } + + return d; + } + + + protected internal static Int32 DateTimeToPacked(DateTime time) + { + UInt16 packedDate = (UInt16)((time.Day & 0x0000001F) | ((time.Month << 5) & 0x000001E0) | (((time.Year - 1980) << 9) & 0x0000FE00)); + UInt16 packedTime = (UInt16)((time.Second & 0x0000001F) | ((time.Minute << 5) & 0x000007E0) | ((time.Hour << 11) & 0x0000F800)); + return (Int32)(((UInt32)(packedDate << 16)) | packedTime); + } + } + +} + diff --git a/EditForm.Designer.cs b/EditForm.Designer.cs new file mode 100644 index 0000000..21d8b19 --- /dev/null +++ b/EditForm.Designer.cs @@ -0,0 +1,113 @@ +namespace LSLEditor +{ + partial class EditForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.disableCompilesyntaxCheckToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.numberedTextBoxUC1 = new NumberedTextBox.NumberedTextBoxUC(); + this.tabControl1.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.contextMenuStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // tabControl1 + // + this.tabControl1.ContextMenuStrip = this.contextMenuStrip1; + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl1.Location = new System.Drawing.Point(0, 0); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(551, 323); + this.tabControl1.TabIndex = 1; + this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.numberedTextBoxUC1); + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(543, 297); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "Script"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // contextMenuStrip1 + // + this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.disableCompilesyntaxCheckToolStripMenuItem}); + this.contextMenuStrip1.Name = "contextMenuStrip1"; + this.contextMenuStrip1.Size = new System.Drawing.Size(225, 26); + // + // disableCompilesyntaxCheckToolStripMenuItem + // + this.disableCompilesyntaxCheckToolStripMenuItem.Name = "disableCompilesyntaxCheckToolStripMenuItem"; + this.disableCompilesyntaxCheckToolStripMenuItem.Size = new System.Drawing.Size(224, 22); + this.disableCompilesyntaxCheckToolStripMenuItem.Text = "Disable compile/syntax check"; + this.disableCompilesyntaxCheckToolStripMenuItem.Click += new System.EventHandler(this.disableCompilesyntaxCheckToolStripMenuItem_Click); + // + // numberedTextBoxUC1 + // + this.numberedTextBoxUC1.Dock = System.Windows.Forms.DockStyle.Fill; + this.numberedTextBoxUC1.Location = new System.Drawing.Point(3, 3); + this.numberedTextBoxUC1.Name = "numberedTextBoxUC1"; + this.numberedTextBoxUC1.Size = new System.Drawing.Size(537, 291); + this.numberedTextBoxUC1.TabIndex = 4; + // + // EditForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(551, 323); + this.Controls.Add(this.tabControl1); + this.Name = "EditForm"; + this.Text = "EditForm"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.EditForm_FormClosing); + this.tabControl1.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.contextMenuStrip1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage1; + private NumberedTextBox.NumberedTextBoxUC numberedTextBoxUC1; + private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; + private System.Windows.Forms.ToolStripMenuItem disableCompilesyntaxCheckToolStripMenuItem; + + + } +} \ No newline at end of file diff --git a/EditForm.cs b/EditForm.cs new file mode 100644 index 0000000..36ab45f --- /dev/null +++ b/EditForm.cs @@ -0,0 +1,449 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.IO; +using System.Xml; +using System.Drawing; +using System.Windows.Forms; + +using LSLEditor.Helpers; + +namespace LSLEditor +{ + public partial class EditForm : Form + { + public RuntimeConsole runtime; + + private string m_FullPathName; + private Guid m_Guid; + + public LSLEditorForm parent; + + private const int WM_NCACTIVATE = 0x0086; + protected override void WndProc(ref Message m) + { + if (m.Msg == WM_NCACTIVATE) + { + if (m.LParam != IntPtr.Zero) + { + m.WParam = new IntPtr(1); + } + else + { + this.numberedTextBoxUC1.TextBox.MakeAllInvis(); + } + } + try { base.WndProc(ref m); } catch {} + } + + public SyntaxRichTextBox TextBox + { + get + { + return this.numberedTextBoxUC1.TextBox; + } + } + + public XmlDocument ConfLSL + { + get + { + return this.parent.ConfLSL; + } + } + + public XmlDocument ConfCSharp + { + get + { + return this.parent.ConfCSharp; + } + } + + public Guid guid + { + get + { + return m_Guid; + } + set + { + this.m_Guid = value; + } + } + + public bool IsScript + { + get + { + return this.TextBox.ToolTipping; + } + set + { + if(value) + this.tabPage1.Text = "Script"; + else + this.tabPage1.Text = "Text"; + this.TextBox.ToolTipping = value; + } + } + + public EditForm(LSLEditorForm lslEditorForm) + { + InitializeComponent(); + + this.guid = new Guid(); + + this.components = new System.ComponentModel.Container(); + + this.Icon = lslEditorForm.Icon; + this.parent = lslEditorForm; + + this.numberedTextBoxUC1.TextBox.Init(this.parent, this.parent.ConfLSL); + this.numberedTextBoxUC1.TextBox.OnDirtyChanged += new IsDirtyHandler(TextBox_OnDirtyChanged); + + this.Move += new EventHandler(EditForm_Position); + this.Resize += new EventHandler(EditForm_Position); + + this.Layout += new LayoutEventHandler(EditForm_Layout); + + SetFont(); + } + + public void SetFont() + { + this.numberedTextBoxUC1.Font = Properties.Settings.Default.FontEditor; + } + + void EditForm_Layout(object sender, LayoutEventArgs e) + { + if (this.WindowState == FormWindowState.Minimized) + this.numberedTextBoxUC1.TextBox.MakeAllInvis(); + } + + void EditForm_Position(object sender, EventArgs e) + { + this.numberedTextBoxUC1.TextBox.SetPosition(this.MdiParent.RectangleToScreen(this.MdiParent.ClientRectangle)); + } + + void TextBox_OnDirtyChanged(object sender, EventArgs e) + { + this.Text = this.ScriptName; + if (this.numberedTextBoxUC1.TextBox.Dirty) + this.Text = this.Text.Trim()+"* "; + else + this.Text = this.Text.Trim()+" "; + TabPage tabPage = this.Tag as TabPage; + if (tabPage != null) + tabPage.Text = this.Text; + this.parent.OnDirtyChanged(this.numberedTextBoxUC1.TextBox.Dirty); + } + + private void exitToolStripMenuItem_Click(object sender, EventArgs e) + { + this.Close(); + } + + public string FullPathName + { + get + { + return this.m_FullPathName; + } + set + { + this.m_FullPathName = value; + string strDirectory = Path.GetDirectoryName(this.m_FullPathName); + if (Directory.Exists(strDirectory)) + { + Properties.Settings.Default.WorkingDirectory = strDirectory; + } + else + { + if(!Directory.Exists(Properties.Settings.Default.WorkingDirectory)) + Properties.Settings.Default.WorkingDirectory = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); + this.m_FullPathName = Path.Combine(Properties.Settings.Default.WorkingDirectory, this.m_FullPathName); + } + this.Text = this.ScriptName; + TabPage tabPage = this.Tag as TabPage; + if (tabPage != null) + tabPage.Text = this.Text + " "; + } + } + + public string ScriptName + { + get + { + return Path.GetFileName(this.m_FullPathName); + } + } + + public string ProjectName + { + get + { + return parent.SolutionExplorer.GetProjectName(this.guid); + } + } + + public string SourceCode + { + get + { + return this.numberedTextBoxUC1.TextBox.Text; + } + set + { + this.numberedTextBoxUC1.TextBox.Text = value; + } + } + + private int PercentageIndentTab() + { + int intSpaces = 0; + int intTabs = 0; + StringReader sr = new StringReader(this.TextBox.Text); + while (true) + { + string strLine = sr.ReadLine(); + if (strLine == null) + break; + if (strLine.Length == 0) + continue; + if (strLine[0] == ' ') + intSpaces++; + else if (strLine[0] == '\t') + intTabs++; + } + if (intTabs == 0 && intSpaces==0) + return 50; + return (int)Math.Round((100.0 * intTabs) / (intTabs + intSpaces)); + } + + public void LoadFile(string strPath) + { + if(strPath.StartsWith("http://")) + this.FullPathName = Path.GetFileName(strPath); + else + this.FullPathName = strPath; + this.numberedTextBoxUC1.TextBox.LoadFile(strPath); + + if (!this.IsScript) + return; + + if (Properties.Settings.Default.IndentAutoCorrect) + { + this.TextBox.FormatDocument(); + this.TextBox.ClearUndoStack(); + } + else + { + if (Properties.Settings.Default.IndentWarning) + { + if ((PercentageIndentTab() > 50 && Properties.Settings.Default.SL4SpacesIndent) || + (PercentageIndentTab() < 50 && !Properties.Settings.Default.SL4SpacesIndent)) + { + if (MessageBox.Show("Indent scheme differs from settings\nDo you want to correct it?\nIt can also be corrected by pressing Ctrl-D or turn on Autocorrection (tools menu)", "Indent Warning!!", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK) + { + this.TextBox.FormatDocument(); + //this.TextBox.ClearUndoStack(); + } + } + } + } + } + + public void SaveCurrentFile(string strPath) + { + this.FullPathName = strPath; + this.numberedTextBoxUC1.TextBox.SaveCurrentFile(strPath); + } + + public void SaveCurrentFile() + { + this.numberedTextBoxUC1.TextBox.SaveCurrentFile(this.FullPathName); + } + + public bool Dirty + { + get + { + return this.numberedTextBoxUC1.TextBox.Dirty; + } + set + { + this.numberedTextBoxUC1.TextBox.Dirty = value; + } + } + + public TabControl tabControl + { + get + { + return this.tabControl1; + } + } + + public void SetFocus() + { + this.numberedTextBoxUC1.TextBox.Focus(); + } + + public void StopCompiler() + { + this.numberedTextBoxUC1.TextBox.MakeAllInvis(); + + if (runtime != null) + { + this.components.Remove(runtime); + if (!runtime.IsDisposed) + runtime.Dispose(); + runtime = null; + } + + for (int intI = this.tabControl1.TabPages.Count - 1; intI > 0; intI--) + { + this.tabControl1.TabPages.RemoveAt(intI); + } + } + + public SecondLifeHost.SecondLifeHostChatHandler ChatHandler; + public SecondLifeHost.SecondLifeHostMessageLinkedHandler MessageLinkedHandler; + + public bool StartCompiler() + { + if (this.disableCompilesyntaxCheckToolStripMenuItem.Checked) + return false; + + if (!this.IsScript) + return false; + + StopCompiler(); + + if (this.parent == null) + return false; + + runtime = new RuntimeConsole(this.parent); + + // for disposing + this.components.Add(runtime); + + if (!runtime.Compile(this)) + { + this.tabControl1.SelectedIndex = 0; + return false; + } + + TabPage tabPage = new TabPage("Debug"); + tabPage.Controls.Add(runtime); + this.tabControl1.TabPages.Add(tabPage); + this.tabControl1.SelectedIndex = 1; + return true; + } + + public bool SyntaxCheck() + { + if (this.disableCompilesyntaxCheckToolStripMenuItem.Checked) + return false; + + if (!this.IsScript) + return false; + + LSL2CSharp translator = new LSL2CSharp(ConfLSL); + string strCSharp = translator.Parse(SourceCode); + + if (System.Diagnostics.Debugger.IsAttached) + { + for (int intI = this.tabControl1.TabPages.Count - 1; intI > 0; intI--) + { + this.tabControl1.TabPages.RemoveAt(intI); + } + + // TODO + TabPage tabPage = new TabPage("C#"); + NumberedTextBox.NumberedTextBoxUC numberedTextBoxUC1 = new NumberedTextBox.NumberedTextBoxUC(); + numberedTextBoxUC1.TextBox.Init(null, this.ConfCSharp); + numberedTextBoxUC1.TextBox.Text = strCSharp; + numberedTextBoxUC1.TextBox.ReadOnly = true; + numberedTextBoxUC1.Dock = DockStyle.Fill; + tabPage.Controls.Add(numberedTextBoxUC1); + this.tabControl.TabPages.Add(tabPage); + } + + return (null != CompilerHelper.CompileCSharp(this, strCSharp)); + } + + public int Find(string strSearch, int intStart, int intEnd, RichTextBoxFinds options) + { + intStart = this.numberedTextBoxUC1.TextBox.Find(strSearch, intStart, intEnd, options); + this.numberedTextBoxUC1.TextBox.Focus(); + return intStart; + } + + private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) + { + this.numberedTextBoxUC1.TextBox.MakeAllInvis(); + } + + private void EditForm_FormClosing(object sender, FormClosingEventArgs e) + { + this.parent.CancelClosing = false; + if (this.Dirty) + { + DialogResult dialogResult = MessageBox.Show(this, @"Save """ + this.ScriptName + @"""?", "File has changed", MessageBoxButtons.YesNoCancel); + if (dialogResult == DialogResult.Yes) + e.Cancel = this.parent.SaveFile(this,false); + else + e.Cancel = (dialogResult == DialogResult.Cancel); + } + this.parent.CancelClosing = e.Cancel; + } + + private void disableCompilesyntaxCheckToolStripMenuItem_Click(object sender, EventArgs e) + { + this.disableCompilesyntaxCheckToolStripMenuItem.Checked = !this.disableCompilesyntaxCheckToolStripMenuItem.Checked; + } + } +} \ No newline at end of file diff --git a/EditForm.resx b/EditForm.resx new file mode 100644 index 0000000..3f402fe --- /dev/null +++ b/EditForm.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 37 + + \ No newline at end of file diff --git a/Editor/GListBox.Designer.cs b/Editor/GListBox.Designer.cs new file mode 100644 index 0000000..9bc0ead --- /dev/null +++ b/Editor/GListBox.Designer.cs @@ -0,0 +1,36 @@ +namespace LSLEditor +{ + partial class GListBox + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/Editor/GListBox.cs b/Editor/GListBox.cs new file mode 100644 index 0000000..90e378f --- /dev/null +++ b/Editor/GListBox.cs @@ -0,0 +1,152 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.Drawing; +using System.Windows.Forms; +using System.ComponentModel; + +namespace LSLEditor +{ + public partial class GListBox : ListBox + { + public ImageList ImageList; + + public GListBox(IContainer container) + { + container.Add(this); + + InitializeComponent(); + + // Set owner draw mode + this.DrawMode = DrawMode.OwnerDrawFixed; + this.ImageList = new ImageList(); + } + + public GListBox() + { + InitializeComponent(); + + // Set owner draw mode + this.DrawMode = DrawMode.OwnerDrawFixed; + this.ImageList = new ImageList(); + } + + protected override void OnDrawItem(DrawItemEventArgs e) + { + try + { + GListBoxItem item; + Rectangle bounds = new Rectangle(e.Bounds.X + e.Bounds.Height, e.Bounds.Y, e.Bounds.Width - e.Bounds.Height - 1, e.Bounds.Height); + item = (GListBoxItem)Items[e.Index]; + if (item.ImageIndex != -1) + { + e.Graphics.FillRectangle(new SolidBrush(this.BackColor), bounds); + if ((e.State & DrawItemState.Selected) == DrawItemState.Selected) + e.Graphics.FillRectangle(SystemBrushes.Highlight, bounds); + + e.Graphics.DrawImage(ImageList.Images[item.ImageIndex], bounds.Left - bounds.Height, bounds.Top, bounds.Height, bounds.Height); + e.Graphics.DrawString(item.Text, e.Font, new SolidBrush(e.ForeColor), + bounds.Left, bounds.Top); + } + else + { + e.Graphics.DrawString(item.Text, e.Font, new SolidBrush(e.ForeColor), + bounds.Left, bounds.Top); + } + } + catch + { + e.DrawBackground(); + e.DrawFocusRectangle(); + if (e.Index != -1) + { + try + { + e.Graphics.DrawString(Items[e.Index].ToString(), e.Font, + new SolidBrush(e.ForeColor), e.Bounds.Left, e.Bounds.Top); + } + catch + { + } + } + else + { + e.Graphics.DrawString(Text, e.Font, new SolidBrush(e.ForeColor), + e.Bounds.Left, e.Bounds.Top); + } + } + base.OnDrawItem(e); + } + }//End of GListBox class + + // GListBoxItem class + public class GListBoxItem + { + private string _myText; + private int _myImageIndex; + // properties + public string Text + { + get { return _myText; } + set { _myText = value; } + } + public int ImageIndex + { + get { return _myImageIndex; } + set { _myImageIndex = value; } + } + //constructor + public GListBoxItem(string text, int index) + { + _myText = text; + _myImageIndex = index; + } + public GListBoxItem(string text) : this(text, -1) { } + public GListBoxItem() : this("") { } + public override string ToString() + { + return _myText; + } + }//End of GListBoxItem class +} diff --git a/Editor/GListBoxWindow.Designer.cs b/Editor/GListBoxWindow.Designer.cs new file mode 100644 index 0000000..79faa22 --- /dev/null +++ b/Editor/GListBoxWindow.Designer.cs @@ -0,0 +1,64 @@ +namespace LSLEditor +{ + partial class GListBoxWindow + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.gListBox1 = new LSLEditor.GListBox(this.components); + this.SuspendLayout(); + // + // gListBox1 + // + this.gListBox1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.gListBox1.FormattingEnabled = true; + this.gListBox1.Location = new System.Drawing.Point(0, 0); + this.gListBox1.Name = "gListBox1"; + this.gListBox1.Size = new System.Drawing.Size(192, 134); + this.gListBox1.TabIndex = 0; + this.gListBox1.Resize += new System.EventHandler(this.gListBox1_Resize); + // + // GListBoxWindow + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(212, 156); + this.Controls.Add(this.gListBox1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "GListBoxWindow"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; + this.Text = "GListBoxWindow"; + this.ResumeLayout(false); + + } + + #endregion + + private GListBox gListBox1; + } +} \ No newline at end of file diff --git a/Editor/GListBoxWindow.cs b/Editor/GListBoxWindow.cs new file mode 100644 index 0000000..3d921e1 --- /dev/null +++ b/Editor/GListBoxWindow.cs @@ -0,0 +1,177 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.Drawing; +using System.ComponentModel; +using System.Windows.Forms; + +namespace LSLEditor +{ + public partial class GListBoxWindow : Form + { + public GListBox GListBox + { + get + { + return this.gListBox1; + } + } + + public GListBoxItem Selected + { + get + { + return (GListBoxItem)this.gListBox1.Items[this.gListBox1.SelectedIndex]; + } + } + + public GListBoxWindow(Form parent) + { + InitializeComponent(); + + this.Owner = parent; + + this.GListBox.Cursor = Cursors.Arrow; + this.GListBox.Sorted = true; + + this.FontChanged += new EventHandler(GListBoxWindow_FontChanged); + } + + void GListBoxWindow_FontChanged(object sender, EventArgs e) + { + this.GListBox.ItemHeight = 2 + (int)LSLEditor.Helpers.Measure.MeasureDisplayString(this.GListBox, "M", this.Font).Height; + } + + public void KeyDownHandler(KeyEventArgs e) + { + if (!this.Visible) + return; + + if (e.KeyCode == Keys.Enter) + { + // cancel richttext enter if listbox shows + e.Handled = true; + } + if (e.KeyCode == Keys.Down) + { + this.gListBox1.SelectedIndex = Math.Min(this.gListBox1.Items.Count - 1, this.gListBox1.SelectedIndex + 1); + e.Handled = true; + } + + if (e.KeyCode == Keys.Up) + { + this.gListBox1.SelectedIndex = Math.Max(0, this.gListBox1.SelectedIndex - 1); + e.Handled = true; + } + + if (e.KeyCode == Keys.PageUp) + { + this.gListBox1.SelectedIndex = Math.Max(0,this.gListBox1.SelectedIndex - 10); + e.Handled = true; + } + + if (e.KeyCode == Keys.PageDown) + { + this.gListBox1.SelectedIndex = Math.Min(this.gListBox1.Items.Count - 1, this.gListBox1.SelectedIndex + 10); + e.Handled = true; + } + } + + public void SetPosition(Rectangle rect,RichTextBox RichTextBox) + { + //Rectangle rect = Screen.PrimaryScreen.WorkingArea; + Point p = RichTextBox.GetPositionFromCharIndex(RichTextBox.SelectionStart); + + p = new Point(p.X - 20, p.Y + this.gListBox1.ItemHeight); // ItemHeight = exact line height + + Rectangle client = RichTextBox.ClientRectangle; + if (p.X < (client.Left-20) || p.Y < client.Top || p.X > client.Width || p.Y > client.Height) + { + this.Visible = false; + return; + } + + Point screen = RichTextBox.PointToScreen(p); + + //if ((screen.Y + this.Height) > rect.Height) + // screen = RichTextBox.PointToScreen(new Point(p.X - 20 + this.XOffset, p.Y - this.Height)); + + if (screen.Y > rect.Bottom) + { + this.Visible = false; + return; + //screen.Y = rect.Bottom; + } + + if (screen.X > rect.Right) + { + this.Visible = false; + return; + //screen.X = rect.Right; + } + + if (screen.X < rect.Left) + { + this.Visible = false; + return; + //screen.X = rect.Left; + } + + if ((screen.Y) < rect.Top) + { + this.Visible = false; + return; + //screen.Y = rect.Top; + } + + this.Location = screen; + } + + private void gListBox1_Resize(object sender, EventArgs e) + { + this.Size = this.gListBox1.Size; + } + + } +} \ No newline at end of file diff --git a/Editor/GListBoxWindow.resx b/Editor/GListBoxWindow.resx new file mode 100644 index 0000000..ff31a6d --- /dev/null +++ b/Editor/GListBoxWindow.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Editor/KeyWords.cs b/Editor/KeyWords.cs new file mode 100644 index 0000000..8280440 --- /dev/null +++ b/Editor/KeyWords.cs @@ -0,0 +1,410 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.IO; +using System.Drawing; +using System.Xml; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Text.RegularExpressions; + +namespace LSLEditor +{ + public enum KeyWordTypeEnum : int + { + Unknown = 0, + Functions = 1, + Events = 2, + Constants = 3, + Class = 4, + Vars = 5, + Properties = 6 + } + + public struct KeyWordInfo + { + public KeyWordTypeEnum type; + public string name; + public Color color; + public KeyWordInfo(KeyWordTypeEnum type, string name, Color color) + { + this.type = type; + this.name = name; + this.color = color; + } + } + + class KeyWords + { + private ArrayList m_RegexColorList; + private Regex m_regexSplitter; + private Hashtable m_KeyWordColorList; + private XmlDocument xml; + + private void MakeSplitter(string strRegexSplitter) + { + m_regexSplitter = new Regex( + @"\s*(" + strRegexSplitter + @"|\w+|.)", + RegexOptions.IgnorePatternWhitespace + | RegexOptions.Compiled + ); + } + + private struct RegexColor + { + public Regex regex; + public Color color; + public RegexColor(string strRegex, Color color) + { + this.regex = new Regex(strRegex, + RegexOptions.IgnorePatternWhitespace + | RegexOptions.Compiled + ); + this.color = color; + } + } + + public KeyWords(string ColorScheme, XmlDocument xml) + { + this.m_RegexColorList = new ArrayList(); + this.m_KeyWordColorList = new Hashtable(); + this.xml = xml; + + string strRegexSplitter = ""; + + foreach (XmlNode words in xml.SelectNodes("//Words")) + { + Color color = Color.FromArgb(int.Parse(words.Attributes[ColorScheme].InnerText.Replace("#", ""), System.Globalization.NumberStyles.HexNumber)); + KeyWordTypeEnum type = KeyWordTypeEnum.Unknown; + if (words.Attributes["icon"] != null) + { + switch (words.Attributes["icon"].InnerText) + { + case "Functions": + type = KeyWordTypeEnum.Functions; + break; + case "Events": + type = KeyWordTypeEnum.Events; + break; + case "Constants": + type = KeyWordTypeEnum.Constants; + break; + case "Class": + type = KeyWordTypeEnum.Class; + break; + case "Vars": + type = KeyWordTypeEnum.Vars; + break; + case "Enum": + if (!Properties.Settings.Default.CodeCompletionAnimation) + continue; + type = KeyWordTypeEnum.Properties; + break; + default: + type = KeyWordTypeEnum.Unknown; + break; + } + } + foreach (XmlNode word in words.SelectNodes(".//Word")) + { + if (word.Attributes["name"].InnerText == "regex") + { + string strRegex = word.InnerText; + AddRegex(strRegex, color); + if (strRegexSplitter != "") + strRegexSplitter += "|"; + strRegexSplitter += strRegex; + } + else + { + AddKeyword(type, word.Attributes["name"].InnerText, color); + } + } + } + MakeSplitter(strRegexSplitter); + } + + private void AddRegex(string strRegex, Color color) + { + m_RegexColorList.Add(new RegexColor(strRegex, color)); + } + + private void AddKeyword(KeyWordTypeEnum type, string name, Color color) + { + m_KeyWordColorList.Add(name, new KeyWordInfo(type, name, color)); + } + + public Color GetColorFromRegex(string strKeyWord) + { + // specials + Color color = Color.Black; + foreach (RegexColor regexColor in m_RegexColorList) + { + Match mm = regexColor.regex.Match(strKeyWord); + if (mm.Success) + { + // must be exact match + if (mm.Index != 0) + continue; + color = regexColor.color; + break; + } + } + return color; + } + + public KeyWordInfo GetKeyWordInfo(string strWord) + { + return (KeyWordInfo)this.m_KeyWordColorList[strWord]; + } + + public bool ContainsKeyWord(string strWord) + { + return m_KeyWordColorList.ContainsKey(strWord); + } + + public Color GetColorFromKeyWordList(string strKeyWord) + { + if (ContainsKeyWord(strKeyWord)) + return GetKeyWordInfo(strKeyWord).color; + else + return Color.Black; + } + + public MatchCollection Matches(string strLine) + { + return m_regexSplitter.Matches(strLine); + } + + public List KeyWordSearch(string strKeyWord, bool IsRegularExpression) + { + List list = new List(); + string strLowerCaseKeyWord = strKeyWord.ToLower(); + int intLen = strLowerCaseKeyWord.Length; + foreach (string strKey in m_KeyWordColorList.Keys) + { + if (IsRegularExpression) + { + if(new Regex("^"+strKeyWord+"$").Match(strKey).Success) + list.Add(GetKeyWordInfo(strKey)); + } + else + { + if (strKey.Length < intLen) + continue; + if (strKey.Substring(0, intLen).ToLower() == strLowerCaseKeyWord) + list.Add(GetKeyWordInfo(strKey)); + } + } + return list; + } + + public string GetDescription(string strKeyWord) + { + if(ContainsKeyWord(strKeyWord)) + { + XmlNode xmlNode = xml.SelectSingleNode("//Word[@name='"+strKeyWord+"']"); + if(xmlNode!=null) + { + if (xmlNode.ChildNodes.Count == 0) + return ""; + string strText = xmlNode.InnerXml; + if (strText == "") + return strKeyWord; + else + { + int intArgument = strText.IndexOf(" 0) + strText = strText.Substring(0, intArgument); + StringBuilder sb = new StringBuilder(); + StringReader sr = new StringReader(strText); + while (true) + { + string strLine = sr.ReadLine(); + if (strLine == null) + break; + sb.AppendLine(strLine.Trim()); + } + return sb.ToString(); + } + } + } + return ""; + } + + private string MakeArgumentBold(string strText, int intArgument) + { + Regex regex = new Regex( +@"(?[^(]* \( ) + (?: + (? [^,\)]*) (?" + + @"[\,\)])+ + )* +(?.*) +", + RegexOptions.IgnorePatternWhitespace); + Match match = regex.Match(strText); + StringBuilder sb = new StringBuilder(); + sb.Append(match.Groups["prefix"].Value); + for (int intI = 0; intI < match.Groups["argument"].Captures.Count; intI++) + { + if (intI == intArgument) + { + sb.Append(@""); + sb.Append(match.Groups["argument"].Captures[intI].Value); + sb.Append(""); + } + else + { + sb.Append(match.Groups["argument"].Captures[intI].Value); + } + sb.Append(match.Groups["seperator"].Captures[intI].Value); + } + sb.Append(match.Groups["postfix"].Value); + sb.Append('\n'); + return sb.ToString(); + } + + private string GetFirstLineOfKeyWord(string strWord, out XmlNode xmlNode) + { + xmlNode = null; + + if (!ContainsKeyWord(strWord)) + return ""; + + xmlNode = xml.SelectSingleNode("//Word[@name='" + strWord + "']"); + if (xmlNode == null) + return ""; + + if (xmlNode.ChildNodes.Count == 0) + return ""; + + string strText = xmlNode.ChildNodes[0].InnerText; + if (strText == "") + return ""; + + strText = strText.TrimStart(); + int intI = strText.IndexOf("\r"); + if (intI > 0) + strText = strText.Substring(0, intI); + + return strText; + } + + public int GetNumberOfArguments(string strWord) + { + XmlNode xmlNode; + string strFirstLine = GetFirstLineOfKeyWord(strWord, out xmlNode); + + if (strFirstLine == "") + return -1; + + Regex regex = new Regex( +@"(?[^(]* \( ) + (?: + (? [^,\)]*) (?" + + @"[\,\)])+ + )* +(?.*) +", + RegexOptions.IgnorePatternWhitespace); + Match match = regex.Match(strFirstLine); + + // nr not 1, return nr + int intNr = match.Groups["argument"].Captures.Count; + if(intNr != 1) + return intNr; + + // nr = 1 can be void, returns also 0 + if(match.Groups["argument"].Captures[0].Value == "void") + return 0; + + // not void, return 1 + return 1; + } + + public string GetFunctionAndHiglightArgument(string strWord, int intArgument, out string strWild) + { + XmlNode xmlNode; + string strFirstLine = GetFirstLineOfKeyWord(strWord,out xmlNode); + + strWild = ""; + + if (strFirstLine == "") + return ""; + + string strRichText = MakeArgumentBold(strFirstLine, intArgument); + + if (xmlNode == null) + return strRichText; + + XmlNodeList nodeList = xmlNode.SelectNodes("./Argument"); + if (intArgument < nodeList.Count) + { + XmlNode xmlNodeArgument = nodeList[intArgument]; + if(xmlNodeArgument.Attributes["wild"]!=null) + strWild = xmlNodeArgument.Attributes["wild"].Value; + string strName = xmlNodeArgument.Attributes["name"].Value; + string strDescription = "\n" + @"" + strName + ":"; + strRichText += strDescription + " " + xmlNodeArgument.InnerText + "\n"; + } + return strRichText; + } + + public string GetEvent(string strEventName) + { + string strReturn = strEventName + "("; + + XmlNode xmlNode; + string strFirstLine = GetFirstLineOfKeyWord(strEventName, out xmlNode); + + if (strFirstLine == "") + return strReturn; + + return strFirstLine.Replace(";", "").Replace("void", ""); + } + + } +} diff --git a/Editor/MsXsltContext.cs b/Editor/MsXsltContext.cs new file mode 100644 index 0000000..e28a6dc --- /dev/null +++ b/Editor/MsXsltContext.cs @@ -0,0 +1,43 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ diff --git a/Editor/Numbered.Designer.cs b/Editor/Numbered.Designer.cs new file mode 100644 index 0000000..a4bb174 --- /dev/null +++ b/Editor/Numbered.Designer.cs @@ -0,0 +1,37 @@ +namespace LSLEditor.Editor +{ + partial class Numbered + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + } + + #endregion + } +} diff --git a/Editor/Numbered.cs b/Editor/Numbered.cs new file mode 100644 index 0000000..0a4f120 --- /dev/null +++ b/Editor/Numbered.cs @@ -0,0 +1,142 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.Drawing; +using System.Windows.Forms; + +namespace LSLEditor.Editor +{ + public partial class Numbered : UserControl + { + public RichTextBox richTextBox1; + private Brush brush; + public float LineHeight; + + public Numbered() + { + InitializeComponent(); + + this.SetStyle( + ControlStyles.DoubleBuffer | + ControlStyles.UserPaint | + ControlStyles.AllPaintingInWmPaint, + true); + + this.UpdateStyles(); + + brush = new SolidBrush(this.ForeColor); + + LineHeight = 0.0F; + } + + private void updateNumberLabel(PaintEventArgs e) + { + if (this.brush == null) + return; + + if (this.ClientSize.Width <= 0 || this.ClientSize.Height <= 0) + return; + + int delta = 0; + int firstLine = 0; + int lastLine = 10; + Font font = this.Font; + + if (this.richTextBox1 == null) + { + LineHeight = 16.0F; + } + else + { + //we get index of first visible char and number of first visible line + Point pos = new Point(0, 0); + + int firstIndex = this.richTextBox1.GetCharIndexFromPosition(pos); + firstLine = this.richTextBox1.GetLineFromCharIndex(firstIndex); + + font = this.richTextBox1.Font; + + if (LineHeight < 0.01) + { + if (this.richTextBox1.Lines.Length > 1) + { + Point pos1 = this.richTextBox1.GetPositionFromCharIndex(this.richTextBox1.GetFirstCharIndexFromLine(1)); + LineHeight = pos1.Y; + } + } + + lastLine = Math.Min(this.richTextBox1.Lines.Length, 2 + firstLine + (int)(this.richTextBox1.ClientRectangle.Height / LineHeight)); + + int intCharIndex = this.richTextBox1.GetCharIndexFromPosition(Point.Empty); + delta = 1 + this.richTextBox1.GetPositionFromCharIndex(intCharIndex).Y % font.Height; + } + + // here we go + lastLine = Math.Max(lastLine, 1); + + Graphics g = e.Graphics; + g.Clear(this.BackColor); + if(this.richTextBox1==null) + g.SetClip(new Rectangle(0, 0, this.Width, this.Height)); + else + g.SetClip(new Rectangle(0, 0, this.Width, this.richTextBox1.ClientRectangle.Height)); + + for (int i = firstLine; i < lastLine; i++) + g.DrawString(string.Format("{0:0###}", i + 1), font, brush, + new PointF(0F, delta + (i - firstLine) * LineHeight) ); + //g.DrawLine(new Pen(brush), backBuffer.Width - 1, 0, backBuffer.Width - 1, backBuffer.Height); + } + + protected override void OnPaint(PaintEventArgs e) + { + updateNumberLabel(e); + } + + protected override void OnPaintBackground(PaintEventArgs e) + { + //base.OnPaintBackground(e); + } + + } +} diff --git a/Editor/NumberedTextBoxUC.cs b/Editor/NumberedTextBoxUC.cs new file mode 100644 index 0000000..0cbebf7 --- /dev/null +++ b/Editor/NumberedTextBoxUC.cs @@ -0,0 +1,83 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; + +namespace NumberedTextBox +{ + public partial class NumberedTextBoxUC : UserControl + { + public NumberedTextBoxUC() + { + InitializeComponent(); + + this.numbered1.richTextBox1 = this.syntaxRichTextBox1; + this.syntaxRichTextBox1.OnPaintNumbers += new EventHandler(syntaxRichTextBox1_OnPaintNumbers); + this.FontChanged += new EventHandler(NumberedTextBoxUC_FontChanged); + } + + void NumberedTextBoxUC_FontChanged(object sender, EventArgs e) + { + this.numbered1.LineHeight = 0.0F; // reset!! + RectangleF rect = LSLEditor.Helpers.Measure.MeasureDisplayString(this.syntaxRichTextBox1, "M", this.Font); + this.splitContainer1.SplitterDistance = (int)(4 * rect.Width + 5.0); + } + + void syntaxRichTextBox1_OnPaintNumbers(object sender, EventArgs e) + { + this.numbered1.Invalidate(); + } + + public LSLEditor.SyntaxRichTextBox TextBox + { + get + { + return this.syntaxRichTextBox1; + } + } + + } +} diff --git a/Editor/NumberedTextBoxUC.designer.cs b/Editor/NumberedTextBoxUC.designer.cs new file mode 100644 index 0000000..c5e7838 --- /dev/null +++ b/Editor/NumberedTextBoxUC.designer.cs @@ -0,0 +1,106 @@ +namespace NumberedTextBox +{ + partial class NumberedTextBoxUC + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.numbered1 = new LSLEditor.Editor.Numbered(); + this.syntaxRichTextBox1 = new LSLEditor.SyntaxRichTextBox(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.IsSplitterFixed = true; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.BackColor = System.Drawing.SystemColors.ActiveBorder; + this.splitContainer1.Panel1.Controls.Add(this.numbered1); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.syntaxRichTextBox1); + this.splitContainer1.Size = new System.Drawing.Size(403, 267); + this.splitContainer1.SplitterDistance = 41; + this.splitContainer1.SplitterWidth = 1; + this.splitContainer1.TabIndex = 2; + this.splitContainer1.Text = "splitContainer1"; + // + // numbered1 + // + this.numbered1.BackColor = System.Drawing.SystemColors.ButtonFace; + this.numbered1.Dock = System.Windows.Forms.DockStyle.Fill; + this.numbered1.Location = new System.Drawing.Point(0, 0); + this.numbered1.Name = "numbered1"; + this.numbered1.Size = new System.Drawing.Size(41, 267); + this.numbered1.TabIndex = 0; + // + // syntaxRichTextBox1 + // + this.syntaxRichTextBox1.AcceptsTab = true; + this.syntaxRichTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.syntaxRichTextBox1.DetectUrls = false; + this.syntaxRichTextBox1.Dirty = true; + this.syntaxRichTextBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.syntaxRichTextBox1.Location = new System.Drawing.Point(0, 0); + this.syntaxRichTextBox1.Name = "syntaxRichTextBox1"; + this.syntaxRichTextBox1.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.ForcedBoth; + this.syntaxRichTextBox1.Size = new System.Drawing.Size(361, 267); + this.syntaxRichTextBox1.TabIndex = 0; + this.syntaxRichTextBox1.Text = ""; + this.syntaxRichTextBox1.ToolTipping = false; + this.syntaxRichTextBox1.WordWrap = false; + // + // NumberedTextBoxUC + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.splitContainer1); + this.Name = "NumberedTextBoxUC"; + this.Size = new System.Drawing.Size(403, 267); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + this.splitContainer1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private LSLEditor.Editor.Numbered numbered1; + private LSLEditor.SyntaxRichTextBox syntaxRichTextBox1; + } +} diff --git a/Editor/NumberedTextBoxUC.resx b/Editor/NumberedTextBoxUC.resx new file mode 100644 index 0000000..ff31a6d --- /dev/null +++ b/Editor/NumberedTextBoxUC.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Editor/RichLabel.Designer.cs b/Editor/RichLabel.Designer.cs new file mode 100644 index 0000000..4dc493b --- /dev/null +++ b/Editor/RichLabel.Designer.cs @@ -0,0 +1,42 @@ +namespace LSLEditor +{ + partial class RichLabel + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.SuspendLayout(); + // + // RichLabel + // + this.Name = "RichLabel"; + this.ResumeLayout(false); + + } + + #endregion + } +} diff --git a/Editor/RichLabel.cs b/Editor/RichLabel.cs new file mode 100644 index 0000000..4e0b15a --- /dev/null +++ b/Editor/RichLabel.cs @@ -0,0 +1,272 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.Drawing; +using System.Globalization; +using System.Windows.Forms; +using System.ComponentModel; +using System.Collections.Generic; +using System.Text.RegularExpressions; + +namespace LSLEditor +{ + public partial class RichLabel : UserControl + { + private Regex m_regex; + + public override string Text + { + get + { + return base.Text; + } + set + { + base.Text = value; + this.Invalidate(); + } + } + + public RichLabel() + { + InitializeComponent(); + + this.SetStyle( + ControlStyles.DoubleBuffer | + ControlStyles.UserPaint | + ControlStyles.AllPaintingInWmPaint, + true); + + this.UpdateStyles(); + + this.Text = "richLabel1"; + this.BackColor = Color.LightGoldenrodYellow; + + this.m_regex = new Regex(@" +(?: + <(?: + (?[^>/\s]*) + (? [\s]+ (?[^=]*) = ""(?[^""]*)"")* + )> +| + <[/]* (?[^>\s/]*) [/]*> +| + (?[^<]*) +) +", + RegexOptions.IgnorePatternWhitespace + | RegexOptions.Compiled); + + //this.m_regex = new Regex(@"(?\w*)"); + } + + private void SafePaint(PaintEventArgs e) + { + try + { + Graphics g = e.Graphics; + + e.Graphics.Clear(this.BackColor); + + Stack fontFace = new Stack(); + Stack fontSize = new Stack(); + Stack fontColor = new Stack(); + Stack fontStyle = new Stack(); + + fontFace.Push(this.Font.Name); + fontSize.Push(this.Font.Size); + fontStyle.Push(this.Font.Style); + fontColor.Push(this.ForeColor); + + float fltLineHeight = 0; + float fltLineHeightMax = 0; + float fltWidth = 0; + float fltHeight = 0; + + PointF point = new PointF(this.Margin.Left, this.Margin.Top); + + string strLines = this.Text.Replace("\r", "").Replace("\n", "
"); + foreach (Match m in this.m_regex.Matches(strLines)) + { + string strText = m.Groups["text"].Value.Replace("<", "<").Replace(">", ">"); + + switch (m.Groups["startTag"].Value) + { + case "font": + for (int intI = 0; intI < m.Groups["attName"].Captures.Count; intI++) + { + string strValue = m.Groups["attValue"].Captures[intI].Value; + switch (m.Groups["attName"].Captures[intI].Value) + { + case "color": + if (strValue.StartsWith("#")) + { + int intColor = 255; + int.TryParse(strValue.Substring(1), NumberStyles.HexNumber, null, out intColor); + fontColor.Push(Color.FromArgb(255, Color.FromArgb(intColor))); + } + else + { + fontColor.Push(Color.FromName(strValue)); + } + break; + case "face": + fontFace.Push(strValue); + break; + case "size": + float fltSize = 10.0F; + float.TryParse(strValue, out fltSize); + fontSize.Push(fltSize); + break; + default: + break; + } + } + break; + case "b": + fontStyle.Push(fontStyle.Peek() | FontStyle.Bold); + break; + case "u": + fontStyle.Push(fontStyle.Peek() | FontStyle.Underline); + break; + case "i": + fontStyle.Push(fontStyle.Peek() | FontStyle.Italic); + break; + case "s": + fontStyle.Push(fontStyle.Peek() | FontStyle.Strikeout); + break; + case "br": + point = new PointF(this.Margin.Left, point.Y + fltLineHeightMax); + fltLineHeightMax = fltLineHeight; + break; + default: + break; + } + switch (m.Groups["endTag"].Value) + { + case "font": + if (fontColor.Count > 1) + fontColor.Pop(); + if (fontSize.Count > 1) + fontSize.Pop(); + if (fontFace.Count > 1) + fontFace.Pop(); + break; + case "b": + case "u": + case "i": + case "s": + if (fontStyle.Count > 1) + fontStyle.Pop(); + break; + case "br": + point = new PointF(this.Margin.Left, point.Y + fltLineHeightMax); + fltLineHeightMax = fltLineHeight; + break; + default: + break; + } + + if (strText.Length == 0) + continue; + + Font fontTmp = new Font(fontFace.Peek(), fontSize.Peek(), fontStyle.Peek()); + Size rect = MeasureTextIncludingSpaces(g, strText, fontTmp); // TextRenderer.MeasureText(strText, fontTmp); + PointF pointToDraw = new PointF(point.X, point.Y); + + point = new PointF(point.X + rect.Width, point.Y); + fltWidth = Math.Max(fltWidth, point.X); + fltHeight = Math.Max(fltHeight, point.Y + rect.Height); + fltLineHeight = rect.Height; + fltLineHeightMax = Math.Max(fltLineHeightMax, fltLineHeight); + + Brush brush = new SolidBrush(fontColor.Peek()); + g.DrawString(strText, fontTmp, brush, pointToDraw); + brush.Dispose(); + fontTmp.Dispose(); + } + int intWidth = (int)fltWidth + (Margin.Right <<1); + int intHeight = (int)fltHeight + Margin.Bottom; + this.Size = new Size(intWidth, intHeight); + + //System.Drawing.Drawing2D.GraphicsPath path = Editor.RoundCorners.RoundedRectangle(new Rectangle(this.Location, this.Size), 10); + //g.DrawPath(new Pen(Color.Black,2F), path); + //this.Region = Editor.RoundCorners.RoundedRegion(this.Size, 4); + } + catch + { + } + } + + public static SizeF MeasureTextVisible(Graphics graphics, string text, Font font) + { + StringFormat format = new StringFormat(); + RectangleF rect = new RectangleF(0, 0, 4096, 1000); + CharacterRange[] ranges = { new CharacterRange(0, text.Length) }; + format.SetMeasurableCharacterRanges(ranges); + Region[] regions = graphics.MeasureCharacterRanges(text, font, rect, format); + rect = regions[0].GetBounds(graphics); + return new SizeF(rect.Width, rect.Height); + } + + public static Size MeasureTextIncludingSpaces(Graphics graphics, string text, Font font) + { + SizeF sizePostfix = MeasureTextVisible(graphics, "|", font); + SizeF size = MeasureTextVisible(graphics, text + "|", font); + return new Size((int)(size.Width - sizePostfix.Width + 1), (int)(size.Height + 1)); + } + + + protected override void OnPaint(PaintEventArgs e) + { + SafePaint(e); + } + + protected override void OnPaintBackground(PaintEventArgs e) + { + // base.OnPaintBackground(e); + } + + } +} diff --git a/Editor/RichLabel.resx b/Editor/RichLabel.resx new file mode 100644 index 0000000..ff31a6d --- /dev/null +++ b/Editor/RichLabel.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Editor/RoundCorners.cs b/Editor/RoundCorners.cs new file mode 100644 index 0000000..93b59e7 --- /dev/null +++ b/Editor/RoundCorners.cs @@ -0,0 +1,189 @@ +using System; + +//Author: Arman Ghazanchyan +//Created date: 01/27/2007 +//Last updated: 01/28/2007 +using System.Drawing; +using System.Drawing.Drawing2D; + +namespace LSLEditor.Editor +{ + class RoundCorners + { + /// + /// Rounds a rectangle corners' and returns the graphics path. + /// + /// A rectangle whose corners should be rounded. + /// The radius of the rounded corners. This value should be + /// bigger then 0 and less or equal to the (a half of the smallest value + /// of the rectangle’s width and height). + /// A value that specifies if the top-left + /// corner of the rectangle should be rounded. If the value is True + /// then the corner is not rounded otherwise it is. + /// A value that specifies if the top-right + /// corner of the rectangle should be rounded. If the value is True + /// then the corner is not rounded otherwise it is. + /// A value that specifies if the bottom-right + /// corner of the rectangle should be rounded. If the value is True + /// then the corner is not rounded otherwise it is. + /// A value that specifies if the bottom-left + /// corner of the rectangle should be rounded. If the value is True + /// then the corner is not rounded otherwise it is. + public static GraphicsPath RoundedRectangle(Rectangle rec, int r) + { + return RoundedRectangle(rec,r,false,false,false,false); + } + + public static GraphicsPath RoundedRectangle(Rectangle rec, int r, + bool exclude_TopLeft, + bool exclude_TopRight, + bool exclude_BottomRight, + bool exclude_BottomLeft) + { + GraphicsPath path = new GraphicsPath(); + int s = r * 2; + //If 's' is less than or equal to zero, + //then return a simple rectangle. + if (s <= 0) + { + path.StartFigure(); + path.AddLine(rec.Right, rec.Y, rec.Right, rec.Y); + path.AddLine(rec.Right, rec.Bottom, rec.Right, rec.Bottom); + path.AddLine(rec.X, rec.Bottom, rec.X, rec.Bottom); + path.AddLine(rec.X, rec.Y, rec.X, rec.Y); + path.CloseAllFigures(); + return path; + } + //If 's' is bigger than the smallest value of the size, + //then assign the value to 's'. + if (rec.Height <= rec.Width) + { + if (s > rec.Height) + s = rec.Height; + } + else + { + if (s > rec.Width) + s = rec.Width; + } + + path.StartFigure(); + //Set top-right corner. + if (!exclude_TopRight) + path.AddArc(rec.Right - s, rec.Y, s, s, 270, 90); + else + path.AddLine(rec.Right, rec.Y, rec.Right, rec.Y); + + //Set bottom-right corner. + if (!exclude_BottomRight) + path.AddArc(rec.Right - s, rec.Bottom - s, s, s, 0, 90); + else + path.AddLine(rec.Right, rec.Bottom, rec.Right, rec.Bottom); + + //Set bottom-left corner. + if (!exclude_BottomLeft) + path.AddArc(rec.X, rec.Bottom - s, s, s, 90, 90); + else + path.AddLine(rec.X, rec.Bottom, rec.X, rec.Bottom); + + //Set top-left corner. + if (!exclude_TopLeft) + path.AddArc(rec.X, rec.Y, s, s, 180, 90); + else + path.AddLine(rec.X, rec.Y, rec.X, rec.Y); + + path.CloseAllFigures(); + return path; + } + + /// + /// Rounds the corners of the newly created rectangle-shape region and returns the region. + /// + /// The size of the region. + /// The radius of the rounded corners. This value should be + /// bigger then 0 and less or equal to the (a half of the smallest value + /// of the region’s width and height). + /// A value that specifies if the top-left + /// corner of the region should be rounded. If the value is True + /// then the corner is not rounded otherwise it is. + /// A value that specifies if the top-right + /// corner of the region should be rounded. If the value is True + /// then the corner is not rounded otherwise it is. + /// A value that specifies if the bottom-right + /// corner of the region should be rounded. If the value is True + /// then the corner is not rounded otherwise it is. + /// A value that specifies if the bottom-left + /// corner of the region should be rounded. If the value is True + /// then the corner is not rounded otherwise it is. + public static Region RoundedRegion(Size rSize, int r) + { + return RoundedRegion(rSize, r, false, false, false, false); + } + + public static Region RoundedRegion(Size rSize, int r, + bool exclude_TopLeft, + bool exclude_TopRight, + bool exclude_BottomRight, + bool exclude_BottomLeft) + { + int s = r * 2; + GraphicsPath path = new GraphicsPath(); + //If 's' is less than or equal to zero, + //then return a simple rectangle. + if (s <= 0) + { + path.StartFigure(); + path.AddLine(rSize.Width, 0, rSize.Width, 0); + path.AddLine(rSize.Width, rSize.Height, rSize.Width, rSize.Height); + path.AddLine(0, rSize.Height, 0, rSize.Height); + path.AddLine(0, 0, 0, 0); + path.CloseAllFigures(); + return new Region(path); + } + //If 's' is bigger than the smallest value of the size, + //then assign the value to 's'. + if (rSize.Height < rSize.Width) + { + if (s > rSize.Height) + s = rSize.Height; + } + else + { + if (s > rSize.Width) + s = rSize.Width; + } + path.StartFigure(); + //Set top-right corner. + if (!exclude_TopRight) + path.AddArc(rSize.Width - s, 0, s - 1, s - 1, 270, 90); + else + path.AddLine(rSize.Width, 0, rSize.Width, 0); + //Set bottom-right corner. + if (!exclude_BottomRight) + { + path.AddLine(rSize.Width, r, rSize.Width, rSize.Height - r); + path.AddArc(rSize.Width - s, rSize.Height - s, s - 1, s - 1, 0, 90); + } + else + path.AddLine(rSize.Width, rSize.Height, rSize.Width, rSize.Height); + + //Set bottom-left corner. + if (!exclude_BottomLeft) + { + path.AddLine(rSize.Width - r, rSize.Height, r, rSize.Height); + path.AddArc(0, rSize.Height - s, s - 1, s - 1, 90, 90); + } + else + path.AddLine(0, rSize.Height, 0, rSize.Height); + + //Set top-left corner. + if (!exclude_TopLeft) + path.AddArc(0, 0, s - 1, s - 1, 180, 90); + else + path.AddLine(0, 0, 0, 0); + + path.CloseAllFigures(); + return new Region(path); + } + } +} diff --git a/Editor/SyntaxRichTextBox.cs b/Editor/SyntaxRichTextBox.cs new file mode 100644 index 0000000..75169d5 --- /dev/null +++ b/Editor/SyntaxRichTextBox.cs @@ -0,0 +1,2078 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.IO; +using System.Xml; +using System.Text; +using System.Drawing; + +using System.Collections.Generic; +using System.Windows.Forms; +using System.ComponentModel; +using System.Drawing.Printing; +using System.Text.RegularExpressions; +using System.Runtime.InteropServices; + +namespace LSLEditor +{ + public delegate void IsDirtyHandler(object sender, EventArgs e); + + public class SyntaxRichTextBox : RichTextBox + { + private const int WM_SETREDRAW = 0x000B; + private const int WM_USER = 0x400; + private const int EM_GETEVENTMASK = (WM_USER + 59); + private const int EM_SETEVENTMASK = (WM_USER + 69); + + // Scroll position + [DllImport("user32.dll")] + private static extern int SendMessage(IntPtr hwndLock, Int32 wMsg, Int32 wParam, ref Point pt); + + // Anti flicker + [DllImport("user32", CharSet = CharSet.Auto)] + private static extern IntPtr SendMessage(IntPtr hWnd, int msg, int wParam, IntPtr lParam); + + // Tabs + [DllImport("User32", CharSet = CharSet.Auto)] + public static extern IntPtr SendMessage(IntPtr h, int msg, int wParam, int[] lParam); + + private bool m_Dirty; + + private bool blnEscape; + + private bool blnInsert; + + // for tooltipping + private bool m_blnToolTipping; + private System.Windows.Forms.Timer timer1; + private GListBoxWindow GListBoxWindow; + private TooltipWindow TooltipMouse; + private TooltipWindow TooltipKeyboard; + private TooltipWindow TooltipListBox; + + private Point OldMouseLocation; + + private int intKeyWordLength; + + // needed for flicker-free updates + private int intUpdate; + private IntPtr eventMask; + + private int intOldLines; + + // colored words + private KeyWords keyWords; + + private Helpers.CodeCompletion codeCompletion; + + // after clicking on error + private int HighLightLine; + + // bracket highlighting + private List HighLightList; + + public float CharWidth; + public int LineHeight; + + // undo + private struct UndoElement + { + public int SelectionStart; + public int SelectionLength; + public string SelectedText; + public string RedoText; + public UndoElement(int SelectionStart, string SelectedText, int SelectionLength, string RedoText) + { + this.SelectionStart = SelectionStart; + this.SelectionLength = SelectionLength; + this.SelectedText = SelectedText; + this.RedoText = RedoText; + } + } + private Stack UndoStack; + private Stack RedoStack; + + #region printing + //Convert the unit used by the .NET framework (1/100 inch) + //and the unit used by Win32 API calls (twips 1/1440 inch) + private const double anInch = 14.4; + + [StructLayout(LayoutKind.Sequential)] + private struct RECT + { + public int Left; + public int Top; + public int Right; + public int Bottom; + } + + [StructLayout(LayoutKind.Sequential)] + private struct CHARRANGE + { + public int cpMin; //First character of range (0 for start of doc) + public int cpMax; //Last character of range (-1 for end of doc) + } + + [StructLayout(LayoutKind.Sequential)] + private struct FORMATRANGE + { + public IntPtr hdc; //Actual DC to draw on + public IntPtr hdcTarget; //Target DC for determining text formatting + public RECT rc; //Region of the DC to draw to (in twips) + public RECT rcPage; //Region of the whole DC (page size) (in twips) + public CHARRANGE chrg; //Range of text to draw (see earlier declaration) + } + + private const int EM_FORMATRANGE = WM_USER + 57; + + [DllImport("user32", CharSet = CharSet.Auto)] + private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wp, IntPtr lp); + + // Render the contents of the RichTextBox for printing + // Return the last character printed + 1 (printing start from this point for next page) + public int Print(int charFrom, int charTo, PrintPageEventArgs e) + { + //Calculate the area to render and print + RECT rectToPrint; + rectToPrint.Top = (int)(e.MarginBounds.Top * anInch); + rectToPrint.Bottom = (int)(e.MarginBounds.Bottom * anInch); + rectToPrint.Left = (int)(e.MarginBounds.Left * anInch); + rectToPrint.Right = (int)(e.MarginBounds.Right * anInch); + + //Calculate the size of the page + RECT rectPage; + rectPage.Top = (int)(e.PageBounds.Top * anInch); + rectPage.Bottom = (int)(e.PageBounds.Bottom * anInch); + rectPage.Left = (int)(e.PageBounds.Left * anInch); + rectPage.Right = (int)(e.PageBounds.Right * anInch); + + IntPtr hdc = e.Graphics.GetHdc(); + + FORMATRANGE fmtRange; + fmtRange.chrg.cpMax = charTo; //Indicate character from to character to + fmtRange.chrg.cpMin = charFrom; + fmtRange.hdc = hdc; //Use the same DC for measuring and rendering + fmtRange.hdcTarget = hdc; //Point at printer hDC + fmtRange.rc = rectToPrint; //Indicate the area on page to print + fmtRange.rcPage = rectPage; //Indicate size of page + + IntPtr wparam = new IntPtr(1); + + //Get the pointer to the FORMATRANGE structure in memory + IntPtr lparam = Marshal.AllocCoTaskMem(Marshal.SizeOf(fmtRange)); + Marshal.StructureToPtr(fmtRange, lparam, false); + + //Send the rendered data for printing + IntPtr res = SendMessage(Handle, EM_FORMATRANGE, wparam, lparam); + + //Free the block of memory allocated + Marshal.FreeCoTaskMem(lparam); + + //Release the device context handle obtained by a previous call + e.Graphics.ReleaseHdc(hdc); + + //Return last + 1 character printer + return res.ToInt32(); + } + #endregion + + public event IsDirtyHandler OnDirtyChanged; + public event EventHandler OnPaintNumbers; + + public delegate void CursorPositionChangedHandler(object sender, CursorPositionEventArgs e); + public event CursorPositionChangedHandler OnCursorPositionChanged; + public class CursorPositionEventArgs : EventArgs + { + public int Line; + public int Column; + public int Char; + public int Total; + public bool Insert; + public bool Caps; + public CursorPositionEventArgs(int intLine, int intColumn, int intChar, int intTotal, bool blnInsert, bool blnCaps) + { + this.Line = intLine; + this.Column = intColumn; + this.Char = intChar; + this.Total = intTotal; + this.Insert = blnInsert; + this.Caps = blnCaps; + } + } + + public SyntaxRichTextBox() + { + this.intUpdate = 0; + this.eventMask = IntPtr.Zero; + this.m_blnToolTipping = false; + + this.intKeyWordLength = 0; + + this.AcceptsTab = true; + this.BorderStyle = BorderStyle.None; + this.DetectUrls = false; + this.Dirty = false; + + this.ScrollBars = RichTextBoxScrollBars.ForcedBoth; + this.WordWrap = false; + + this.FontChanged += new EventHandler(SyntaxRichTextBox_FontChanged); + + this.MouseMove += new MouseEventHandler(SyntaxRichTextBox_MouseMove); + + this.VScroll += new EventHandler(SyntaxRichTextBox_Position); + this.HScroll += new EventHandler(SyntaxRichTextBox_Position); + + this.HighLightLine = -1; + this.HighLightList = new List(); + + this.UndoStack = new Stack(); + this.RedoStack = new Stack(); + + this.blnEscape = false; + + this.blnInsert = true; + + this.intOldLines = -1; + + this.CharWidth = 10; //TODO + this.LineHeight = 16; + + this.OldMouseLocation = Point.Empty; + + this.codeCompletion = new Helpers.CodeCompletion(); + + this.HideSelection = false; + + // are these of any use? + //this.DoubleBuffered = true; + //SetStyle(ControlStyles.AllPaintingInWmPaint, true); + //SetStyle(ControlStyles.OptimizedDoubleBuffer, true); + //SetStyle(ControlStyles.Opaque, true); + } + + public void Init(LSLEditorForm parent, XmlDocument xml) + { + if (parent != null) + { + this.ToolTipping = true; + this.GListBoxWindow = parent.GListBoxWindow; + this.TooltipMouse = parent.TooltipMouse; + this.TooltipKeyboard = parent.TooltipKeyboard; + this.TooltipListBox = parent.TooltipListBox; + } + + string ColorScheme = "color"; + if (this.ToolTipping) + { + if (Properties.Settings.Default.SLColorScheme) + { + ColorScheme = "sl" + ColorScheme; + } + + XmlNode BackgroundColorNode = xml.SelectSingleNode("/Conf"); + if (BackgroundColorNode != null) + { + Color bgColor = Color.FromArgb(255, Color.FromArgb(int.Parse(BackgroundColorNode.Attributes[ColorScheme].InnerText.Replace("#", ""), System.Globalization.NumberStyles.HexNumber))); + this.BackColor = bgColor; + } + } + keyWords = new KeyWords(ColorScheme, xml); + } + + private void MeasureFont() + { + Size size = TextRenderer.MeasureText("MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM", this.Font); + CharWidth = (int)(size.Width / 50.0F); + LineHeight = size.Height; + } + + void SyntaxRichTextBox_FontChanged(object sender, EventArgs e) + { + this.SelectAll(); + + TabStops(); + + // recolor all + ColorLine(0, this.Text.Length); + } + + private void TabStops() + { + MeasureFont(); + + const int EM_SETTABSTOPS = 0xCB; + + int intNumberOfChars = Properties.Settings.Default.TabStops; + int[] tabs = new int[30]; // TODO + float fltTabWidth = intNumberOfChars * CharWidth; + + float totalWidth = 0.0F; + for (int intI = 0; intI < tabs.Length; intI++) + { + totalWidth += fltTabWidth; + tabs[intI] = (int)totalWidth; + } + + SendMessage(this.Handle, EM_SETTABSTOPS, 0, null); + SendMessage(this.Handle, EM_SETTABSTOPS, tabs.Length, tabs); + + this.SelectionTabs = tabs; + } + + private void PaintNumbers() + { + if (OnPaintNumbers != null) + OnPaintNumbers(null, null); + } + + protected override void OnVScroll(EventArgs e) + { + base.OnVScroll(e); + PaintNumbers(); + } + + + private Point RTBScrollPos + { + get + { + const int EM_GETSCROLLPOS = 0x0400 + 221; + Point pt = new Point(); + + SendMessage(this.Handle, EM_GETSCROLLPOS, 0, ref pt); + return pt; + } + set + { + const int EM_SETSCROLLPOS = 0x0400 + 222; + + SendMessage(this.Handle, EM_SETSCROLLPOS, 0, ref value); + } + } + + + public bool Dirty + { + get + { + return m_Dirty; + } + set + { + if (this.m_Dirty == value) + return; + this.m_Dirty = value; + + if (OnDirtyChanged == null) + return; + + OnDirtyChanged(this, new EventArgs()); + } + } + + private void SyntaxRichTextBox_Position(object sender, EventArgs e) + { + SetPosition(Screen.GetWorkingArea(this)); + } + + private void SyntaxRichTextBox_MouseMove(object sender, MouseEventArgs e) + { + if (!ToolTipping) + return; + + if (this.timer1 == null) + return; + + this.timer1.Stop(); + if (OldMouseLocation != e.Location) + { + OldMouseLocation = e.Location; + this.timer1.Start(); + } + } + + private int GetLine() + { + return 1 + this.GetLineFromCharIndex(this.SelectionStart); + } + + private int GetChar() + { + return 1 + this.SelectionStart - this.GetFirstCharIndexOfCurrentLine(); + } + + private int GetColumn() + { + Point p1 = this.GetPositionFromCharIndex(this.GetFirstCharIndexOfCurrentLine()); + Point p2 = this.GetPositionFromCharIndex(this.SelectionStart); + int intColumn = (int)((p2.X - p1.X) / this.CharWidth); + return 1+ intColumn; + } + + private int GetTotal() + { + return this.Text.Length; + } + + public void Goto(int Line, int Char) + { + BeginUpdate(); + LineDownlighting(); + + try + { + int intLine = Line - 1; + if (intLine < 0) + intLine = 0; + if (intLine >= this.Lines.Length) + intLine = this.Lines.Length - 1; + + if (intLine >= 0 && intLine < this.Lines.Length) + { + int intLength = this.Lines[intLine].Length; + int intStart = GetFirstCharIndexFromLine(intLine); + int intIndex = intStart + Char - 1; + HighLightLine = intLine; + this.SelectionStart = intStart; + this.SelectionLength = intLength; + this.SelectionBackColor = Color.LightBlue; + this.SelectionLength = 0; + this.SelectionStart = intIndex; + } + } + catch + { + } + + EndUpdate(); + this.Focus(); + } + + protected override void OnSelectionChanged(EventArgs e) + { + base.OnSelectionChanged(e); + if (!IsUpdating) + CursorPositionChanged(); // show cursor position + } + + private bool IsUpdating + { + get + { + return (intUpdate > 0); + } + } + + Point backupScrollPoint; + private void BeginUpdate() + { + ++intUpdate; + if (intUpdate > 1) // once is enough + return; + + backupScrollPoint = this.RTBScrollPos; + // Disable redrawing + SendMessage(this.Handle, WM_SETREDRAW, 0, IntPtr.Zero); + + // Disable generating events + eventMask = SendMessage(this.Handle, EM_GETEVENTMASK, 0, IntPtr.Zero); + } + + private void EndUpdate() + { + intUpdate = Math.Max(0, intUpdate - 1); + + if (intUpdate > 0) // only the last one + return; + + // Enable events + SendMessage(this.Handle, EM_SETEVENTMASK, 0, eventMask); + + // Enable redrawing + SendMessage(this.Handle, WM_SETREDRAW, 1, IntPtr.Zero); + + // also draw when linenumbers are shifted + if (intOldLines != this.Lines.Length || backupScrollPoint != this.RTBScrollPos) + { + intOldLines = this.Lines.Length; + PaintNumbers(); + } + Invalidate(); + } + + private bool IsAlpha(char chrC) + { + return (char.IsLetterOrDigit(chrC) || chrC == '_'); + } + + // used for F1 key, help and tooltipping, use Mouse of begin-selection + public string GetCurrentKeyWord(bool blnUserMousePosition, out Point PositionFirstCharacter) + { + PositionFirstCharacter = Point.Empty; + + int intIndex = this.SelectionStart; + if (blnUserMousePosition) + { + Point mp = this.PointToClient(Control.MousePosition); + intIndex = this.GetCharIndexFromPosition(mp); + + // check if mouse is in region of index + Point mpControle = this.GetPositionFromCharIndex(intIndex); + if (Math.Abs(mp.X - mpControle.X) > 5 || Math.Abs(mp.Y - mpControle.Y) > this.LineHeight) + return ""; + } + + int intLineNr = this.GetLineFromCharIndex(intIndex); + int intFirstChar = this.GetFirstCharIndexFromLine(intLineNr); + int intColumn = intIndex - intFirstChar; + + string strLine = this.Lines[intLineNr]; + + int intStart = intColumn; + while ((intStart > 0) && (IsAlpha(strLine[intStart - 1]))) + intStart--; + + // 22 jun 2007 + PositionFirstCharacter = this.GetPositionFromCharIndex(intFirstChar + intStart + 2); + + int intEnd = intColumn; + while ((intEnd < strLine.Length) && (IsAlpha(strLine[intEnd]))) + intEnd++; + + // Calculate the length of the keyword. + int intLength = intEnd - intStart; + + // return the keyword + return strLine.Substring(intStart, intLength); + } + + private string GetCurrentFunction(out int Argument, out bool DoWild) + { + DoWild = false; + Argument = 0; + int intIndex = this.SelectionStart; + int intLineNumber = this.GetLineFromCharIndex(intIndex); + int intStartChar = this.GetFirstCharIndexFromLine(intLineNumber); + + int intColumn = intIndex - intStartChar; + + string strLine = this.Lines[intLineNumber]; + + // Find the end of the current function + int intEnd = intColumn - 1; + while (intEnd > 0 && + strLine[intEnd] != '(' && + strLine[intEnd] != ')' && + strLine[intEnd] != '\n') + { + if (strLine[intEnd] == ',') + { + Argument++; + if (Argument == 1) + DoWild = (intColumn - intEnd) == 1; + } + intEnd--; + } + if (intEnd <= 0) + return ""; + + if (strLine[intEnd] != '(') + return ""; + + if (Argument == 0) + DoWild = (intColumn - intEnd) == 1; + + intEnd--; + + // Find the begin of the current function. + int intStart = intEnd; + while ((intStart > 0) && (IsAlpha(strLine[intStart]))) + intStart--; + + // Calculate the length of the function. + int intLength = intEnd - intStart; + + // return the Function name + return strLine.Substring(intStart + 1, intLength); + } + + private string GetNewWhiteSpace(int intOffset) + { + int intIndex = this.GetLineFromCharIndex(this.SelectionStart); + return AutoFormatter.GetNewWhiteSpace(this.Lines, intIndex + intOffset); + } + + private void AutoFormatFromLineToLine(int intLineStart, int intLineEnd) + { + BeginUpdate(); + int intStart = this.GetFirstCharIndexFromLine(intLineStart); + int intLength = this.GetFirstCharIndexFromLine(intLineEnd) + + this.Lines[intLineEnd].Length + 1 - intStart; + this.SelectionStart = intStart; + this.SelectionLength = intLength; + AutoFormat(true); + EndUpdate(); + } + + private void ProcessEnter() + { + BeginUpdate(); + this.ColoredText = "\n"; + if (ToolTipping) + { + if (Properties.Settings.Default.Indent) + { + if (Properties.Settings.Default.IndentFullAuto) + { + int intLine = this.GetLineFromCharIndex(this.SelectionStart); + AutoFormatFromLineToLine(intLine - 1, intLine - 1); + this.ColoredText = GetNewWhiteSpace(-1); + } + else if (Properties.Settings.Default.IndentCursorPlacement) + { + this.ColoredText = GetNewWhiteSpace(-1); + } + } + } + EndUpdate(); + } + + private void SmartIndenting() + { + int intFirstLine, intC; + int intLastLine = this.GetLineFromCharIndex(this.SelectionStart); + int intColumn = this.SelectionStart - this.GetFirstCharIndexFromLine(intLastLine); + + intColumn--; // because we are at position '}' + + if (MatchingBracket(intLastLine, intColumn, '}', '{', -1, out intFirstLine, out intC)) + { + if ((intLastLine - intFirstLine) >= 1) + AutoFormatFromLineToLine(intFirstLine + 1, intLastLine); + } + } + + private void ProcessBraces(char keyChar) + { + BeginUpdate(); + int intStart = this.SelectionStart; + + this.ColoredText = keyChar.ToString(); + + if (Properties.Settings.Default.Indent) + { + int intLength = this.Text.Length; + + if (Properties.Settings.Default.IndentFullAuto) + { + if (keyChar == '}') + { + SmartIndenting(); + } + else + { + int intCurrentLine = this.GetLineFromCharIndex(this.SelectionStart); + AutoFormatFromLineToLine(intCurrentLine, intCurrentLine); + } + } + + int intDelta = 1 + this.Text.Length - intLength; + + this.SelectionStart = intStart + intDelta; + + BracketHighlichting(); + } + + EndUpdate(); + } + + public void Delete() + { + BeginUpdate(); + if (this.SelectionLength == 0) + this.SelectionLength = 1; + this.ColoredText = ""; + EndUpdate(); + OnTextChanged(null); + } + + public new void Cut() + { + BeginUpdate(); + this.Copy(); + this.ColoredText = ""; + EndUpdate(); + OnTextChanged(null); + } + + + private void SaveUndo(UndoElement el) + { + if (RedoStack.Count > 0) + RedoStack.Clear(); + UndoStack.Push(el); + } + + public new void Redo() + { + if (RedoStack.Count == 0) + return; + + MakeAllInvis(); + + BeginUpdate(); + + this.Dirty = true; + + UndoElement el = RedoStack.Pop(); + + this.SelectionStart = el.SelectionStart; + this.SelectionLength = el.SelectedText.Length; + this.SelectedText = el.RedoText; + + el.RedoText = null; // dont need it anymore + UndoStack.Push(el); + + int intStartLine = this.GetLineFromCharIndex(el.SelectionStart); + int intStart = this.GetFirstCharIndexFromLine(intStartLine); + + int intStopLine = this.GetLineFromCharIndex(el.SelectionStart + el.SelectedText.Length); + if (intStopLine < this.Lines.Length) + { + int intLengthStopLine = this.Lines[intStopLine].Length; + int intStop = this.GetFirstCharIndexFromLine(intStopLine) + intLengthStopLine; + + ColorLine(intStart, intStop - intStart); + } + + EndUpdate(); + this.Focus(); + } + + public new void Undo() + { + if (UndoStack.Count == 0) + return; + + MakeAllInvis(); + + BeginUpdate(); + + UndoElement el = UndoStack.Pop(); + + this.Dirty = (UndoStack.Count != 0); + + this.SelectionStart = el.SelectionStart; + this.SelectionLength = el.SelectionLength; + el.RedoText = this.SelectedText; // save redo text!!!! + this.SelectedText = el.SelectedText; + + RedoStack.Push(el); + + int intStartLine = this.GetLineFromCharIndex(el.SelectionStart); + int intStart = this.GetFirstCharIndexFromLine(intStartLine); + + int intStopLine = this.GetLineFromCharIndex(el.SelectionStart + el.SelectedText.Length); + if (intStopLine < this.Lines.Length) + { + int intLengthStopLine = this.Lines[intStopLine].Length; + int intStop = this.GetFirstCharIndexFromLine(intStopLine) + intLengthStopLine; + + ColorLine(intStart, intStop - intStart); + } + + EndUpdate(); + this.Focus(); + } + + public void ToClipBoard() + { + bool backup = Properties.Settings.Default.SL4SpacesIndent; + Properties.Settings.Default.SL4SpacesIndent = true; + string strFormattedText = AutoFormatter.ApplyFormatting(0, this.Text); + Properties.Settings.Default.SL4SpacesIndent = backup; + + try + { + Clipboard.SetDataObject(strFormattedText, true); + } + catch(Exception exception) + { + // error + Console.WriteLine(exception.Message); + } + } + + public void ReplaceSelectedText(string strReplacement) + { + this.blnEscape = true; // prevent windows popping up + this.ColoredText = strReplacement; + } + + public void MakeAllInvis() + { + if (!ToolTipping) + return; + this.TooltipKeyboard.Visible = false; + this.TooltipListBox.Visible = false; + this.TooltipMouse.Visible = false; + this.GListBoxWindow.Visible = false; + this.Focus(); + } + + private void LineDownlighting() + { + if (this.HighLightLine < 0) + return; + + // doof line + BeginUpdate(); + int intBackupSelectionStart = this.SelectionStart; + int intBackupSelectionLength = this.SelectionLength; + this.SelectionStart = this.GetFirstCharIndexFromLine(this.HighLightLine); + this.SelectionLength = this.Lines[this.HighLightLine].Length; + this.SelectionBackColor = this.BackColor; + this.SelectionStart = intBackupSelectionStart; + this.SelectionLength = intBackupSelectionLength; + this.HighLightLine = -1; + EndUpdate(); + } + + private void CursorPositionChanged() + { + BracketHighlichting(); + + LineDownlighting(); + + if (OnCursorPositionChanged != null) + OnCursorPositionChanged(this, new CursorPositionEventArgs(this.GetLine(), this.GetColumn(), this.GetChar(), this.GetTotal(), this.blnInsert, Control.IsKeyLocked(Keys.CapsLock))); + } + + public new void Paste() + { + ResetHighlichting(); + + if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text, true)) + { + string strTextToPaste = Clipboard.GetDataObject().GetData(DataFormats.Text, true).ToString().Replace("\r", ""); + this.ColoredText = strTextToPaste; + } + } + + private void GoEnd(bool blnShift) + { + if (this.Lines.Length == 0) + return; + int intLast = this.SelectionStart + this.SelectionLength; + int intLine = this.GetLineFromCharIndex(intLast); + int intColumn = intLast - this.GetFirstCharIndexFromLine(intLine); + string strLine = this.Lines[intLine]; + int intAdd = strLine.Length - intColumn; + if (blnShift) + this.SelectionLength += intAdd; + else + { + this.SelectionStart = intLast+intAdd; + this.SelectionLength = 0; + } + } + + private void GoHome(bool blnShift) + { + if (this.Lines.Length == 0) + return; + int intLine = this.GetLineFromCharIndex(this.SelectionStart); + string strLine = this.Lines[intLine]; + for (int intColumn = 0; intColumn <= strLine.Length; intColumn++) + { + // now we are at the front of the line, ex whitespace + if (intColumn == strLine.Length || strLine[intColumn] > ' ') + { + int intStart = this.GetFirstCharIndexFromLine(intLine) + intColumn; + if (intStart == this.SelectionStart) // already here + intStart = this.GetFirstCharIndexFromLine(intLine); + // intStart has now got the new start position + if (blnShift) + { + int intAddToLength = this.SelectionStart - intStart; + this.SelectionStart = intStart; + // can + of - + this.SelectionLength = Math.Max(0, this.SelectionLength + intAddToLength); + } + else + { + this.SelectionStart = intStart; + this.SelectionLength = 0; + } + return; + } + } + } + + protected override void OnKeyDown(KeyEventArgs e) + { + base.OnKeyDown(e); + + if (this.TooltipMouse != null) + { + if (this.TooltipMouse.Visible) + { + this.TooltipMouse.Visible = false; + this.Focus(); + } + } + + if (this.GListBoxWindow != null && this.GListBoxWindow.Visible) + { + this.GListBoxWindow.KeyDownHandler(e); + } + else + { + if (e.KeyCode == Keys.Tab) + { + int intLineStart = this.GetLineFromCharIndex(this.SelectionStart); + int intLineStop = this.GetLineFromCharIndex(this.SelectionStart + this.SelectionLength); + if (intLineStart != intLineStop) + MultiLineTab(!e.Shift); + else + SingleLineTab(!e.Shift); + e.Handled = true; + } + } + + if (e.KeyCode == Keys.Insert) + { + blnInsert = !blnInsert; + CursorPositionChanged(); + } + + if (e.KeyCode == Keys.Left || + e.KeyCode == Keys.Right || + e.KeyCode == Keys.End || + e.KeyCode == Keys.Home) + MakeAllInvis(); + + if (e.KeyCode == Keys.Home) + { + if (!e.Control) + { + GoHome(e.Shift); + e.Handled = true; + } + } + + if (e.KeyCode == Keys.End) + { + if (!e.Control) + { + GoEnd(e.Shift); + e.Handled = true; + } + } + + if (e.KeyCode == Keys.Delete) + { + if (e.Control) + { + int intWissel = 0; + int intIndex = this.SelectionStart; + if (intIndex < this.Text.Length) + { + bool blnWhiteSpace = (this.Text[intIndex] <= ' '); + + while (intIndex < this.Text.Length) + { + if (this.Text[intIndex] > ' ') + { + if (blnWhiteSpace) + { + blnWhiteSpace = false; + intWissel++; + } + } + else // whitespace + { + if (!blnWhiteSpace) + { + blnWhiteSpace = true; + intWissel++; + } + } + if (intWissel == 2) + break; + intIndex++; + } + this.SelectionLength = intIndex - this.SelectionStart; + } + } // control + else + { + if (e.Shift) + { + if (this.SelectionLength == 0) + { + if (this.Lines.Length > 0) + { + BeginUpdate(); + this.SelectionStart = this.GetFirstCharIndexOfCurrentLine(); + int intLine = this.GetLineFromCharIndex(this.SelectionStart); + this.SelectionLength = this.Lines[intLine].Length + 1; + EndUpdate(); + } + } + this.Copy(); + } // shift + else + { + if (this.SelectionLength == 0) + this.SelectionLength = 1; + } // no shift + } + this.Delete(); + e.Handled = true; + } + + if (e.KeyCode == Keys.X && e.Control) + { + this.Cut(); + e.Handled = true; + } + + if (this.TooltipKeyboard != null) + { + if (this.TooltipKeyboard.Visible) + { + if (e.KeyCode == Keys.Up || + e.KeyCode == Keys.Down) + { + this.TooltipKeyboard.Visible = false; + this.Focus(); + } + } + } + + // 16 maart 2008 + if (e.KeyCode == Keys.Back && e.Alt) + this.Undo(); + + if (e.KeyCode == Keys.Return || e.KeyCode == Keys.Back) + e.Handled = true; + + if (e.Control) + { + if (e.KeyCode == Keys.R) + { + e.Handled = true; + } + if (e.KeyCode == Keys.V) + { + this.Paste(); + e.Handled = true; + } + if (e.KeyCode == Keys.C) + { + this.Copy(); + e.Handled = true; + } + } + + if (e.KeyData == Keys.CapsLock) + CursorPositionChanged(); + } + + private void ProcessBackSpace() + { + if (this.SelectionStart == 0 && this.SelectionLength == 0) + return; + + BeginUpdate(); + if (this.SelectionStart > 0 && this.SelectionLength == 0) + this.SelectionStart--; + if (this.SelectionLength == 0) + this.SelectionLength = 1; + this.ColoredText = ""; + EndUpdate(); + OnTextChanged(null); + CursorPositionChanged(); + } + + protected override void OnKeyPress(KeyPressEventArgs e) + { + ResetHighlichting(); + + char keyChar = e.KeyChar; + + switch (e.KeyChar) + { + case '\r': // Return + if (this.GListBoxWindow.Visible) + InsertSelectedWord(); + else + ProcessEnter(); + e.Handled = true; + break; + case '\t': // TAB + if (this.GListBoxWindow.Visible) + InsertSelectedWord(); + e.Handled = true; + break; + case '{': + case '}': + ProcessBraces(keyChar); + e.Handled = true; + break; + case '\b': + ProcessBackSpace(); + MakeAllInvis(); + e.Handled = true; + break; + case (char)27: + this.blnEscape = !this.blnEscape; + MakeAllInvis(); + break; + default: + if (keyChar >= 32) + { + if (this.SelectionLength != 0) + this.Delete(); + SaveUndo(new UndoElement(this.SelectionStart, "", 1, null)); + } + if (keyChar > 32 && !Char.IsLetterOrDigit(keyChar)) + this.blnEscape = false; + break; + } + base.OnKeyPress(e); + } + + // event generated, make list of codecompletion words + private void CodeCompletion(string strKeyWord, bool IsRegularExpression) + { + if (!ToolTipping) + return; + + intKeyWordLength = strKeyWord.Length; + + if (IsRegularExpression) + intKeyWordLength = 0; // else it would delete typed keyword + + if (strKeyWord.Length == 0 || this.blnEscape) + { + this.TooltipListBox.Visible = false; + this.GListBoxWindow.Visible = false; + this.Focus(); + return; + } + + List list; + + if (Properties.Settings.Default.CodeCompletion) + list = keyWords.KeyWordSearch(strKeyWord, IsRegularExpression); + else + list = new List(); + + if (Properties.Settings.Default.CodeCompletionUserVar && !IsRegularExpression) + codeCompletion.CodeCompletionUserVar(strKeyWord, this.Text, this.SelectionStart, list); + + if (list.Count == 0) + { + this.TooltipListBox.Visible = false; + this.GListBoxWindow.Visible = false; + this.Focus(); + return; + } + + if (list.Count == 1) + { + // single keyword has been typed, make listbox invisible + if (list[0].name == strKeyWord) + { + /* + // this autocompletes 1 word, backspace is a problem, use escape + this.GListBoxWindow.GListBox.Items.Clear(); + KeyWordInfo keyWordInfo = list[0]; + GListBoxItem glbi = new GListBoxItem(keyWordInfo.name, (int)keyWordInfo.type); + this.GListBoxWindow.GListBox.Items.Add(glbi); + + this.GListBoxWindow.GListBox.SelectedIndex = 0; + InsertSelectedWord(); + */ + + if (strKeyWord == "else") // else autocompletion enoys people!!! TODO + { + this.TooltipListBox.Visible = false; + this.GListBoxWindow.Visible = false; + this.Focus(); + return; + } + } + } + + // Hide argument typing + this.TooltipKeyboard.Visible = false; + this.Focus(); + + this.GListBoxWindow.GListBox.Items.Clear(); + foreach (KeyWordInfo keyWordInfo in list) + { + GListBoxItem glbi = new GListBoxItem(keyWordInfo.name, (int)keyWordInfo.type); + this.GListBoxWindow.GListBox.Items.Add(glbi); + } + this.GListBoxWindow.GListBox.SelectedIndex = 0; + this.GListBoxWindow.GListBox.Height = Math.Min(list.Count + 1, 11) * this.GListBoxWindow.GListBox.ItemHeight; + this.GListBoxWindow.SetPosition(Screen.GetWorkingArea(this), this); + + // Just in case it pops up + this.TooltipListBox.SetPosition(Screen.GetWorkingArea(this), this); + + this.GListBoxWindow.Visible = true; + this.Focus(); + } + + private void SelectWordByDoubleClick() + { + int intSelectionStartBackup = this.SelectionStart; + + int intLineNumber = this.GetLineFromCharIndex(intSelectionStartBackup); + int intFirstChar = this.GetFirstCharIndexFromLine(intLineNumber); + int intColumn = intSelectionStartBackup - intFirstChar; + + string strLine = this.Lines[intLineNumber]; + + // start or ending in underscore then expand + int intStart = intColumn; + while ((intStart > 0) && IsAlpha(strLine[intStart - 1])) + intStart--; + + int intEnd = intColumn; + while ((intEnd < strLine.Length) && IsAlpha(strLine[intEnd])) + intEnd++; + + if (intStart != intColumn || intEnd != (intStart + this.SelectionLength)) + { + this.SelectionStart = intFirstChar + intStart; + this.SelectionLength = intEnd - intStart; + } + } + + protected override void OnMouseDown(MouseEventArgs e) + { + base.OnMouseDown(e); + + BracketHighlichting(); + + // this sucks!!!! + this.AutoWordSelection = true; + this.AutoWordSelection = Properties.Settings.Default.AutoWordSelection; + + if (this.ToolTipping) + MakeAllInvis(); + + if (e.Clicks == 2) + SelectWordByDoubleClick(); + } + + private void ShowKeyBoardHint() + { + if (!ToolTipping) + return; + + if (this.GListBoxWindow.Visible) + return; + + if (this.blnEscape) + return; + + int intArgument; + bool DoWild; + string strFunction = GetCurrentFunction(out intArgument, out DoWild); + + if (strFunction == "") + { + this.TooltipKeyboard.Visible = false; + this.Focus(); + return; + } + + SetArgumentListOnRichLabel(this.TooltipKeyboard, strFunction, intArgument); + if (DoWild && this.TooltipKeyboard.Wild != "") + { + CodeCompletion(this.TooltipKeyboard.Wild , true); + this.Focus(); + return; + } + + if (this.TooltipKeyboard.Text == "") + { + this.TooltipKeyboard.Visible = false; + } + else + { + this.TooltipKeyboard.SetPosition(Screen.GetWorkingArea(this), this); + this.TooltipKeyboard.Visible = true; + //this.SelectionColor = this.ForeColor; + } + this.Focus(); + } + + private bool IsInComment(string strLine, int intIndex) + { + bool blnInString = false; + for (int intI = 0; intI < intIndex; intI++) + { + char chrC = strLine[intI]; + if (chrC == '"') + blnInString = !blnInString; + if (blnInString) + { + if (chrC == '\\') + intI++; + continue; + } + if (chrC == '/') + { + if ((intI + 1) < intIndex) + if (strLine[intI + 1] == '/') + return true; + } + } + return false; + } + + private bool IsInString(string strLine, int intIndex) + { + int intQuotes = 0; + for (int intI = intIndex - 1; intI >= 0; intI--) + { + char chrC = strLine[intI]; + if (chrC == '"') + { + if ((intI - 1) >= 0) + if (strLine[intI - 1] != '\\') + intQuotes++; + } + } + return ((intQuotes % 2) != 0); + } + + /// + /// OnTextChanged + /// + protected override void OnTextChanged(EventArgs e) + { + if (IsUpdating) + return; + + if (this.Lines.Length == 0) + { + TabStops(); + return; + } + + this.Dirty = true; + + int intSelectionStartBackup = this.SelectionStart; + + int intLineNumber = this.GetLineFromCharIndex(intSelectionStartBackup); + int intFirstChar = this.GetFirstCharIndexFromLine(intLineNumber); + int intColumn = intSelectionStartBackup - intFirstChar; + + string strLine = this.Lines[intLineNumber]; + + ColorLine(intFirstChar, strLine.Length); + + if (IsInComment(strLine, intColumn)) + return; + + if (IsInString(strLine, intColumn)) + return; + + // not in comment and not in string, find the start of a word + int intStart = intColumn; + while ((intStart > 0) && IsAlpha(strLine[intStart - 1])) + intStart--; + + string strTypedWord = strLine.Substring(intStart, intColumn - intStart); + + CodeCompletion(strTypedWord , false); + + ShowKeyBoardHint(); + } + + /// + /// Color a line + /// + private void ColorLine(int intStart, int intLength) + { + if (!ToolTipping) + return; + + if (intLength <= 0) + return; + + BeginUpdate(); + + // Backup position + int SelectionStartBackup = this.SelectionStart; + + // get the line + string strLine = this.Text.Substring(intStart, intLength); + + // highlight all keywords + foreach (Match m in keyWords.Matches(strLine)) + { + Group g = m.Groups[1]; + string strKeyWord = g.Value; + + this.SelectionStart = intStart + g.Index; + this.SelectionLength = g.Length; + + // normal keywords + if (keyWords.ContainsKeyWord(strKeyWord)) + this.SelectionColor = keyWords.GetColorFromKeyWordList(strKeyWord); + else + this.SelectionColor = keyWords.GetColorFromRegex(strKeyWord); + } + + // Restore position + this.SelectionLength = 0; + this.SelectionStart = SelectionStartBackup; + this.SelectionColor = this.ForeColor; + + EndUpdate(); + } + + private int AutoFormat(bool OnlySelectedText) + { + int intTabs; + if (OnlySelectedText) + { + string strW = GetNewWhiteSpace(-1); + intTabs = (int)(strW.Length / AutoFormatter.GetTab().Length); + } + else + { + this.SelectionStart = 0; + this.SelectionLength = this.Text.Length; + intTabs = 0; + } + string strFormattedText = AutoFormatter.ApplyFormatting(intTabs, this.SelectedText); + + this.ColoredText = strFormattedText; + + return strFormattedText.Length; + } + + public void AutoFormatSelectedText() + { + BeginUpdate(); + Point scrollPoint = this.RTBScrollPos; + int intBackupStart = this.SelectionStart; + int intSelectionLength = AutoFormat(true); + this.SelectionStart = intBackupStart; + this.SelectionLength = intSelectionLength; + this.RTBScrollPos = scrollPoint; + EndUpdate(); + } + + public void FormatDocument() + { + BeginUpdate(); + Point scrollPoint = this.RTBScrollPos; + int intLine = this.GetLineFromCharIndex(this.SelectionStart); + AutoFormat(false); + this.SelectionStart = Math.Max(0,this.GetFirstCharIndexFromLine(intLine)); + this.RTBScrollPos = scrollPoint; + EndUpdate(); + } + + public void ClearUndoStack() + { + UndoStack.Clear(); + Dirty = false; + } + + public override string Text + { + get + { + return base.Text; + } + set + { + BeginUpdate(); + int intBackup = this.SelectionStart; + this.SelectionStart = 0; + this.SelectionLength = this.Text.Length; //TODO + this.ColoredText = value; + this.SelectionStart = intBackup; + EndUpdate(); + } + } + + private string GetWhiteSpaceFromCurrentLine() + { + int intIndex = this.GetLineFromCharIndex(this.SelectionStart); + if (intIndex < this.Lines.Length) + return AutoFormatter.GetWhiteSpaceFromLine(this.Lines[intIndex]); + return ""; + } + + // code-completion word is selected + // also comes from mainform (doubleclick), must be public + public void InsertSelectedWord() + { + this.GListBoxWindow.Visible = false; + this.TooltipListBox.Visible = false; + + if (this.GListBoxWindow.GListBox.SelectedIndex < 0) + return; + + int intOffset = 0; + + GListBoxItem glbi = this.GListBoxWindow.Selected; + string strSelected = glbi.ToString(); + if (strSelected == "") + { + this.Focus(); + return; + } + + if (glbi.ImageIndex == (int)KeyWordTypeEnum.Events + || strSelected == "default" && this.Text.IndexOf("default")<0) + { + if (strSelected != "default") + strSelected = keyWords.GetEvent(strSelected); + + string strW = GetWhiteSpaceFromCurrentLine(); + strSelected += "\n" + strW + "{\n" + strW + AutoFormatter.GetTab() + "\n" + strW + "}"; + intOffset = -(strW.Length + 2); + } + else if (glbi.ImageIndex == (int)KeyWordTypeEnum.Functions) + { + if(keyWords.GetNumberOfArguments(strSelected) == 0) + strSelected += "()"; + else + strSelected += "("; + } + else if (glbi.ImageIndex == (int)KeyWordTypeEnum.Properties) + { + strSelected = "\"" + strSelected.Trim() +"\""; + } + + BeginUpdate(); + this.SelectionStart -= intKeyWordLength; + this.SelectionLength = intKeyWordLength; + this.ColoredText = strSelected; + + this.SelectionStart += intOffset; + EndUpdate(); + + // if any + ShowKeyBoardHint(); + + this.Focus(); + } + + // this comes from the main form + public void ShowTooltipOnListBox() + { + string strSelected = this.GListBoxWindow.Selected.ToString(); + string strDescription = keyWords.GetDescription(strSelected); + if (strDescription != "") + { + this.TooltipListBox.Tag = strSelected; + this.TooltipListBox.Text = strDescription; + this.TooltipListBox.XOffset = this.GListBoxWindow.Width; + this.TooltipListBox.SetPosition(Screen.GetWorkingArea(this), this); + this.TooltipListBox.Visible = true; + this.Focus(); + } + else + { + this.TooltipListBox.Visible = false; + this.Focus(); + } + } + + // Tooltip mouse by (Windows.Forms) timer + private void timer1_Tick(object sender, EventArgs e) + { + this.timer1.Stop(); + + if (this.Disposing || this.IsDisposed) + return; + + if (!this.Visible) + return; + + if (!ToolTipping) + return; + + if (!Properties.Settings.Default.ToolTip) + return; + + if (Control.MouseButtons != MouseButtons.None) + return; + + Point point; + string strKeyWord = this.GetCurrentKeyWord(true, out point); + + if (strKeyWord == "") + { + this.TooltipMouse.Visible = false; + return; + } + + if (this.TooltipMouse.Tag.ToString() != strKeyWord) + { + this.TooltipMouse.Tag = strKeyWord; + this.TooltipMouse.Text = keyWords.GetDescription(strKeyWord); + } + + if (this.TooltipMouse.Text == "") + { + this.TooltipMouse.Visible = false; + return; + } + + this.TooltipMouse.SetPosition(this, point); + this.TooltipMouse.Visible = true; + this.Focus(); + } + + public bool ToolTipping + { + get + { + return m_blnToolTipping; + } + set + { + m_blnToolTipping = value; + if (m_blnToolTipping) + { + this.timer1 = new System.Windows.Forms.Timer(); + this.timer1.Interval = Properties.Settings.Default.ToolTipDelay; + this.timer1.Tick += new EventHandler(timer1_Tick); + } + } + } + + public void SetPosition(Rectangle rect) + { + if (!ToolTipping) + return; + if (this.GListBoxWindow.Visible) + this.GListBoxWindow.SetPosition(rect, this); + if (this.TooltipListBox.Visible) + this.TooltipListBox.SetPosition(rect, this); + if (this.TooltipKeyboard.Visible) + this.TooltipKeyboard.SetPosition(rect, this); + } + + private void SetArgumentListOnRichLabel(TooltipWindow window, string strKeyWord, int intArgument) + { + if (window.Tag.ToString() == (strKeyWord + intArgument)) + return; // cached information + + string strWild = ""; + window.Wild = ""; + window.Tag = (strKeyWord + intArgument); + window.Text = keyWords.GetFunctionAndHiglightArgument(strKeyWord, intArgument, out strWild); + if(Properties.Settings.Default.CodeCompletionArguments) + window.Wild = strWild; + } + + + public void Goto(int intLine) + { + this.SelectionStart = this.GetFirstCharIndexFromLine(intLine - 1); + this.Focus(); + } + + public void MultiLineComment(bool blnAdd) + { + BeginUpdate(); + + ResetHighlichting(); + + string strW = GetNewWhiteSpace(-1); + int intTabs = (int)(strW.Length / AutoFormatter.GetTab().Length); + + if (this.SelectionLength == 0) + { + int intLine = this.GetLineFromCharIndex(this.SelectionStart); + int intStart = this.GetFirstCharIndexFromLine(intLine); + int intLength = this.Lines[intLine].Length + 1; + this.SelectionStart = intStart; + this.SelectionLength = intLength; + } + string strSelectedText = AutoFormatter.MultiLineComment(blnAdd, intTabs, this.SelectedText); + + int intBackup = this.SelectionStart; + this.ColoredText = strSelectedText; + this.SelectionStart = intBackup; + this.SelectionLength = strSelectedText.Length; + EndUpdate(); + } + + public void MultiLineTab(bool blnAdd) + { + string strSelectedText = AutoFormatter.MultiLineTab(blnAdd, this.SelectedText); + + int intBackup = this.SelectionStart; + this.ColoredText = strSelectedText; + this.SelectionStart = intBackup; + this.SelectionLength = strSelectedText.Length; + } + + private void SingleLineTab(bool blnAdd) + { + if (blnAdd) + { + this.SelectedText = AutoFormatter.GetTab(); + } + else + { + // Shift tab on single line + string strTab = AutoFormatter.GetTab(); + if (this.SelectionStart > strTab.Length) + { + string strBefore = this.Text.Substring(this.SelectionStart - strTab.Length, strTab.Length); + if (strBefore == strTab) + { + int intBackupLength = this.SelectionLength; + this.SelectionStart -= strTab.Length; + this.SelectionLength = strTab.Length; + this.SelectedText = ""; + this.SelectionLength = intBackupLength; + } + else + { + // space remove? TODO + } + } + } + } + + private void HighLightCharAt(int intIndex, Color color) + { + this.SelectionStart = intIndex; + this.SelectionLength = 1; + this.SelectionBackColor = color; + + if (color != this.BackColor) + HighLightList.Add(intIndex); + } + + private void HighLightCharAt(int intLine, int intColumn, Color color) + { + int intIndex = this.GetFirstCharIndexFromLine(intLine) + intColumn; + HighLightCharAt(intIndex, color); + } + + private bool MatchingBracket(int intCurrentLine, int intCurrentColumn, char chrOpening, char chrClosing, int intDirection, out int intLine, out int intColumn) + { + if (this.Lines.Length == 0) + { + intLine = 0; + intColumn = 0; + return false; + } + intLine = intCurrentLine; + intColumn = intCurrentColumn; + string strLine = AutoFormatter.RemoveComment(this.Lines[intLine]); + + int intNumber = 1; + bool blnWithinString = false; + while (true) + { + intColumn += intDirection; + while (intColumn < 0) + { + intLine--; + if (intLine < 0) + return false; // nothing to do + strLine = AutoFormatter.RemoveComment(this.Lines[intLine]); // get new previous line + intColumn = strLine.Length - 1; // place on end of line + } + + while (intColumn >= strLine.Length) + { + intLine++; + if (intLine >= this.Lines.Length) + return false; // nothing to do + strLine = AutoFormatter.RemoveComment(this.Lines[intLine]); // get new previous line + intColumn = 0; // place on begin of line + } + + char chrC = strLine[intColumn]; + + if (chrC == '"') + { + if (intDirection < 0 && intColumn > 0) + { + if (strLine[intColumn - 1] == '\\') + { + intColumn += intDirection; + continue; + } + } + blnWithinString = !blnWithinString; + } + + if (blnWithinString) + { + if (intDirection > 0 && chrC == '\\') + intColumn += intDirection; + continue; + } + + if (chrC == chrOpening) + intNumber++; + else if (chrC == chrClosing) + { + intNumber--; + if (intNumber == 0) + return true; + } + } + } + + private void ResetHighlichting() + { + if (HighLightList.Count == 0) + return; + + BeginUpdate(); + + Point scrollPoint = this.RTBScrollPos; + + int intBackupStart = this.SelectionStart; + int intBackupLength = this.SelectionLength; + foreach (int intIndex in HighLightList) + HighLightCharAt(intIndex, this.BackColor); + HighLightList.Clear(); + this.SelectionStart = intBackupStart; + this.SelectionLength = intBackupLength; + + this.RTBScrollPos = scrollPoint; + + EndUpdate(); + } + + private void BracketHighlichting() + { + if (this.TextLength == 0) + return; + if (this.SelectionLength != 0) + return; + + BeginUpdate(); + + Point scrollPoint = this.RTBScrollPos; + + int intSelectionStart = this.SelectionStart; + + // ResetHighlichting without the overhead + if (HighLightList.Count > 0) + { + foreach (int intI in HighLightList) + HighLightCharAt(intI, this.BackColor); + HighLightList.Clear(); + } + + int intIndex; + int intType; + + const string Uppers = "<({["; + const string Downers = ">)}]"; + + int intLine = this.GetLineFromCharIndex(intSelectionStart); + int intColumn = intSelectionStart - this.GetFirstCharIndexFromLine(intLine); + + string strLine = AutoFormatter.RemoveComment(this.Lines[intLine]); + + if (intColumn <= strLine.Length) + { + intIndex = intColumn - 1; + if (intIndex >= 0) + { + intType = Downers.IndexOf(strLine[intIndex]); + if (intType >= 0) + { + int intL, intC; + if (MatchingBracket(intLine, intIndex, Downers[intType], Uppers[intType], -1, out intL, out intC)) + { + HighLightCharAt(intLine, intIndex, Properties.Settings.Default.BracketHighlight); + HighLightCharAt(intL, intC, Properties.Settings.Default.BracketHighlight); + } + } + } + + intIndex = intColumn; + if (intIndex < strLine.Length) + { + intType = Uppers.IndexOf(strLine[intIndex]); + if (intType >= 0) + { + int intL, intC; + if (MatchingBracket(intLine, intIndex, Uppers[intType], Downers[intType], 1, out intL, out intC)) + { + HighLightCharAt(intLine, intIndex, Properties.Settings.Default.BracketHighlight); + HighLightCharAt(intL, intC, Properties.Settings.Default.BracketHighlight); + } + } + } + } + + this.SelectionStart = intSelectionStart; + this.SelectionLength = 0; + + this.RTBScrollPos = scrollPoint; + + EndUpdate(); + } + + public override string SelectedText + { + get + { + return base.SelectedText; + } + set + { + if (!IsUpdating) + SaveUndo(new UndoElement(this.SelectionStart, this.SelectedText, value.Length, null)); + base.SelectedText = value; + } + } + + private string ColoredText + { + set + { + BeginUpdate(); + int intFirstCharOfStartLine = this.GetFirstCharIndexOfCurrentLine(); + int intBackup = this.SelectionStart; + if (this.SelectedText != value) + { + this.Dirty = true; + string strTmp = value.Replace("\r", ""); + SaveUndo(new UndoElement(this.SelectionStart, this.SelectedText, strTmp.Length, null)); + this.SelectedText = strTmp; + if (this.Lines.Length > 0) + { + int intEndLine = this.GetLineFromCharIndex(intBackup + strTmp.Length); + int intLastCharOfEndLine = this.GetFirstCharIndexFromLine(intEndLine) + this.Lines[intEndLine].Length; + int intLength = intLastCharOfEndLine - intFirstCharOfStartLine; + ColorLine(intFirstCharOfStartLine, intLength); + this.SelectionStart = intBackup + strTmp.Length; + } + } + else + { + this.SelectionLength = 0; + this.SelectionStart += value.Length; + } + EndUpdate(); + } + } + + public void SaveCurrentFile(string strPath) + { + try + { + Encoding enc = null; + if (!Directory.Exists(Path.GetDirectoryName(strPath))) + Directory.CreateDirectory(Path.GetDirectoryName(strPath)); + switch (Properties.Settings.Default.OutputFormat) + { + case "UTF8": + enc = Encoding.UTF8; + break; + case "Unicode": + enc = Encoding.Unicode; + break; + case "BigEndianUnicode": + enc = Encoding.BigEndianUnicode; + break; + default: + enc = Encoding.Default; + break; + } + StreamWriter sw = new StreamWriter(strPath,false, enc); + sw.Write(this.Text); + sw.Close(); + //this.SaveFile(strPath, RichTextBoxStreamType.PlainText); + this.Dirty = false; + } + catch // (Exception exception) + { + MessageBox.Show("Error saving file, check pathname: " + strPath, "Oops...", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + public new void LoadFile(string path) + { + if (path.StartsWith("http://")) + { + System.Net.WebClient webClient = new System.Net.WebClient(); + this.Text = webClient.DownloadString(path); + } + else + { + if (File.Exists(path)) + { + StreamReader sr = new StreamReader(path, Encoding.Default); + this.Text = sr.ReadToEnd(); + sr.Close(); + } + } + // Fresh files can not be dirty + ClearUndoStack(); + } + } +} diff --git a/Editor/SyntaxRichTextBox.resx b/Editor/SyntaxRichTextBox.resx new file mode 100644 index 0000000..dd0ea4d --- /dev/null +++ b/Editor/SyntaxRichTextBox.resx @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.0.0.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + diff --git a/Editor/TooltipWindow.cs b/Editor/TooltipWindow.cs new file mode 100644 index 0000000..8d817bf --- /dev/null +++ b/Editor/TooltipWindow.cs @@ -0,0 +1,162 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.Drawing; +using System.ComponentModel; +using System.Windows.Forms; +using System.Drawing.Drawing2D; + +namespace LSLEditor +{ + public partial class TooltipWindow : Form + { + public string Wild; + public int XOffset = 0; + public override string Text + { + get + { + return base.Text; + } + set + { + base.Text = value; + this.richLabel1.Text = value; + } + } + + public TooltipWindow(Form parent) + { + InitializeComponent(); + + this.Wild = ""; + + this.Owner = parent; + this.richLabel1.BorderStyle = BorderStyle.FixedSingle; + //this.richLabel1.BackColor = Color.LightGoldenrodYellow; + + this.BackColor = Color.LightGoldenrodYellow; + //this.richLabel1.BorderStyle = BorderStyle.None; + + this.richLabel1.Tag = ""; + this.richLabel1.Text = ""; + } + + public void SetPosition(Rectangle rect, SyntaxRichTextBox syntaxRichTextBox) + { + //Rectangle rect = Screen.PrimaryScreen.WorkingArea; + Point p = syntaxRichTextBox.GetPositionFromCharIndex(syntaxRichTextBox.SelectionStart); + + p = new Point(p.X - 20 + this.XOffset + 2 , p.Y + 2 + syntaxRichTextBox.LineHeight); + + Rectangle client = Screen.PrimaryScreen.WorkingArea; // syntaxRichTextBox.ClientRectangle; + if (p.X < client.Left || p.Y < client.Top || p.X > client.Width || p.Y > client.Height) + { + this.Visible = false; + return; + } + + Point screen = syntaxRichTextBox.PointToScreen(p); + + //if ((screen.Y + this.Height) > rect.Height) + // screen = RichTextBox.PointToScreen(new Point(p.X - 20 + this.XOffset, p.Y - this.Height)); + + if (screen.Y > rect.Bottom) + { + this.Visible = false; + return; + //screen.Y = rect.Bottom; + } + + if (screen.X > rect.Right) + { + this.Visible = false; + return; + //screen.X = rect.Right; + } + + if (screen.X < rect.Left) + { + this.Visible = false; + return; + //screen.X = rect.Left; + } + + if ((screen.Y) < rect.Top) + { + this.Visible = false; + return; + //screen.Y = rect.Top; + } + + this.Location = screen; + } + + public void SetPosition(SyntaxRichTextBox syntaxRichTextBox, Point p) + { + Rectangle rect = Screen.PrimaryScreen.WorkingArea; + Point screen = syntaxRichTextBox.PointToScreen(new Point(p.X - 20 , p.Y + syntaxRichTextBox.LineHeight)); + if ((screen.Y + this.Height) > rect.Height) + screen = syntaxRichTextBox.PointToScreen(new Point(p.X - 20, p.Y - this.Height)); + + if ((screen.X + this.Width) > rect.Width) + screen.X = rect.Width - this.Width; + + if (screen.X < rect.Left) + screen.X = rect.Left; + + if (screen.Y < rect.Top) + screen.Y = rect.Top; + + this.Location = screen; + } + + private void richLabel1_Resize(object sender, EventArgs e) + { + this.Size = this.richLabel1.Size; + + } + + } +} \ No newline at end of file diff --git a/Editor/TooltipWindow.designer.cs b/Editor/TooltipWindow.designer.cs new file mode 100644 index 0000000..99cc24a --- /dev/null +++ b/Editor/TooltipWindow.designer.cs @@ -0,0 +1,62 @@ +namespace LSLEditor +{ + partial class TooltipWindow + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.richLabel1 = new LSLEditor.RichLabel(); + this.SuspendLayout(); + // + // richLabel1 + // + this.richLabel1.BackColor = System.Drawing.Color.LightGoldenrodYellow; + this.richLabel1.Location = new System.Drawing.Point(0, 0); + this.richLabel1.Name = "richLabel1"; + this.richLabel1.Size = new System.Drawing.Size(52, 20); + this.richLabel1.TabIndex = 0; + this.richLabel1.Resize += new System.EventHandler(this.richLabel1_Resize); + // + // TooltipWindow + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(105, 42); + this.Controls.Add(this.richLabel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "TooltipWindow"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; + this.Text = "GListBoxWindow"; + this.ResumeLayout(false); + + } + + #endregion + + private RichLabel richLabel1; + } +} \ No newline at end of file diff --git a/Editor/TooltipWindow.resx b/Editor/TooltipWindow.resx new file mode 100644 index 0000000..ff31a6d --- /dev/null +++ b/Editor/TooltipWindow.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/FindWindow.Designer.cs b/FindWindow.Designer.cs new file mode 100644 index 0000000..4ad8ad3 --- /dev/null +++ b/FindWindow.Designer.cs @@ -0,0 +1,212 @@ +namespace LSLEditor +{ + partial class FindWindow + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.comboBoxFind = new System.Windows.Forms.ComboBox(); + this.FindNext = new System.Windows.Forms.Button(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.comboBoxReplace = new System.Windows.Forms.ComboBox(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.checkBoxWholeWord = new System.Windows.Forms.CheckBox(); + this.checkBoxReverse = new System.Windows.Forms.CheckBox(); + this.checkBoxMatchCase = new System.Windows.Forms.CheckBox(); + this.Replace = new System.Windows.Forms.Button(); + this.ReplaceAll = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.SuspendLayout(); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.comboBoxFind); + this.groupBox1.Location = new System.Drawing.Point(8, 8); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(240, 48); + this.groupBox1.TabIndex = 1; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Find what:"; + // + // comboBoxFind + // + this.comboBoxFind.FormattingEnabled = true; + this.comboBoxFind.Location = new System.Drawing.Point(16, 16); + this.comboBoxFind.Name = "comboBoxFind"; + this.comboBoxFind.Size = new System.Drawing.Size(208, 21); + this.comboBoxFind.TabIndex = 1; + this.comboBoxFind.KeyDown += new System.Windows.Forms.KeyEventHandler(this.comboBoxFind_KeyDown); + // + // FindNext + // + this.FindNext.Location = new System.Drawing.Point(80, 184); + this.FindNext.Name = "FindNext"; + this.FindNext.Size = new System.Drawing.Size(75, 23); + this.FindNext.TabIndex = 6; + this.FindNext.Text = "Find Next"; + this.FindNext.UseVisualStyleBackColor = true; + this.FindNext.Click += new System.EventHandler(this.FindNext_Click); + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.comboBoxReplace); + this.groupBox2.Location = new System.Drawing.Point(8, 56); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(240, 48); + this.groupBox2.TabIndex = 2; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Replace with:"; + // + // comboBoxReplace + // + this.comboBoxReplace.FormattingEnabled = true; + this.comboBoxReplace.Location = new System.Drawing.Point(16, 16); + this.comboBoxReplace.Name = "comboBoxReplace"; + this.comboBoxReplace.Size = new System.Drawing.Size(208, 21); + this.comboBoxReplace.TabIndex = 2; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.checkBoxWholeWord); + this.groupBox3.Controls.Add(this.checkBoxReverse); + this.groupBox3.Controls.Add(this.checkBoxMatchCase); + this.groupBox3.Location = new System.Drawing.Point(8, 112); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(240, 64); + this.groupBox3.TabIndex = 3; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Find options"; + // + // checkBoxWholeWord + // + this.checkBoxWholeWord.AutoSize = true; + this.checkBoxWholeWord.Location = new System.Drawing.Point(112, 24); + this.checkBoxWholeWord.Name = "checkBoxWholeWord"; + this.checkBoxWholeWord.Size = new System.Drawing.Size(83, 17); + this.checkBoxWholeWord.TabIndex = 4; + this.checkBoxWholeWord.Text = "Whole word"; + this.checkBoxWholeWord.UseVisualStyleBackColor = true; + // + // checkBoxReverse + // + this.checkBoxReverse.AutoSize = true; + this.checkBoxReverse.Location = new System.Drawing.Point(16, 40); + this.checkBoxReverse.Name = "checkBoxReverse"; + this.checkBoxReverse.Size = new System.Drawing.Size(66, 17); + this.checkBoxReverse.TabIndex = 5; + this.checkBoxReverse.Text = "Reverse"; + this.checkBoxReverse.UseVisualStyleBackColor = true; + // + // checkBoxMatchCase + // + this.checkBoxMatchCase.AutoSize = true; + this.checkBoxMatchCase.Location = new System.Drawing.Point(16, 24); + this.checkBoxMatchCase.Name = "checkBoxMatchCase"; + this.checkBoxMatchCase.Size = new System.Drawing.Size(82, 17); + this.checkBoxMatchCase.TabIndex = 3; + this.checkBoxMatchCase.Text = "Match case"; + this.checkBoxMatchCase.UseVisualStyleBackColor = true; + // + // Replace + // + this.Replace.Location = new System.Drawing.Point(168, 184); + this.Replace.Name = "Replace"; + this.Replace.Size = new System.Drawing.Size(75, 23); + this.Replace.TabIndex = 7; + this.Replace.Text = "Replace"; + this.Replace.UseVisualStyleBackColor = true; + this.Replace.Click += new System.EventHandler(this.Replace_Click); + // + // ReplaceAll + // + this.ReplaceAll.Location = new System.Drawing.Point(168, 208); + this.ReplaceAll.Name = "ReplaceAll"; + this.ReplaceAll.Size = new System.Drawing.Size(75, 23); + this.ReplaceAll.TabIndex = 8; + this.ReplaceAll.Text = "Replace All"; + this.ReplaceAll.UseVisualStyleBackColor = true; + this.ReplaceAll.Click += new System.EventHandler(this.ReplaceAll_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(24, 216); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(0, 13); + this.label1.TabIndex = 6; + // + // FindWindow + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(256, 238); + this.Controls.Add(this.label1); + this.Controls.Add(this.ReplaceAll); + this.Controls.Add(this.Replace); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.FindNext); + this.Controls.Add(this.groupBox1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.KeyPreview = true; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "FindWindow"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = " Find"; + this.TopMost = true; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FindWindow_FormClosing); + this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FindWindow_KeyDown); + this.groupBox1.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.ComboBox comboBoxFind; + private System.Windows.Forms.Button FindNext; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.ComboBox comboBoxReplace; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.CheckBox checkBoxMatchCase; + private System.Windows.Forms.Button Replace; + private System.Windows.Forms.Button ReplaceAll; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.CheckBox checkBoxWholeWord; + private System.Windows.Forms.CheckBox checkBoxReverse; + } +} \ No newline at end of file diff --git a/FindWindow.cs b/FindWindow.cs new file mode 100644 index 0000000..18e8ac3 --- /dev/null +++ b/FindWindow.cs @@ -0,0 +1,315 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.Text; // StringBuilder +using System.Text.RegularExpressions; +using System.Windows.Forms; + +namespace LSLEditor +{ + public partial class FindWindow : Form + { + private LSLEditorForm lslEditForm; + private int intStart; + private int intEnd; + + private bool m_ReplaceAlso; + + public FindWindow(LSLEditorForm lslEditForm) + { + InitializeComponent(); + this.lslEditForm = lslEditForm; + this.intStart = 0; + this.intEnd = 0; + } + + public bool ReplaceAlso + { + get + { + return m_ReplaceAlso; + } + set + { + m_ReplaceAlso = value; + this.groupBox2.Enabled = m_ReplaceAlso; + this.Replace.Enabled = m_ReplaceAlso; + this.ReplaceAll.Enabled = m_ReplaceAlso; + + if (m_ReplaceAlso) + this.Text = "Find and Replace"; + else + this.Text = "Find"; + } + } + + public string KeyWord + { + set + { + this.label1.Text = ""; // clear out message + if (value != "") + { + this.comboBoxFind.Text = value; + } + else + { + if (this.comboBoxFind.Items.Count > 0) + this.comboBoxFind.SelectedIndex = this.comboBoxFind.Items.Count - 1; + } + } + } + + private bool UpdateComboBox(ComboBox comboBox) + { + string strText = comboBox.Text; + bool Found = false; + + foreach (string strC in comboBox.Items) + { + if (strC == strText) + { + Found = true; + break; + } + } + + if (!Found) + comboBox.Items.Add(strText); + return Found; + } + + public void Find() + { + this.label1.Text = ""; + EditForm editForm = this.lslEditForm.ActiveMdiForm as EditForm; + if (editForm == null) + return; + + if (!UpdateComboBox(this.comboBoxFind)) + { + editForm.TextBox.SelectionLength = 0; + editForm.TextBox.SelectionStart = 0; + } + + RichTextBoxFinds options = RichTextBoxFinds.None; + + if (this.checkBoxMatchCase.Checked) options |= RichTextBoxFinds.MatchCase; + if (this.checkBoxReverse.Checked) options |= RichTextBoxFinds.Reverse; + if (this.checkBoxWholeWord.Checked) options |= RichTextBoxFinds.WholeWord; + + if (this.checkBoxReverse.Checked) + { + intStart = 0; // start cant change ;-) + intEnd = editForm.TextBox.SelectionStart; + } + else + { + intStart = editForm.TextBox.SelectionStart + editForm.TextBox.SelectionLength; + if (intStart == editForm.TextBox.Text.Length) + intStart = 0; + intEnd = editForm.TextBox.Text.Length - 1; // length can change!! + } + + string strFind = this.comboBoxFind.Text; + int intIndex = editForm.Find(strFind, intStart, intEnd, options); + if (intIndex < 0) + { + this.label1.Text = "Not found..."; + return; + } + } + + private void FindNext_Click(object sender, EventArgs e) + { + Find(); + this.Focus(); + } + + private void comboBoxFind_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Return) + { + if (this.Replace.Enabled) + { + this.comboBoxReplace.Focus(); + e.SuppressKeyPress = true; + } + else + { + Find(); + e.SuppressKeyPress = true; + } + } + } + + private void Replace_Click(object sender, EventArgs e) + { + EditForm editForm = this.lslEditForm.ActiveMdiForm as EditForm; + if (editForm == null) + return; + + UpdateComboBox(this.comboBoxReplace); + + if (editForm.TextBox.SelectionLength > 0) + { + string strReplacement = this.comboBoxReplace.Text; + editForm.TextBox.ReplaceSelectedText(strReplacement); + } + + Find(); + this.Focus(); + } + + // WildCardToRegex not used!! + private string WildCardToRegex(string strWildCard) + { + StringBuilder sb = new StringBuilder(strWildCard.Length + 8); + for (int intI = 0; intI < strWildCard.Length; intI++) + { + char chrC = strWildCard[intI]; + switch (chrC) + { + case '*': + sb.Append(".*"); + break; + case '?': + sb.Append("."); + break; + case '\\': + intI++; + if (intI < strWildCard.Length) + sb.Append(Regex.Escape(strWildCard[intI].ToString())); + break; + default: + sb.Append(Regex.Escape(chrC.ToString())); + break; + } + } + return sb.ToString(); + } + + private void ReplaceAll_Click(object sender, EventArgs e) + { + EditForm editForm = this.lslEditForm.ActiveMdiForm as EditForm; + if (editForm == null) + return; + + UpdateComboBox(this.comboBoxReplace); + + string strPattern; + string strFind = Regex.Escape(this.comboBoxFind.Text); + string strReplacement = this.comboBoxReplace.Text; + string strSourceCode = editForm.SourceCode; + + RegexOptions regexOptions = RegexOptions.Compiled; + if (!this.checkBoxMatchCase.Checked) + regexOptions |= RegexOptions.IgnoreCase; + if (this.checkBoxWholeWord.Checked) + strPattern = @"\b" + strFind + @"\b"; + else + strPattern = strFind; + + Regex regex = new Regex(strPattern, regexOptions); + + int intCount = 0; + foreach(Match m in regex.Matches(strSourceCode)) + { + if (m.Value.Length > 0) + intCount++; + } + if (intCount == 0) + { + MessageBox.Show("No matches found"); + } + else + { + if (MessageBox.Show("There are " + intCount + " occurences, replace them all?", "Find and Replace", MessageBoxButtons.YesNoCancel) == DialogResult.Yes) + editForm.SourceCode = regex.Replace(strSourceCode, strReplacement); + } + this.Focus(); + } + + private void FindWindow_FormClosing(object sender, FormClosingEventArgs e) + { + lslEditForm.TopMost = true; // 15 nove 2007 + this.Visible = false; + e.Cancel = true; + lslEditForm.TopMost = false;// 15 nove 2007 + } + + private void FindWindow_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyData == Keys.Escape) + { + this.Visible = false; + e.SuppressKeyPress = true; + e.Handled = true; + } + + if (e.KeyCode == Keys.Return) + { + Find(); + e.SuppressKeyPress = true; + this.Focus(); + } + + if (e.KeyCode == Keys.F3) + { + Find(); + e.SuppressKeyPress = true; + this.Focus(); + } + + + } + + public void FindFocus() + { + this.comboBoxFind.Focus(); + } + + + } +} \ No newline at end of file diff --git a/FindWindow.resx b/FindWindow.resx new file mode 100644 index 0000000..ff31a6d --- /dev/null +++ b/FindWindow.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Form1.cs b/Form1.cs new file mode 100644 index 0000000..bb942b3 --- /dev/null +++ b/Form1.cs @@ -0,0 +1,1109 @@ +using System; +using System.IO; +using System.Drawing; +using System.Drawing.Imaging; + +using System.Collections; + +using Microsoft.Win32; +using System.Threading; +using System.Reflection; +using System.Globalization; +using System.Windows.Forms; +using System.ComponentModel; +using System.Drawing.Printing; + + +// aximp is oude informatie, maar ik laat het er even instaan +// aximp %WINDIR%\System32\shdocvw.dll /out:"d:\temp\AxInterop.SHDocVw.dll" /keyfile:"D:\Documents and Settings\Administrator\Mijn documenten\Mijn keys\Test.snk" +// copieer de TWEE files AxInterop.SHDocVw.dll en SHDocVw.dll in de bin/Debug directory +// referentie maken naar die twee files + +// +// Pre build command for using a LSLEditor.rc file containing: About.htm HTML "Resource/About.htm" +// +// "$(DevEnvDir)..\..\SDK\v2.0\bin\rc.exe" /r "$(ProjectDir)$(TargetName).rc" +// +// Project properties Application, resource file + +namespace LSLEditor +{ + /// + /// Summary description for Form1. + /// + public class Form1 : System.Windows.Forms.Form + { + private System.Windows.Forms.OpenFileDialog openFileDialog1; + private System.Windows.Forms.SaveFileDialog saveFileDialog1; + private System.Windows.Forms.Panel panel1; + private System.ComponentModel.IContainer components = null; + private Compiler compiler; + private bool FullDebug; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.ContextMenu contextMenu1; + + private System.Windows.Forms.MainMenu mainMenu1; + private System.Windows.Forms.MenuItem menuItem1; + private System.Windows.Forms.MenuItem menuItem2; + private System.Windows.Forms.MenuItem menuItem3; + private System.Windows.Forms.MenuItem menuItem4; + private System.Windows.Forms.MenuItem menuItem5; + private System.Windows.Forms.MenuItem menuItem6; + private System.Windows.Forms.MenuItem menuItem7; + private System.Windows.Forms.MenuItem menuItem8; + private System.Windows.Forms.MenuItem menuItem9; + private System.Windows.Forms.MenuItem menuItem10; + private System.Windows.Forms.MenuItem menuItem11; + private System.Windows.Forms.MenuItem menuItem12; + private System.Windows.Forms.MenuItem menuItem13; + private System.Windows.Forms.MenuItem menuItem14; + private System.Windows.Forms.MenuItem menuItem15; + private System.Windows.Forms.MenuItem menuItem16; + private System.Windows.Forms.MenuItem menuItem17; + private System.Windows.Forms.MenuItem menuItem18; + private System.Windows.Forms.MenuItem menuItem19; + private System.Windows.Forms.MenuItem menuItem20; + private System.Windows.Forms.MenuItem menuItem21; + private System.Windows.Forms.MenuItem menuItem22; + private System.Windows.Forms.MenuItem menuItem23; + private System.Windows.Forms.MenuItem menuItem24; + private System.Windows.Forms.MenuItem menuItem25; + private System.Windows.Forms.MenuItem menuItem26; + private System.Windows.Forms.MenuItem menuItem27; + private System.Windows.Forms.MenuItem menuItem28; + private System.Windows.Forms.MenuItem menuItem29; + private System.Windows.Forms.MenuItem menuItem30; + private System.Windows.Forms.MenuItem menuItem31; + private System.Windows.Forms.MenuItem menuItem32; + private System.Windows.Forms.PageSetupDialog pageSetupDialog1; + private System.Windows.Forms.PrintDialog printDialog1; + private System.Windows.Forms.MenuItem menuItem34; + private System.Windows.Forms.MenuItem menuItem35; + private System.Windows.Forms.MenuItem menuItem36; + private TabPage tabPage1; + private NumberedTextBox.NumberedTextBoxUC numberedTextBoxUC1; + private MenuItem menuItem37; + private MenuItem menuItem38; + private MenuItem menuItem39; + private MenuItem menuItem41; + private MenuItem menuItem40; + private MenuItem menuItem42; + private MenuItem menuItemUploadScript; + private StatusStrip statusStrip1; + private ToolStripStatusLabel toolStripStatusLabel1; + private System.Windows.Forms.MenuItem menuItem33; + + public Form1(string[] args) + { + // + // Required for Windows Form Designer support + // + InitializeComponent(); + + Start(args); + } + + + + /// + /// Clean up any resources being used. + /// + protected override void Dispose(bool disposing) + { + if (disposing) + { + if (components != null) + { + components.Dispose(); + } + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); + this.mainMenu1 = new System.Windows.Forms.MainMenu(this.components); + this.menuItem1 = new System.Windows.Forms.MenuItem(); + this.menuItem11 = new System.Windows.Forms.MenuItem(); + this.menuItem4 = new System.Windows.Forms.MenuItem(); + this.menuItem41 = new System.Windows.Forms.MenuItem(); + this.menuItem40 = new System.Windows.Forms.MenuItem(); + this.menuItem42 = new System.Windows.Forms.MenuItem(); + this.menuItemUploadScript = new System.Windows.Forms.MenuItem(); + this.menuItem15 = new System.Windows.Forms.MenuItem(); + this.menuItem13 = new System.Windows.Forms.MenuItem(); + this.menuItem5 = new System.Windows.Forms.MenuItem(); + this.menuItem7 = new System.Windows.Forms.MenuItem(); + this.menuItem35 = new System.Windows.Forms.MenuItem(); + this.menuItem34 = new System.Windows.Forms.MenuItem(); + this.menuItem36 = new System.Windows.Forms.MenuItem(); + this.menuItem31 = new System.Windows.Forms.MenuItem(); + this.menuItem32 = new System.Windows.Forms.MenuItem(); + this.menuItem6 = new System.Windows.Forms.MenuItem(); + this.menuItem8 = new System.Windows.Forms.MenuItem(); + this.menuItem24 = new System.Windows.Forms.MenuItem(); + this.menuItem23 = new System.Windows.Forms.MenuItem(); + this.menuItem25 = new System.Windows.Forms.MenuItem(); + this.menuItem22 = new System.Windows.Forms.MenuItem(); + this.menuItem21 = new System.Windows.Forms.MenuItem(); + this.menuItem20 = new System.Windows.Forms.MenuItem(); + this.menuItem26 = new System.Windows.Forms.MenuItem(); + this.menuItem28 = new System.Windows.Forms.MenuItem(); + this.menuItem27 = new System.Windows.Forms.MenuItem(); + this.menuItem37 = new System.Windows.Forms.MenuItem(); + this.menuItem38 = new System.Windows.Forms.MenuItem(); + this.menuItem39 = new System.Windows.Forms.MenuItem(); + this.menuItem9 = new System.Windows.Forms.MenuItem(); + this.menuItem12 = new System.Windows.Forms.MenuItem(); + this.menuItem14 = new System.Windows.Forms.MenuItem(); + this.menuItem33 = new System.Windows.Forms.MenuItem(); + this.menuItem29 = new System.Windows.Forms.MenuItem(); + this.menuItem30 = new System.Windows.Forms.MenuItem(); + this.menuItem2 = new System.Windows.Forms.MenuItem(); + this.menuItem16 = new System.Windows.Forms.MenuItem(); + this.menuItem17 = new System.Windows.Forms.MenuItem(); + this.menuItem18 = new System.Windows.Forms.MenuItem(); + this.menuItem19 = new System.Windows.Forms.MenuItem(); + this.menuItem3 = new System.Windows.Forms.MenuItem(); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); + this.panel1 = new System.Windows.Forms.Panel(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.statusStrip1 = new System.Windows.Forms.StatusStrip(); + this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); + this.contextMenu1 = new System.Windows.Forms.ContextMenu(); + this.menuItem10 = new System.Windows.Forms.MenuItem(); + this.pageSetupDialog1 = new System.Windows.Forms.PageSetupDialog(); + this.printDialog1 = new System.Windows.Forms.PrintDialog(); + this.numberedTextBoxUC1 = new NumberedTextBox.NumberedTextBoxUC(); + this.panel1.SuspendLayout(); + this.tabControl1.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.statusStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // mainMenu1 + // + this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { + this.menuItem1, + this.menuItem8, + this.menuItem12, + this.menuItem2}); + // + // menuItem1 + // + this.menuItem1.Index = 0; + this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { + this.menuItem11, + this.menuItem4, + this.menuItem41, + this.menuItem40, + this.menuItem42, + this.menuItemUploadScript, + this.menuItem15, + this.menuItem13, + this.menuItem5, + this.menuItem7, + this.menuItem35, + this.menuItem34, + this.menuItem36, + this.menuItem31, + this.menuItem32, + this.menuItem6}); + this.menuItem1.Text = "File"; + // + // menuItem11 + // + this.menuItem11.Index = 0; + this.menuItem11.Text = "New"; + this.menuItem11.Click += new System.EventHandler(this.menuItem11_Click); + // + // menuItem4 + // + this.menuItem4.Index = 1; + this.menuItem4.Text = "Open..."; + this.menuItem4.Click += new System.EventHandler(this.menuItem4_Click); + // + // menuItem41 + // + this.menuItem41.Index = 2; + this.menuItem41.Text = "-"; + // + // menuItem40 + // + this.menuItem40.Index = 3; + this.menuItem40.Text = "Import Example..."; + this.menuItem40.Click += new System.EventHandler(this.menuItem40_Click); + // + // menuItem42 + // + this.menuItem42.Index = 4; + this.menuItem42.Text = "-"; + // + // menuItemUploadScript + // + this.menuItemUploadScript.Enabled = false; + this.menuItemUploadScript.Index = 5; + this.menuItemUploadScript.Text = "Upload Your LSL script..."; + this.menuItemUploadScript.Click += new System.EventHandler(this.menuItemUploadScript_Click); + // + // menuItem15 + // + this.menuItem15.Index = 6; + this.menuItem15.Text = "-"; + // + // menuItem13 + // + this.menuItem13.Index = 7; + this.menuItem13.Shortcut = System.Windows.Forms.Shortcut.CtrlS; + this.menuItem13.Text = "Save"; + this.menuItem13.Click += new System.EventHandler(this.menuItem13_Click); + // + // menuItem5 + // + this.menuItem5.Index = 8; + this.menuItem5.Text = "Save..."; + this.menuItem5.Click += new System.EventHandler(this.menuItem5_Click); + // + // menuItem7 + // + this.menuItem7.Index = 9; + this.menuItem7.Text = "-"; + // + // menuItem35 + // + this.menuItem35.Index = 10; + this.menuItem35.Text = "Page Setup..."; + this.menuItem35.Click += new System.EventHandler(this.menuItem35_Click); + // + // menuItem34 + // + this.menuItem34.Index = 11; + this.menuItem34.Shortcut = System.Windows.Forms.Shortcut.CtrlP; + this.menuItem34.Text = "Print"; + this.menuItem34.Click += new System.EventHandler(this.menuItem34_Click); + // + // menuItem36 + // + this.menuItem36.Index = 12; + this.menuItem36.Text = "-"; + // + // menuItem31 + // + this.menuItem31.Index = 13; + this.menuItem31.Text = "Copy to clipboard"; + this.menuItem31.Click += new System.EventHandler(this.menuItem31_Click); + // + // menuItem32 + // + this.menuItem32.Index = 14; + this.menuItem32.Text = "-"; + // + // menuItem6 + // + this.menuItem6.Index = 15; + this.menuItem6.Text = "Exit"; + this.menuItem6.Click += new System.EventHandler(this.menuItem6_Click); + // + // menuItem8 + // + this.menuItem8.Index = 1; + this.menuItem8.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { + this.menuItem24, + this.menuItem23, + this.menuItem25, + this.menuItem22, + this.menuItem21, + this.menuItem20, + this.menuItem26, + this.menuItem28, + this.menuItem27, + this.menuItem37, + this.menuItem9}); + this.menuItem8.Text = "Edit"; + // + // menuItem24 + // + this.menuItem24.Index = 0; + this.menuItem24.Shortcut = System.Windows.Forms.Shortcut.CtrlZ; + this.menuItem24.Text = "Undo"; + this.menuItem24.Click += new System.EventHandler(this.menuItem24_Click); + // + // menuItem23 + // + this.menuItem23.Enabled = false; + this.menuItem23.Index = 1; + this.menuItem23.Shortcut = System.Windows.Forms.Shortcut.CtrlY; + this.menuItem23.Text = "Redo"; + this.menuItem23.Click += new System.EventHandler(this.menuItem23_Click); + // + // menuItem25 + // + this.menuItem25.Index = 2; + this.menuItem25.Text = "-"; + // + // menuItem22 + // + this.menuItem22.Index = 3; + this.menuItem22.Shortcut = System.Windows.Forms.Shortcut.CtrlX; + this.menuItem22.Text = "Cut"; + this.menuItem22.Click += new System.EventHandler(this.menuItem22_Click); + // + // menuItem21 + // + this.menuItem21.Index = 4; + this.menuItem21.Shortcut = System.Windows.Forms.Shortcut.CtrlC; + this.menuItem21.Text = "Copy"; + this.menuItem21.Click += new System.EventHandler(this.menuItem21_Click); + // + // menuItem20 + // + this.menuItem20.Index = 5; + this.menuItem20.Shortcut = System.Windows.Forms.Shortcut.CtrlV; + this.menuItem20.Text = "Paste"; + this.menuItem20.Click += new System.EventHandler(this.menuItem20_Click); + // + // menuItem26 + // + this.menuItem26.Index = 6; + this.menuItem26.Shortcut = System.Windows.Forms.Shortcut.Del; + this.menuItem26.Text = "Delete"; + this.menuItem26.Click += new System.EventHandler(this.menuItem26_Click); + // + // menuItem28 + // + this.menuItem28.Index = 7; + this.menuItem28.Shortcut = System.Windows.Forms.Shortcut.CtrlA; + this.menuItem28.Text = "Select All"; + this.menuItem28.Click += new System.EventHandler(this.menuItem28_Click); + // + // menuItem27 + // + this.menuItem27.Index = 8; + this.menuItem27.Text = "-"; + // + // menuItem37 + // + this.menuItem37.Index = 9; + this.menuItem37.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { + this.menuItem38, + this.menuItem39}); + this.menuItem37.Text = "Advanced"; + // + // menuItem38 + // + this.menuItem38.Index = 0; + this.menuItem38.Text = "Format Document"; + this.menuItem38.Click += new System.EventHandler(this.menuItem38_Click); + // + // menuItem39 + // + this.menuItem39.Enabled = false; + this.menuItem39.Index = 1; + this.menuItem39.Text = "Format Selection"; + this.menuItem39.Click += new System.EventHandler(this.menuItem39_Click); + // + // menuItem9 + // + this.menuItem9.Enabled = false; + this.menuItem9.Index = 10; + this.menuItem9.Text = "Word wrap"; + this.menuItem9.Click += new System.EventHandler(this.menuItem9_Click); + // + // menuItem12 + // + this.menuItem12.Index = 2; + this.menuItem12.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { + this.menuItem14, + this.menuItem33, + this.menuItem29, + this.menuItem30}); + this.menuItem12.Text = "Compiler"; + // + // menuItem14 + // + this.menuItem14.Index = 0; + this.menuItem14.Shortcut = System.Windows.Forms.Shortcut.F5; + this.menuItem14.Text = "Start"; + this.menuItem14.Click += new System.EventHandler(this.menuItem14_Click); + // + // menuItem33 + // + this.menuItem33.Index = 1; + this.menuItem33.Text = "Compiler Window"; + this.menuItem33.Click += new System.EventHandler(this.menuItem33_Click); + // + // menuItem29 + // + this.menuItem29.Index = 2; + this.menuItem29.Text = "-"; + // + // menuItem30 + // + this.menuItem30.Index = 3; + this.menuItem30.Text = "Properties..."; + this.menuItem30.Click += new System.EventHandler(this.menuItem30_Click); + // + // menuItem2 + // + this.menuItem2.Index = 3; + this.menuItem2.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { + this.menuItem16, + this.menuItem17, + this.menuItem18, + this.menuItem19, + this.menuItem3}); + this.menuItem2.Text = "Help"; + // + // menuItem16 + // + this.menuItem16.Index = 0; + this.menuItem16.Shortcut = System.Windows.Forms.Shortcut.F1; + this.menuItem16.Text = "Index..."; + this.menuItem16.Click += new System.EventHandler(this.menuItem16_Click); + // + // menuItem17 + // + this.menuItem17.Index = 1; + this.menuItem17.Text = "-"; + // + // menuItem18 + // + this.menuItem18.Index = 2; + this.menuItem18.Text = "Check for Updates"; + this.menuItem18.Click += new System.EventHandler(this.menuItem18_Click); + // + // menuItem19 + // + this.menuItem19.Index = 3; + this.menuItem19.Text = "-"; + // + // menuItem3 + // + this.menuItem3.Index = 4; + this.menuItem3.Text = "About..."; + this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click); + // + // panel1 + // + this.panel1.Controls.Add(this.tabControl1); + this.panel1.Controls.Add(this.statusStrip1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(592, 353); + this.panel1.TabIndex = 2; + // + // tabControl1 + // + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl1.Location = new System.Drawing.Point(0, 0); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(592, 331); + this.tabControl1.TabIndex = 1; + this.tabControl1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.tabControl1_MouseDown); + // + // tabPage1 + // + this.tabPage1.BackColor = System.Drawing.Color.Transparent; + this.tabPage1.Controls.Add(this.numberedTextBoxUC1); + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(584, 305); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "New"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // statusStrip1 + // + this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripStatusLabel1}); + this.statusStrip1.Location = new System.Drawing.Point(0, 331); + this.statusStrip1.Name = "statusStrip1"; + this.statusStrip1.Size = new System.Drawing.Size(592, 22); + this.statusStrip1.TabIndex = 2; + this.statusStrip1.Text = "statusStrip1"; + // + // toolStripStatusLabel1 + // + this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; + this.toolStripStatusLabel1.Size = new System.Drawing.Size(19, 17); + this.toolStripStatusLabel1.Text = "..."; + // + // contextMenu1 + // + this.contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { + this.menuItem10}); + // + // menuItem10 + // + this.menuItem10.Index = 0; + this.menuItem10.Text = "Close"; + this.menuItem10.Click += new System.EventHandler(this.menuItem10_Click); + // + // numberedTextBoxUC1 + // + this.numberedTextBoxUC1.BackColor = System.Drawing.SystemColors.Control; + this.numberedTextBoxUC1.Dock = System.Windows.Forms.DockStyle.Fill; + this.numberedTextBoxUC1.Location = new System.Drawing.Point(3, 3); + this.numberedTextBoxUC1.Name = "numberedTextBoxUC1"; + this.numberedTextBoxUC1.Size = new System.Drawing.Size(578, 299); + this.numberedTextBoxUC1.TabIndex = 1; + // + // Form1 + // + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); + this.ClientSize = new System.Drawing.Size(592, 353); + this.Controls.Add(this.panel1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.IsMdiContainer = true; + this.Menu = this.mainMenu1; + this.Name = "Form1"; + this.Text = "LSL-Editor"; + this.Closing += new System.ComponentModel.CancelEventHandler(this.Form1_Closing); + this.Load += new System.EventHandler(this.Form1_Load); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.tabControl1.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.statusStrip1.ResumeLayout(false); + this.statusStrip1.PerformLayout(); + this.ResumeLayout(false); + + } + #endregion + + private void Start(string[] args) + { + this.FullDebug = true; + + Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", false); + Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US", false); + + string strVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + this.Text += " " + strVersion; + + // load the keywords and colors, give handle to codecompletion listBox + this.numberedTextBoxUC1.TextBox.Init("ConfLSL.xml"); + + if (args.Length == 0) + { + this.numberedTextBoxUC1.TextBox.GetExampleFile(); + this.saveFileDialog1.FileName = "new.lsl"; + this.menuItem13.Text = "Save new.lsl"; + this.menuItem13.Enabled = false; + } + else + { + this.numberedTextBoxUC1.TextBox.LoadFile(args[0]); + this.tabControl1.TabPages[0].Text = Path.GetFileName(args[0]); + this.menuItem13.Text = "Save " + Path.GetFileName(args[0]); + this.menuItem13.Enabled = true; + this.saveFileDialog1.FileName = args[0]; + } + this.numberedTextBoxUC1.TextBox.ToolTipping = true; + this.numberedTextBoxUC1.TextBox.isDirty = false; + } + + // close application + private void menuItem6_Click(object sender, System.EventArgs e) + { + this.Close(); + } + + // reading file + private void menuItem4_Click(object sender, System.EventArgs e) + { + if (this.numberedTextBoxUC1.TextBox.isDirty) + { + DialogResult dialogResult = MessageBox.Show(this, @"Save """ + this.tabControl1.TabPages[0].Text + @"""?", "cap", MessageBoxButtons.YesNoCancel); + if (dialogResult == DialogResult.Yes) + dialogResult = SaveCurrentFile(); + if (dialogResult == DialogResult.Cancel) + return; + } + this.openFileDialog1.Filter = "Secondlife script files (*.lsl)|*.lsl|All files (*.*)|*.*"; + if (this.openFileDialog1.ShowDialog() == DialogResult.OK) + { + if (File.Exists(this.openFileDialog1.FileName)) + { + this.numberedTextBoxUC1.TextBox.LoadFile(this.openFileDialog1.FileName); + this.numberedTextBoxUC1.TextBox.isDirty = false; + this.saveFileDialog1.FileName = this.openFileDialog1.FileName; + this.tabControl1.TabPages[0].Text = Path.GetFileName(this.openFileDialog1.FileName); + + this.menuItem13.Text = "Save " + Path.GetFileName(this.openFileDialog1.FileName); + this.menuItem13.Enabled = true; + this.saveFileDialog1.FileName = this.openFileDialog1.FileName; + } + } + } + + // save current file + private DialogResult SaveCurrentFile() + { + this.saveFileDialog1.Filter = "Secondlife script files (*.lsl)|*.lsl|All files (*.*)|*.*"; + DialogResult dialogresult = this.saveFileDialog1.ShowDialog(); + if (dialogresult == DialogResult.OK) + { + this.numberedTextBoxUC1.TextBox.SaveFile(this.saveFileDialog1.FileName, RichTextBoxStreamType.PlainText); + this.tabControl1.TabPages[0].Text = Path.GetFileName(this.saveFileDialog1.FileName); + this.menuItem13.Text = "Save " + Path.GetFileName(this.saveFileDialog1.FileName); + this.menuItem13.Enabled = true; + this.numberedTextBoxUC1.TextBox.isDirty = false; + } + return dialogresult; + } + + private void menuItem5_Click(object sender, System.EventArgs e) + { + SaveCurrentFile(); + } + + // about + private void menuItem3_Click(object sender, System.EventArgs e) + { + //About about = new About(this); + //about.ShowDialog(this); + } + + // toggle word wrap + private void menuItem9_Click(object sender, System.EventArgs e) + { + this.menuItem9.Checked = !this.menuItem9.Checked; + this.numberedTextBoxUC1.TextBox.WordWrap = (this.menuItem9.Checked); + } + + private void StartCompiler() + { + compiler = new Compiler(this.FullDebug, "ConfLSL.xml", this.numberedTextBoxUC1.TextBox.Text); + if (compiler.CompilerErrors != null) + { + MessageBox.Show(compiler.CompilerErrors, "compiler errors"); + return; + } + + if (this.menuItem33.Checked) + { + compiler.ShowDialog(this); + } + else + { + TabPage tabPage = null; + for (int intI = 0; intI < this.tabControl1.TabPages.Count; intI++) + { + if (this.tabControl1.TabPages[intI].Text == "Compiler") + { + tabPage = this.tabControl1.TabPages[intI]; + tabPage.Controls.Clear(); + this.tabControl1.SelectedIndex = intI; + break; + } + } + if (tabPage == null) + { + tabPage = new TabPage("Compiler"); + this.tabControl1.TabPages.Add(tabPage); + this.tabControl1.SelectedIndex = this.tabControl1.TabCount - 1; + } + tabPage.Controls.Add(compiler.Controls[0]); + } + } + + // compiler + private void menuItem14_Click(object sender, System.EventArgs e) + { + StartCompiler(); + } + + // Empty current script + private void menuItem11_Click(object sender, System.EventArgs e) + { + this.tabControl1.TabPages[0].Text = "New"; + this.saveFileDialog1.FileName = "new.lsl"; + this.menuItem13.Text = "Save new.lsl"; + this.menuItem13.Enabled = false; + this.numberedTextBoxUC1.TextBox.Clear(); + this.numberedTextBoxUC1.TextBox.SelectionStart = 0; + this.numberedTextBoxUC1.TextBox.SelectionLength = 0; + this.numberedTextBoxUC1.TextBox.SelectionColor = Color.Black; + this.numberedTextBoxUC1.TextBox.isDirty = false; + } + + private void Form1_Load(object sender, System.EventArgs e) + { + try + { + RegistryKey regKey = Registry.CurrentUser.OpenSubKey(@"software\hwh\lsleditor"); + if (regKey != null) + { + this.Width = (int)regKey.GetValue("Width"); + this.Height = (int)regKey.GetValue("Height"); + this.Left = (int)regKey.GetValue("Left"); + this.Top = (int)regKey.GetValue("Top"); + this.numberedTextBoxUC1.TextBox.WordWrap = (regKey.GetValue("WordWrap").ToString() == "True"); + this.menuItem9.Checked = this.numberedTextBoxUC1.TextBox.WordWrap; + this.menuItem33.Checked = (regKey.GetValue("CompilerInWindow").ToString() == "True"); + regKey.GetValue("Unknown").ToString(); + this.FullDebug = true; + this.menuItemUploadScript.Enabled = true; + } + } + catch + { + } + //this.Activate(); + } + + private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e) + { + RegistryKey regKey = Registry.CurrentUser.CreateSubKey(@"software\hwh\lsleditor"); + if (regKey != null) + { + regKey.SetValue("Width", this.Width); + regKey.SetValue("Height", this.Height); + regKey.SetValue("Top", this.Top); + regKey.SetValue("Left", this.Left); + regKey.SetValue("WordWrap", this.numberedTextBoxUC1.TextBox.WordWrap); + regKey.SetValue("CompilerInWindow", this.menuItem33.Checked); + regKey.Flush(); + regKey.Close(); + } + if (this.numberedTextBoxUC1.TextBox.isDirty) + { + DialogResult dialogResult = MessageBox.Show(this, @"Save """ + this.tabControl1.TabPages[0].Text + @"""?", "cap", MessageBoxButtons.YesNoCancel); + if (dialogResult == DialogResult.Yes) + dialogResult = SaveCurrentFile(); + e.Cancel = (dialogResult == DialogResult.Cancel); + } + } + + // F1 + private void ShowHelp() + { + string strKeyWord = this.numberedTextBoxUC1.TextBox.GetCurrentKeyWord(false); + + string strUrl = this.numberedTextBoxUC1.TextBox.HelpUrl + "wakka.php?wakka=" + strKeyWord; + + if (strKeyWord == "") + strKeyWord = "Help"; + + ShowWebBrowser(strKeyWord, strUrl); + } + + // show context menu for tab headers + private void tabControl1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) + { + if (e.Button == MouseButtons.Right) + { + for (int intI = 1; intI < tabControl1.TabCount; intI++) + { + Rectangle rt = tabControl1.GetTabRect(intI); + if (e.X > rt.Left && e.X < rt.Right + && e.Y > rt.Top && e.Y < rt.Bottom) + { + this.contextMenu1.Show(this.tabControl1, new Point(e.X, e.Y)); + } + } + } + } + + // close tab + private void menuItem10_Click(object sender, System.EventArgs e) + { + if (this.tabControl1.SelectedIndex > 0) + this.tabControl1.TabPages.RemoveAt(this.tabControl1.SelectedIndex); + } + + private void menuItem13_Click(object sender, System.EventArgs e) + { + // save as current file + this.numberedTextBoxUC1.TextBox.SaveFile(this.saveFileDialog1.FileName, RichTextBoxStreamType.PlainText); + this.numberedTextBoxUC1.TextBox.isDirty = false; + } + + private void menuItem16_Click(object sender, System.EventArgs e) + { + ShowHelp(); + } + + private void menuItem18_Click(object sender, System.EventArgs e) + { + ShowWebBrowser("Check for Updates", this.numberedTextBoxUC1.TextBox.UpdateUrl); + } + + private void menuItem22_Click(object sender, System.EventArgs e) + { + this.numberedTextBoxUC1.TextBox.Cut(); + } + + private void menuItem21_Click(object sender, System.EventArgs e) + { + this.numberedTextBoxUC1.TextBox.Copy(); + } + + private void menuItem20_Click(object sender, System.EventArgs e) + { + this.numberedTextBoxUC1.TextBox.Paste(); + } + + private void menuItem26_Click(object sender, System.EventArgs e) + { + if (this.numberedTextBoxUC1.TextBox.SelectedText == "") + this.numberedTextBoxUC1.TextBox.SelectionLength = 1; + this.numberedTextBoxUC1.TextBox.SelectedText = ""; + } + + private void menuItem28_Click(object sender, System.EventArgs e) + { + this.numberedTextBoxUC1.TextBox.SelectAll(); + } + + private void menuItem24_Click(object sender, System.EventArgs e) + { + this.numberedTextBoxUC1.TextBox.UndoPlus(); + } + + private void menuItem23_Click(object sender, System.EventArgs e) + { + this.numberedTextBoxUC1.TextBox.Redo(); + } + + private void menuItem30_Click(object sender, System.EventArgs e) + { + SimProperties props = new SimProperties(); + props.Icon = this.Icon; + props.ShowDialog(this); + } + + private void menuItem31_Click(object sender, System.EventArgs e) + { + this.numberedTextBoxUC1.TextBox.ToClipBoard(); + } + + private void menuItem33_Click(object sender, System.EventArgs e) + { + this.menuItem33.Checked = !this.menuItem33.Checked; + } + + private void menuItem35_Click(object sender, System.EventArgs e) + { + PrintDocument docPrn = new PrintDocument(); + docPrn.DocumentName = this.saveFileDialog1.FileName; + this.pageSetupDialog1.Document = docPrn; + this.pageSetupDialog1.ShowDialog(); + } + + private void menuItem34_Click(object sender, System.EventArgs e) + { + this.printDialog1.AllowPrintToFile = true; + PrintDocument docPrn = new PrintDocument(); + docPrn.DocumentName = this.saveFileDialog1.FileName; + this.printDialog1.Document = docPrn; + if (this.printDialog1.ShowDialog() == DialogResult.OK) + { + try + { + docPrn.PrintPage += new PrintPageEventHandler(printDoc_PrintPage); + docPrn.Print(); + } + catch + { + MessageBox.Show("Error While Printing", "Print Error"); + } + } + } + + private void printDoc_PrintPage(Object sender, PrintPageEventArgs e) + { + this.numberedTextBoxUC1.TextBox.Print(0, this.numberedTextBoxUC1.TextBox.Text.Length, e); + } + + private void menuItem38_Click(object sender, EventArgs e) + { + // Format Document + AutoFormatter autoFormatter = new AutoFormatter(); + this.numberedTextBoxUC1.TextBox.Text = + autoFormatter.ApplyFormatting(this.numberedTextBoxUC1.TextBox.Text); + } + + private void menuItem39_Click(object sender, EventArgs e) + { + // Format Selection + AutoFormatter autoFormatter = new AutoFormatter(); + this.numberedTextBoxUC1.TextBox.SelectedText = + autoFormatter.ApplyFormatting(this.numberedTextBoxUC1.TextBox.SelectedText); + } + + private void menuItem40_Click(object sender, EventArgs e) + { + ShowWebBrowser("Import Examples", this.numberedTextBoxUC1.TextBox.ExamplesUrl); + } + + private void ShowWebBrowser(string strTabName, string strUrl) + { + TabPage tabPage = new TabPage(strTabName); + + WebBrowser axWebBrowser1 = new WebBrowser(); + tabPage.Controls.Add(axWebBrowser1); + this.tabControl1.TabPages.Add(tabPage); + this.tabControl1.SelectedIndex = this.tabControl1.TabCount - 1; + + axWebBrowser1.Dock = DockStyle.Fill; + axWebBrowser1.StatusTextChanged += new EventHandler(axWebBrowser1_StatusTextChanged); + axWebBrowser1.Navigating += new WebBrowserNavigatingEventHandler(axWebBrowser1_Navigating); + axWebBrowser1.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(axWebBrowser1_DocumentCompleted); + axWebBrowser1.Navigate(strUrl); + } + + void axWebBrowser1_StatusTextChanged(object sender, EventArgs e) + { + WebBrowser axWebBrowser1 = sender as WebBrowser; + this.toolStripStatusLabel1.Text = axWebBrowser1.StatusText; + } + + + void axWebBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e) + { + string strUrl = e.Url.ToString(); + if (strUrl.EndsWith(".lsl")) + { + e.Cancel = true; + if (MessageBox.Show("Import LSL script?", "Import script", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + return; + + WebBrowser axWebBrowser1 = sender as WebBrowser; + axWebBrowser1.Stop(); + + // download the url + this.numberedTextBoxUC1.TextBox.LoadFile(strUrl); + this.numberedTextBoxUC1.TextBox.isDirty = true; + + // Delete webbrowser? + // axWebBrowser1.Dispose(); + // this.tabControl1.TabPages.RemoveAt(this.tabControl1.TabCount - 1); + + int intI = strUrl.LastIndexOf("/"); + if (intI > 0) + { + string strName = strUrl.Substring(intI + 1); + this.tabControl1.TabPages[0].Text = strName; + this.menuItem13.Text = "Save " + strName; + this.menuItem13.Enabled = false; + this.saveFileDialog1.FileName = strName; + } + + this.tabControl1.SelectedIndex = 0; + } + } + + void axWebBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) + { + WebBrowser axWebBrowser1 = sender as WebBrowser; + if (e.Url.ToString() == this.numberedTextBoxUC1.TextBox.UploadUrl) + { + HtmlElement element = axWebBrowser1.Document.GetElementById("SourceCode"); + if (element != null) + { + //if(element.InnerText.Trim()=="") + element.InnerText = this.numberedTextBoxUC1.TextBox.Text; + + // Makepictures + Size oldSize = this.Size; + this.Size = new Size(640, 480); + + Bitmap bitmap; + ImageManipulation.GetBitmapFromControl helper = new ImageManipulation.GetBitmapFromControl(); + + this.tabControl1.SelectedIndex = 0; + bitmap = helper.GetOctreeQuantizedBitmap(this, false); + bitmap.Save(@"d:\temp\test1.gif", ImageFormat.Gif); + + element = axWebBrowser1.Document.GetElementById("File1"); + if (element != null) + { + element.SetAttribute("value", @"d:\temp\test1.gif"); + element.OuterHtml = @""; + } + + if (this.tabControl1.TabPages[1].Text.Contains("Compiler")) + { + this.tabControl1.SelectedIndex = 1; + bitmap = helper.GetOctreeQuantizedBitmap(this, false); + bitmap.Save(@"d:\temp\test2.gif", ImageFormat.Gif); + + element = axWebBrowser1.Document.GetElementById("File2"); + if (element != null) + element.SetAttribute("value", @"d:\temp\test2.gif"); + } + + this.tabControl1.SelectedIndex = this.tabControl1.TabPages.Count - 1; + this.Size = oldSize; + } + } + } + + private void UploadScript() + { + //ShowWebBrowser("Upload", this.numberedTextBoxUC1.TextBox.UploadUrl); + + ArrayList pictures = new ArrayList(); + Size oldSize = this.Size; + int intSelectedTab = this.tabControl1.SelectedIndex; + this.Size = new Size(640, 480); + + Bitmap bitmap; + ImageManipulation.GetBitmapFromControl helper = new ImageManipulation.GetBitmapFromControl(); + + this.tabControl1.SelectedIndex = 0; + bitmap = helper.GetOctreeQuantizedBitmap(this, false); + string strTempFileName = Path.GetTempFileName() + ".gif"; + bitmap.Save(strTempFileName, ImageFormat.Gif); + pictures.Add(strTempFileName); + + for (int intI = 1; intI < this.tabControl1.TabPages.Count; intI++) + { + if (this.tabControl1.TabPages[intI].Text.Contains("Compiler")) + { + this.tabControl1.SelectedIndex = intI; + bitmap = helper.GetOctreeQuantizedBitmap(this, false); + strTempFileName = Path.GetTempFileName() + ".gif"; + bitmap.Save(strTempFileName, ImageFormat.Gif); + pictures.Add(strTempFileName); + break; + } + } + this.tabControl1.SelectedIndex = intSelectedTab; + this.Size = oldSize; + + UploadExamle u = new UploadExamle( + Path.GetFileName(this.saveFileDialog1.FileName), + this.numberedTextBoxUC1.TextBox.UploadUrl, + this.numberedTextBoxUC1.TextBox.Text, + pictures); + u.ShowDialog(this); + + // cleanup + foreach (string strFileName in pictures) + { + File.Delete(strFileName); + } + } + + private void menuItemUploadScript_Click(object sender, EventArgs e) + { + UploadScript(); + } + } +} diff --git a/Form1.resx b/Form1.resx new file mode 100644 index 0000000..23f3132 --- /dev/null +++ b/Form1.resx @@ -0,0 +1,348 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 126, 17 + + + 256, 17 + + + 17, 54 + + + 384, 17 + + + 506, 17 + + + 648, 17 + + + 42 + + + + + AAABAAcAEBAQAAAAAAAoAQAAdgAAABAQAAAAAAAAaAUAAJ4BAAAYGAAAAAAAAMgGAAAGBwAAICAQAAAA + AADoAgAAzg0AACAgAAAAAAAAqAgAALYQAAAwMBAAAAAAAGgGAABeGQAAMDAAAAAAAACoDgAAxh8AACgA + AAAQAAAAIAAAAAEABAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAACAgAAAAACAAACA + gACAAIAAgICAAMDAwAAA/wAA/wAAAP//AAAAAP8AAP//AAAAAAD///8AERERERERERERERERERERERER + ERERERERERERERERERERAAAAAAABEXF//////wEREX+IiIiPgBF3F/f////wEREX+I//+PARdxf/d3d3 + +AEREX//////AXdxeqqqq7wBEREXd3d3d3ERERERERERERERERERERERERERERERERH//wAA//8AAP// + AAD//xERwAd4iEAHiIjAA4iIIAMREeADd/8gAf//8AH//xABERH4ARf//////////////xERKAAAABAA + AAAgAAAAAQAIAAAAAABAAQAAAAAAAAA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AAAAAAAAAAAgAAAAICAAAAAAIAAAICAAIAA + gACAgIAAwMDAAAD/AAD/AAAA//8AAAAA/wAA//8AAAAAAP///wARERERERERERERERERERERERERERER + ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER + ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERAAAAAAAAAAAAAAER + EREREXiIiIiIiIiIiIiAERERABF3////////////8BEREX9xF/////////////cBEREXcReP//////// + ///4AREREREXf/iIiIiIiIiP/wEREQABEX/4f4//////j/9wERF/9xF4+H+I//////j/gBERF3cRd/iH + 9//////4//ARERERERf/h/f/////+P/3ARFwAAEXj4d3d3d3d3eP+AERf//3F3+IiIiIiIiIiP8wERd3 + dxF/////////////cBEREREReP///////////4ARcAAAEXi7u7u7u7u7u7uyAX///3EXqqqqqqqqq6us + ygEXd3dxF6qqqqqqqqqqqqoBERERERF3d3d3d3d3d3d3ERERERERERERERERERERERERERERERERERER + ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER + EREREREREREREf//////////////////////////////////////////8AAAf/AAAD8wAAA/GAAAH5gA + AB/4AAAfHAAADwwAAA+MAAAP/gAABwYAAAcCAAADgwAAA/8AAAMDAAABAYAAAYGAAAH/wAAD//////// + ////////////////////////KAAAACAAAABAAAAAAQAIAAAAAACABAAAAAAAAAAAAAAAAAAAAAAAAJ44 + AACmQAAAsUsAANNtAADZcgAAmDcGAH4wCQB/MQoAlDoMAHAvDwCDNg8AcDEQAJ5CEwDBZRMAoEQVANN0 + FQCWQRYAl0IXAI9CHAChTCEAznQiANF4JgDzoScAXzsoAGpBKwCdUy4AnlMuAJ5VLwCiWDMAplw3AN+N + OwCjXjwArG5PALF0VQBeXl4As3tfALCIYwBmZmYAhHNoAG5ycgBwd3cAc3h3AHV5eAB2enkAeXt6AHl8 + egB6fHoAe317AH1+ewB+f3wAvJiEALmghgCKiooAkJCMAI6RkAD/zJkApaShAKWloQCmpaEAxLKlAKqq + qgChsLEAysG5A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h4eHh4eHh4eHh4eHh4eHgMFXV1dXV1dXV1dXV0hHBsaGRkZGRkZGRkZGRkZGRkQEV1dXV1dXV1d + XV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1d + XV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1d + XV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1d + XV1dXV1d//////////////////////////////////////gAAD/wAAAf8AAAHzAAAB8YAAAP+AAAD/gA + AA8cAAAHDAAAB/wAAAf+AAADBgAAAwIAAAH/AAAB/wAAAQMAAAABgAAA/4AAAf/AAAP///////////// + //////////////////8oAAAAMAAAAGAAAAABAAQAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AACAAAAAgIAAAAAAgAAAgIAAgACAAICAgADAwMAAAP8AAP8AAAD//wAAAAD/AAD//wAAAAAA////ABER + ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER + ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER + ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER + ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER + ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERAAAAAAAAAAAAAA + AAAAAAABERERERERERd3d3d3d3d3d3d3d3d3d3cgERERERERERd///////////////////ggERERERAB + ERc///////////////////8wEREREX/wERF4//////////////////9yARERERd3ERF3//////////// + //////+CARERERERERFz///////////////////zAREREREREREXj//////////////////3IBERERER + EREXf/iIiIiIiIiIiIiIj//4IBERERAAAREXP/+If/h/////////j///MBEREX//8BEReP+IeP9///// + ////iP//cgERERd3dxERd//4d/94////////+P//ggERERERERERc//4h4+H////////+P//8wERERER + ERERF4/4h3/3////////+I//9yARERERERERF3//h3j4f///////+I//+CARERAAAAERFz//iHd3d3d3 + d3d3d4j//zAREX////AREXj/iIiIiIiIiIiIiIj//3IBERd3d3cREXf//////////////////4IBERER + EREREXP///////////////////MBEREREREREReP//////////////////cgERERERERERd///////// + //////////ggERAAAAABERd6qqqqqqqqqqqqqqqqqqowEX/////wERF6qqqqqqqqqqqqq7q7rMMyARd3 + d3d3ERF6qqqqqqqqqqqqqrqrp8cyAREREREREREXu7u7u7u7u7u7u7u7u7uyARERERERERERd3d3d3d3 + d3d3d3d3d3d3ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER + ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER + ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER + ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER + EREREREREREREf///////wAA////////AAD///////8AAP///////wAA////////AAD///////8AAP// + /////wAA////////AAD///////8AAP///////wAA////////AAD///////8AAP4AAAAB/wAA/gAAAAD/ + AAD+AAAAAP8AAJ4AAAAA/wAADwAAAAB/AACPAAAAAH8AAP8AAAAAfwAA/4AAAAA/AAD/gAAAAD8AAIeA + AAAAPwAAA8AAAAAfAACDwAAAAB8AAP/AAAAAHwAA/+AAAAAPAAD/4AAAAA8AAIHgAAAADwAAAPAAAAAH + AACA8AAAAAcAAP/wAAAABwAA//gAAAADAAD/+AAAAAMAAIB4AAAAAwAAADwAAAABAACAPAAAAAEAAP/+ + AAAAAQAA//8AAAADAAD///////8AAP///////wAA////////AAD///////8AAP///////wAA//////// + AAD///////8AAP///////wAA////////AAD///////8AACgAAAAwAAAAYAAAAAEACAAAAAAAgAoAAAAA + AAAAAAAAAAAAAAAAAACQMAAAmTMAAKE7AACtRwAAu1UAAMNdAADMZgAA020AAN13AAD2kAAAoz0BAIYv + BACbNwQAzGkGAKNEDQBwMRAAnkITAHQ1FAAVFRUA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WVlZWVlZWVlZWVlZWV + lZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWV + lZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWV////////AAD///////8AAP// + /////wAA////////AAD///////8AAP///////wAA////////AAD///////8AAP///////wAA//////// + AAD///////8AAP8AAAAA/wAA/gAAAAD/AAD+AAAAAH8AAP4AAAAAfwAAngAAAAB/AAAPAAAAAD8AAI8A + AAAAPwAA/wAAAAA/AAD/gAAAAB8AAP+AAAAAHwAAh4AAAAAfAAADwAAAAA8AAIPAAAAADwAA/8AAAAAP + AAD/4AAAAAcAAP/gAAAABwAAgeAAAAAHAAAA8AAAAAMAAIDwAAAAAwAA//AAAAADAAD/+AAAAAEAAP/4 + AAAAAQAAgHgAAAABAAAAPAAAAAAAAIA8AAAAAAAA//4AAAABAAD//wAAAAMAAP///////wAA//////// + AAD///////8AAP///////wAA////////AAD///////8AAP///////wAA////////AAD///////8AAP// + /////wAA + + + \ No newline at end of file diff --git a/GotoWindow.Designer.cs b/GotoWindow.Designer.cs new file mode 100644 index 0000000..a159024 --- /dev/null +++ b/GotoWindow.Designer.cs @@ -0,0 +1,104 @@ +namespace LSLEditor +{ + partial class GotoWindow + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(16, 8); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(42, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Line nr:"; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(16, 32); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(224, 20); + this.textBox1.TabIndex = 1; + this.textBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox1_KeyDown); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(168, 56); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 2; + this.button1.Text = "Cancel"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Location = new System.Drawing.Point(80, 56); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.TabIndex = 3; + this.button2.Text = "Ok"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // GotoForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(254, 90); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.label1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "GotoForm"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Go To Line"; + this.TopMost = true; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + + } +} \ No newline at end of file diff --git a/GotoWindow.cs b/GotoWindow.cs new file mode 100644 index 0000000..6f347ee --- /dev/null +++ b/GotoWindow.cs @@ -0,0 +1,98 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.Windows.Forms; + +namespace LSLEditor +{ + public partial class GotoWindow : Form + { + private LSLEditorForm lslEditForm; + public GotoWindow(LSLEditorForm lslEditForm) + { + InitializeComponent(); + this.Icon = lslEditForm.Icon; + this.lslEditForm = lslEditForm; + + EditForm editForm = this.lslEditForm.ActiveMdiForm as EditForm; + this.label1.Text = "Line number (1-"+editForm.TextBox.Lines.Length+")"; + } + + private void button1_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void Goto() + { + EditForm editForm = this.lslEditForm.ActiveMdiForm as EditForm; + if (editForm == null) + return; + try + { + int intLine = Convert.ToInt32(this.textBox1.Text); + editForm.TextBox.Goto(intLine); + this.Close(); + } + catch + { + } + } + + private void button2_Click(object sender, EventArgs e) + { + Goto(); + } + + private void textBox1_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Return) + { + Goto(); + e.SuppressKeyPress = true; + } + + } + } +} \ No newline at end of file diff --git a/GotoWindow.resx b/GotoWindow.resx new file mode 100644 index 0000000..ff31a6d --- /dev/null +++ b/GotoWindow.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Helpers/AutoFormatter.cs b/Helpers/AutoFormatter.cs new file mode 100644 index 0000000..133fe49 --- /dev/null +++ b/Helpers/AutoFormatter.cs @@ -0,0 +1,373 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.IO; +using System.Text; + +using System.Collections.Generic; + +namespace LSLEditor +{ + class AutoFormatter + { + public static string GetTab() + { + if (Properties.Settings.Default.SL4SpacesIndent) + return " "; + else + return "\t"; + } + + private static int CountParenthesis(string strLine) + { + int intParenthesis=0; + bool blnWithinString = false; + for (int intI = 0; intI < strLine.Length; intI++) + { + if (strLine[intI] == '"') + blnWithinString = !blnWithinString; + if (blnWithinString) + { + if (strLine[intI] == '\\') + intI++; + continue; + } + if (strLine[intI] == '/') + { + if(intI<(strLine.Length-1)) + if (strLine[intI + 1] == '/') + break; + } + if (strLine[intI] == '{') + intParenthesis++; + if (strLine[intI] == '}') + intParenthesis--; + } + return intParenthesis; + } + + private static int GetTabCountFromWhiteSpace(string strWhiteSpace) + { + int intSpaces = 0; + for (int intI = 0; intI < strWhiteSpace.Length; intI++) + { + if(strWhiteSpace[intI]==' ') + intSpaces++; + if (strWhiteSpace[intI] == '\t') + intSpaces = (int)(6 * (intSpaces / 6)) + 6 - (intSpaces % 6); + } + if (Properties.Settings.Default.SL4SpacesIndent) + return intSpaces / 4; + else + return intSpaces / 6; + } + + public static string GetWhiteSpaceFromLine(string strLine) + { + StringBuilder sb = new StringBuilder(); + for (int intI = 0; intI < strLine.Length; intI++) + { + if (strLine[intI] > ' ') + break; + sb.Append(strLine[intI]); + } + return sb.ToString(); + } + + private static int GetTabCountFromLine(string strLine, out int intOnce) + { + StringBuilder sb = new StringBuilder(); + int intCountParenthesis = CountParenthesis(strLine); + if(intCountParenthesis<0) + intCountParenthesis = 0; + for (int intI = 0; intI < strLine.Length; intI++) + { + if (strLine[intI] > ' ') + break; + sb.Append(strLine[intI]); + } + + intOnce = 0; + + strLine = TrimCommentTrim(strLine); + + int intLength = strLine.Length; + if (intLength > 0) + { + char chrLastChar = strLine[intLength - 1]; + if (strLine[0] == '{' || chrLastChar == ';' || chrLastChar == '{' || chrLastChar == '}') + intOnce = 0; + else + intOnce = 1; + // this only valid for typing + if (intCountParenthesis == 0 && chrLastChar == '{') + intCountParenthesis++; + } + + return GetTabCountFromWhiteSpace(sb.ToString()) + intCountParenthesis + intOnce; + } + + public static string RemoveComment(string strLine) + { + bool blnWithinString = false; + for (int intI = 0; intI < (strLine.Length - 1); intI++) + { + char chrC = strLine[intI]; + if (chrC == '"') + blnWithinString = !blnWithinString; + if (blnWithinString) + { + if (chrC == '\\') + intI++; + continue; + } + if (chrC != '/') + continue; + if (strLine[intI + 1] == '/') + { + strLine = strLine.Substring(0, intI); + break; + } + } + return strLine; + } + + public static string RemoveCommentsFromLines(string strLines) + { + StringBuilder sb = new StringBuilder(); + StringReader sr = new StringReader(strLines); + while (true) + { + string strLine = sr.ReadLine(); + if (strLine == null) + break; + sb.AppendLine(RemoveComment(strLine)); + } + return sb.ToString(); + } + + private static string TrimCommentTrim(string strLine) + { + return RemoveComment(strLine).Trim(); + } + + public static string GetNewWhiteSpace(string[] lines, int intIndex) + { + int intTab = 0; + int intOnce = 0; + string strLine = ""; + StringBuilder sb = new StringBuilder(); + + while (intIndex>=0 && intIndex 0) + { + intTab = GetTabCountFromLine(strLine, out intOnce); + break; + } + intIndex--; + } + + if (TrimCommentTrim(strLine) != "{") + { + intIndex--; + while (intIndex >= 0 && intIndex < lines.Length) + { + strLine = lines[intIndex]; + if (TrimCommentTrim(strLine).Length > 0) + { + GetTabCountFromLine(strLine, out intOnce); + break; + } + intIndex--; + } + } + + for (int intI = 0; intI < (intTab - intOnce); intI++) + sb.Append(AutoFormatter.GetTab()); + + return sb.ToString(); + } + + public static string ApplyFormatting(int intTab, string strInput) + { + StringBuilder sb = new StringBuilder(); + StringReader sr = new StringReader(strInput); + + Stack stack = new Stack(); + stack.Push(intTab); + + int intTemp = 0; + while (true) + { + string strLine = sr.ReadLine(); + if (strLine == null) + break; + + // trim whitespace, this is a clean line + strLine = strLine.Trim(); + + // empty lines do not contain tabs + if (strLine.Length == 0) + { + sb.Append('\n'); + continue; + } + + // print current line, on current indent level + int intCorrection = 0; + if (strLine[0] == '{' || strLine[0] == '}') + intCorrection--; + for (int intI = 0; intI < (intTab + intTemp + intCorrection); intI++) + sb.Append(GetTab()); + sb.Append(strLine); + sb.Append('\n'); + + + // calculate next indent level + strLine = TrimCommentTrim(strLine); + + int intParenthesis = CountParenthesis(strLine); + + if (intParenthesis > 0) + { + for (int intP = 0; intP < intParenthesis; intP++) + { + stack.Push(intTab); + if (strLine != "{") + intTab++; + } + intTab += intTemp; + intTemp = 0; + } + else if (intParenthesis < 0) + { + if (stack.Count > 0) + intTab = stack.Pop(); + intTemp = 0; + } + else + { + if (strLine.Length > 0) + { + char chrFirstChar = strLine[0]; + char chrLastChar = strLine[strLine.Length - 1]; + intTemp++; + + if (chrFirstChar == '|' || chrLastChar == '|') + intTemp = 1; + if (chrFirstChar == '+' || chrLastChar == '+') + intTemp = 1; + if (chrFirstChar == '-' || chrLastChar == '-') + intTemp = 1; + if (chrLastChar == ',' || chrLastChar == ',') + intTemp = 1; + if (chrLastChar == ';' || chrLastChar == '}') + intTemp = 0; + } + } + } + + if (!strInput.EndsWith("\n")) + return sb.ToString().TrimEnd(new char[] { '\n' }); + else + return sb.ToString(); + } + + public static string MultiLineTab(bool blnAdd, string strText) + { + string strPrefix = GetTab(); + StringBuilder sb = new StringBuilder(); + StringReader sr = new StringReader(strText); + while (true) + { + string strLine = sr.ReadLine(); + if (strLine == null) + break; + if (blnAdd) + { + sb.Append(strPrefix); + } + else + { + if (strLine.StartsWith(strPrefix)) + strLine = strLine.Substring(strPrefix.Length); + } + sb.Append(strLine); + sb.Append('\n'); + } + return sb.ToString(); + } + + + public static string MultiLineComment(bool blnAdd, int intTab, string strText) + { + string strPrefix = "//"; + StringBuilder sb = new StringBuilder(); + StringReader sr = new StringReader(strText); + while (true) + { + string strLine = sr.ReadLine(); + if (strLine == null) + break; + + if (blnAdd) + { + sb.Append(strPrefix); + } + else + { + strLine = strLine.Trim(); + if (strLine.StartsWith(strPrefix)) + strLine = strLine.Substring(strPrefix.Length); + } + sb.Append(strLine); + sb.Append('\n'); + } + return ApplyFormatting(intTab,sb.ToString()); + } + + } +} diff --git a/Helpers/CodeCompletion.cs b/Helpers/CodeCompletion.cs new file mode 100644 index 0000000..658a7ec --- /dev/null +++ b/Helpers/CodeCompletion.cs @@ -0,0 +1,105 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System.Drawing; +using System.Collections.Generic; +using System.Text.RegularExpressions; + +namespace LSLEditor.Helpers +{ + class CodeCompletion + { + Regex regex; + + public CodeCompletion() + { + this.regex = new Regex( + @" +\b(?integer|float|string|vector|rotation|state|key|list)\s +(?> + \s* (?[\w]*) \s* + (?>\= \s* + (?: + (?> + [^(),;]+ + | \( (?) + | \) (?<-nr>) + )* + (?(nr)(?!)) + ) + \s*)? [,;)] +)* +" + , + RegexOptions.IgnorePatternWhitespace + | RegexOptions.Compiled); + } + + public void CodeCompletionUserVar(string strKeyWord, string strTextIn, int intStart, List list) + { + if (intStart == 0) + return; + string strText = strTextIn.Substring(0, intStart); + string strLowerCaseKeyWord = strKeyWord.ToLower(); + foreach (Match m in regex.Matches(strText)) + { + if (m.Groups.Count == 4) + { + string strType = m.Groups[1].ToString(); + foreach (Capture cap in m.Groups[2].Captures) + { + string strName = cap.ToString(); + if (strName.ToLower().StartsWith(strLowerCaseKeyWord)) + { + KeyWordInfo ki = new KeyWordInfo(KeyWordTypeEnum.Vars, strName, Color.Red); + if (!list.Contains(ki)) + list.Add(ki); + } + if (strType == "list" || strType == "vector" || strType == "rotation") + break; + } + } + } + } + } +} diff --git a/Helpers/CompilerHelper.cs b/Helpers/CompilerHelper.cs new file mode 100644 index 0000000..687d5f8 --- /dev/null +++ b/Helpers/CompilerHelper.cs @@ -0,0 +1,145 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.IO; +using System.Reflection; +using System.Windows.Forms; +using System.CodeDom.Compiler; +using Microsoft.CSharp; + +namespace LSLEditor.Helpers +{ + class CompilerHelper + { + private static int FindDefaultLineNumber(string strCode) + { + StringReader sr = new StringReader(strCode); + int intI = 0; + while (true) + { + string strLine = sr.ReadLine(); + if (strLine == null) + break; + if (strLine.StartsWith("class State_default")) + return intI; + intI++; + } + return intI; + } + + public static Assembly CompileCSharp(EditForm editForm, string CSharpCode) + { + // Code compiler and provider + CodeDomProvider cc = new CSharpCodeProvider(); + + // Compiler parameters + CompilerParameters cp = new CompilerParameters(); + + // Sept 15, 2007 -> 3, 30 oct 2007 -> 4 + if(!Properties.Settings.Default.SkipWarnings) + cp.WarningLevel = 4; + + // Add common assemblies + cp.ReferencedAssemblies.Add("System.dll"); + cp.ReferencedAssemblies.Add("System.Windows.Forms.dll"); + + // LSLEditor.exe contains all base SecondLife class stuff + cp.ReferencedAssemblies.Add(Assembly.GetExecutingAssembly().Location); + + // Compiling to memory + cp.GenerateInMemory = true; + + // Does this work? + cp.IncludeDebugInformation = true; + + // Wrap strCSharpCode into my namespace + string strRunTime = "namespace LSLEditor\n{\n"; + strRunTime += CSharpCode; + strRunTime += "\n}\n"; + + int intDefaultLineNumber = FindDefaultLineNumber(strRunTime); + + // Here we go + CompilerResults cr = cc.CompileAssemblyFromSource(cp, strRunTime); + + // get the listview to store some errors + ListView ListViewErrors = editForm.parent.SyntaxErrors.ListView; + + // Console.WriteLine(cr.Errors.HasWarnings.ToString()); + // Check for compilation errors... + if (ListViewErrors != null && (cr.Errors.HasErrors || cr.Errors.HasWarnings)) + { + int intNr = 1; + foreach (CompilerError err in cr.Errors) + { + int intLine = err.Line; + if (intLine < intDefaultLineNumber) + intLine -= 4; + else + intLine -= 5; + string strError = OopsFormatter.ApplyFormatting(err.ErrorText); + int intImageIndex = 0; + if (err.IsWarning) + intImageIndex = 1; + ListViewItem lvi = new ListViewItem(new string[] { + "", // 0 + intNr.ToString(), // 1 + strError, // 2 + editForm.ScriptName, // 3 + intLine.ToString(), // 4 + err.Column.ToString(), // 5 + editForm.ProjectName , // 6 + editForm.FullPathName, // 7 + editForm.guid.ToString(),// 8 + editForm.IsScript.ToString()// 9 + } , intImageIndex); + ListViewErrors.Items.Add(lvi); + intNr++; + } + return null; + } + return cr.CompiledAssembly; + } + } +} diff --git a/Helpers/FileAssociator.cs b/Helpers/FileAssociator.cs new file mode 100644 index 0000000..4fc493c --- /dev/null +++ b/Helpers/FileAssociator.cs @@ -0,0 +1,115 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.Text; +using Microsoft.Win32; + + +namespace LSLEditor.Helpers +{ + class FileAssociator + { + // Associate file extension with progID, description, icon and application + public static bool Associate(string strExtension, string strFileNameType, string strDescription, string strApplication,int intIconNr) + { + try + { + Registry.ClassesRoot.CreateSubKey(strExtension).SetValue("", strFileNameType); + if (strFileNameType != null && strFileNameType.Length > 0) + { + using (RegistryKey key = Registry.ClassesRoot.CreateSubKey(strFileNameType)) + { + if (strDescription != null) + key.SetValue("", strDescription); + if (strApplication != null) + { + key.CreateSubKey("DefaultIcon").SetValue("", strApplication + "," + intIconNr); + key.CreateSubKey(@"Shell\Open\Command").SetValue("", "\"" + strApplication + "\" \"%1\""); + } + } + } + return true; + } + catch + { + return false; + } + } + + public static bool DeAssociate(string strExtension, string strFileNameType) + { + try + { + Registry.ClassesRoot.DeleteSubKey(strExtension); + Registry.ClassesRoot.DeleteSubKeyTree(strFileNameType); + return true; + } + catch + { + return false; + } + } + + // Return true if extension already associated in registry + public static bool IsAssociated(string strExtension) + { + try + { + return (Registry.ClassesRoot.OpenSubKey(strExtension, false) != null); + } + catch + { + return false; + } + } + + private void Test() + { + if (!IsAssociated(".lsl")) + Associate(".lsl", "LSLEditorScript", "SecondLife lsl File for LSLEditor", System.Reflection.Assembly.GetExecutingAssembly().Location, 0); + DeAssociate(".lsl", "LSLEditorScript"); + } + + } +} diff --git a/Helpers/GetTemplate.cs b/Helpers/GetTemplate.cs new file mode 100644 index 0000000..fb54fc0 --- /dev/null +++ b/Helpers/GetTemplate.cs @@ -0,0 +1,71 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.Reflection; +using System.IO; + +namespace LSLEditor.Helpers +{ + class GetTemplate + { + public static string Source() + { + try + { + string strTemplate = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), Properties.Settings.Default.ExampleTemplate); + if (File.Exists(strTemplate)) + { + StreamReader sr = new StreamReader(strTemplate); + string strCode = sr.ReadToEnd(); + sr.Close(); + return strCode; + } + } + catch + { + } + return Properties.Settings.Default.Example; + } + } +} diff --git a/Helpers/GroupboxEvent.cs b/Helpers/GroupboxEvent.cs new file mode 100644 index 0000000..9e69adc --- /dev/null +++ b/Helpers/GroupboxEvent.cs @@ -0,0 +1,190 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.Collections; +using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; + +namespace LSLEditor +{ + /// + /// Summary description for GroupboxTextbox. + /// + public class GroupboxEvent : System.Windows.Forms.GroupBox + { + /// + /// Required designer variable. + /// + private System.ComponentModel.Container components = null; + + public GroupboxEvent(Point pt,string strName,string strArgs,System.EventHandler eventHandler) + { + // This call is required by the Windows.Forms Form Designer. + InitializeComponent(); + this.Location = pt; + + string[] args = strArgs.Trim().Split(new char[] {','}); + int intX=5; + int intY=5; + + if(args.Length>0) + intY += 5; + for(int intArgumentNumber=0;intArgumentNumber["+strArgumentType+"]["+strArgumentName+"]"); + strArgumentValue = "unknown"; + break; + } + + GroupBox groupbox = new GroupBox(); + groupbox.Name = strName+"_"+intArgumentNumber; + groupbox.Text = strArgumentName; + groupbox.Location = new Point(5,intY); + groupbox.Width = this.Width - 10; + + Control control = null; + if (strName == "listen" && intArgumentNumber==0) + { + ComboBox comboBox = new ComboBox(); + comboBox.Text = ""; + control = comboBox; + } + else + { + TextBox textBox = new TextBox(); + textBox.Text = strArgumentValue; + control = textBox; + } + control.Name = "textBox_" + strName + "_" + intArgumentNumber; + control.Location = new Point(5, 15); + groupbox.Controls.Add(control); + groupbox.Height = 20 + control.Height; + this.Controls.Add(groupbox); + intY += groupbox.Height; + } + else + { + if(strArgs!="") + MessageBox.Show("Argument must be 'type name' ["+strArgs+"]"); + } + } + + intY += 5; + + Button button = new Button(); + button.Text = strName; + button.Width = 130; + button.Location = new Point(intX,intY); + button.Click += eventHandler; + this.Controls.Add(button); + this.Height = intY + button.Height + 5; + } + + /// + /// Clean up any resources being used. + /// + protected override void Dispose( bool disposing ) + { + if( disposing ) + { + if(components != null) + { + components.Dispose(); + } + } + base.Dispose( disposing ); + } + + #region Component Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + // + // GroupboxTextbox + // + this.Name = "GroupboxTextbox"; + this.Size = new System.Drawing.Size(152, 96); + + } + #endregion + } +} diff --git a/Helpers/GroupboxEvent.resx b/Helpers/GroupboxEvent.resx new file mode 100644 index 0000000..b26f549 --- /dev/null +++ b/Helpers/GroupboxEvent.resx @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + + False + + + True + + + True + + + 80 + + + (Default) + + + False + + + Private + + + GroupboxTextbox + + + 8, 8 + + \ No newline at end of file diff --git a/Helpers/HTTPRequest.cs b/Helpers/HTTPRequest.cs new file mode 100644 index 0000000..9550f7a --- /dev/null +++ b/Helpers/HTTPRequest.cs @@ -0,0 +1,204 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.Net; +using System.Text; + +namespace LSLEditor +{ + class HTTPRequest + { + private class UserState + { + public SecondLife secondlife; + public SecondLife.key httpkey; + public UserState(SecondLife.key httpkey, SecondLife secondlife) + { + this.secondlife = secondlife; + this.httpkey = httpkey; + } + } + + public static void Request(WebProxy proxy, SecondLife secondlife, string strUrl, SecondLife.list parameters, string postData, SecondLife.key key) + { + string strMethod = "GET"; + string strContentType = "text/plain;charset=utf-8"; + + for (int intI = 0; intI < parameters.Count; intI += 2) + { + int intKey; + if (!int.TryParse(parameters[intI].ToString(), out intKey)) + continue; + switch (intKey) + { + case 0: + // get, post, put, delete + strMethod = parameters[intI + 1].ToString().ToUpper(); + break; + case 1: + strContentType = parameters[intI + 1].ToString(); + break; + case 2: + // HTTP_BODY_MAXLENGTH + break; + case 3: + // HTTP_VERIFY_CERT + break; + default: + break; + } + } + + WebClient wc = new WebClient(); + + wc.Headers.Add("Content-Type", strContentType); + wc.Headers.Add("Accept", "text/*"); + wc.Headers.Add("Accept-Charset", "utf-8;q=1.0, *;q=0.5"); + wc.Headers.Add("Accept-Encoding", "deflate, gzip"); + wc.Headers.Add("User-Agent", "Second Life LSL/1.19.0(12345) (http://secondlife.com)"); + + System.Drawing.Point point = Properties.Settings.Default.RegionCorner; + SecondLife.vector RegionCorner = new SecondLife.vector(point.X, point.Y, 0); + + SecondLife.vector pos = secondlife.GetLocalPos(); + + wc.Headers.Add("X-SecondLife-Shard", Properties.Settings.Default.XSecondLifeShard); + wc.Headers.Add("X-SecondLife-Object-Name", secondlife.host.GetObjectName()); + wc.Headers.Add("X-SecondLife-Object-Key", secondlife.host.GetKey().ToString()); + wc.Headers.Add("X-SecondLife-Region", string.Format("{0} ({1}, {2})", Properties.Settings.Default.RegionName, (int)RegionCorner.x, (int)RegionCorner.y)); + wc.Headers.Add("X-SecondLife-Local-Position", string.Format("({0}, {1}, {2})", pos.x, pos.y, pos.z)); + wc.Headers.Add("X-SecondLife-Local-Rotation", "(0.000000, 0.000000, 0.000000, 1.000000)"); + wc.Headers.Add("X-SecondLife-Local-Velocity", "(0.000000, 0.000000, 0.000000)"); + wc.Headers.Add("X-SecondLife-Owner-Name", Properties.Settings.Default.AvatarName); + wc.Headers.Add("X-SecondLife-Owner-Key", Properties.Settings.Default.AvatarKey); + wc.Headers.Add("X-Forwarded-For", "127.0.0.1"); + + if (proxy != null) + wc.Proxy = proxy; + + Uri uri = new Uri(strUrl); + + // Basic Authentication scheme, added 28 mrt 2008 + if (uri.UserInfo != "") + { + string[] UserInfo = uri.UserInfo.Split(':'); + if (UserInfo.Length == 2) + { + CredentialCache mycache = new CredentialCache(); + mycache.Add(uri, "Basic", + new NetworkCredential(UserInfo[0], UserInfo[1])); + wc.Credentials = mycache; + } + } + + + UserState userState = new UserState(key, secondlife); + + if (strMethod == "POST" || strMethod == "PUT") + { + wc.UploadDataCompleted += new UploadDataCompletedEventHandler(wc_UploadDataCompleted); + wc.UploadDataAsync(uri, strMethod, Encoding.UTF8.GetBytes(postData), userState); + } + else + { + wc.DownloadDataCompleted += new DownloadDataCompletedEventHandler(wc_DownloadDataCompleted); + wc.DownloadDataAsync(uri, userState); + } + } + + private static void wc_DownloadDataCompleted(object sender, DownloadDataCompletedEventArgs e) + { + int intStatusCode = 200; + UserState userState = (UserState)e.UserState; + string strResult = ""; + + if (e.Error != null) + { + WebException webException = e.Error as WebException; + HttpWebResponse webResponse = webException.Response as HttpWebResponse; + if (webResponse == null) + { + intStatusCode = 0; + strResult = webException.Message; + } + else + { + intStatusCode = (int)webResponse.StatusCode; + System.IO.StreamReader sr = new System.IO.StreamReader(webResponse.GetResponseStream()); + strResult = sr.ReadToEnd(); + } + } + else + { + if (e.Result != null) + strResult = Encoding.ASCII.GetString(e.Result); + } + userState.secondlife.host.ExecuteSecondLife("http_response", userState.httpkey, (SecondLife.integer)intStatusCode, new SecondLife.list(), (SecondLife.String)strResult); + } + + private static void wc_UploadDataCompleted(object sender, UploadDataCompletedEventArgs e) + { + int intStatusCode = 200; + UserState userState = (UserState)e.UserState; + string strResult = ""; + + if (e.Error != null) + { + WebException webException = e.Error as WebException; + HttpWebResponse webResponse = webException.Response as HttpWebResponse; + intStatusCode = (int)webResponse.StatusCode; + System.IO.StreamReader sr = new System.IO.StreamReader(webResponse.GetResponseStream()); + strResult = sr.ReadToEnd(); + } + else + { + if (e.Result != null) + strResult = Encoding.ASCII.GetString(e.Result); + } + userState.secondlife.host.ExecuteSecondLife("http_response", userState.httpkey, (SecondLife.integer)intStatusCode, new SecondLife.list(), (SecondLife.String)strResult); + } + + } +} + diff --git a/Helpers/LSL2CSharp.cs b/Helpers/LSL2CSharp.cs new file mode 100644 index 0000000..3b142be --- /dev/null +++ b/Helpers/LSL2CSharp.cs @@ -0,0 +1,642 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.Xml; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Text.RegularExpressions; + +namespace LSLEditor +{ + class LSL2CSharp + { + public List States; + private XmlDocument xml; + + public LSL2CSharp(XmlDocument xml) + { + this.xml = xml; + this.States = new List(); + } + + private string CorrectGlobalEvaluator(Match m) + { + string strPrefix = m.Groups["prefix"].Value; + string strPublic = m.Groups["public"].Value; + string strPostfix = m.Groups["postfix"].Value; + if (strPublic.EndsWith(";")) + return strPrefix + "public static " + strPublic + strPostfix; + // has to be static, + // because the vars must keep their values between state changes + + // 22 june 2007, added + Regex regex = new Regex(@"\w*", RegexOptions.IgnorePatternWhitespace ); + int intCount=0; + for (Match pm = regex.Match(strPublic); pm.Success; pm = pm.NextMatch()) + { + if (pm.Value.Length > 0) + intCount++; + if (intCount > 1) + break; + } + if(intCount==1) + return strPrefix + "public void " + strPublic + strPostfix; + else + return strPrefix + "public " + strPublic + strPostfix; + } + + private string CorrectGlobal(string strC) + { + Regex regex = new Regex( + @"(?\s*) +(?: + (?[^{};]*;) + +| + +(?[^{;(]*) + (? + \( [^{]* \) \s* + \{ + (?> + [^{}]+ + | \{ (?) + | \} (?<-number>) + )* + (?(number)(?!)) +\} +) +)", + RegexOptions.IgnorePatternWhitespace); + return regex.Replace(strC, new MatchEvaluator(CorrectGlobalEvaluator)); + } + + private string RemoveComments(string strC) + { + if (Properties.Settings.Default.CommentCStyle) + { + int intI = strC.IndexOf("/*"); + while (intI > 0) + { + int intJ = strC.IndexOf("*" + "/", intI); + if (intJ < 0) + break; + strC = strC.Remove(intI, intJ - intI + 2); + intI = strC.IndexOf("/*"); + } + } + return AutoFormatter.RemoveCommentsFromLines(strC); + } + + private string CorrectStates(string strC,string strGlobalClass) + { + Regex regex; + + // Default state + regex = new Regex(@"^\s*(default)(\W)", + RegexOptions.Multiline + | RegexOptions.IgnorePatternWhitespace + | RegexOptions.Compiled); + strC = regex.Replace(strC, @"class State_$1 : " + strGlobalClass + "$2"); + + // Other states + regex = new Regex( + @"^state\s+([^\s]*)(\s*\{)", + RegexOptions.Multiline + | RegexOptions.IgnorePatternWhitespace + | RegexOptions.Compiled + ); + Match m = regex.Match(strC); + while (m.Success) + { + string strStateName = m.Groups[1].ToString(); + this.States.Add(strStateName); + m = m.NextMatch(); + } + strC = regex.Replace(strC, "class State_$1 : " + strGlobalClass + "$2"); + + string strGlobal = ""; + + if (Properties.Settings.Default.StatesInGlobalFunctions) + { + // do nothing! + } + else + { + int intDefault = strC.IndexOf("class State_default"); + if (intDefault >= 0) + { + strGlobal = strC.Substring(0, intDefault); + strC = strC.Substring(intDefault); + } + } + + // State change, excluding global functions + regex = new Regex( + @"(\s+)state\s+(\w*)(\s*;)", + RegexOptions.IgnorePatternWhitespace + | RegexOptions.Compiled + ); + return strGlobal + regex.Replace(strC, @"$1state(""$2"")$3"); + } + + private string PreCorrectReservedWords(string strC) + { + #region All PreCorrect reserved C# words + Regex regex = new Regex(@"(\b)(public +| class +| override +| namespace +| void +| SecondLife +| GlobalClass +| static +| goto +| String +| Float + +)(\b)", + RegexOptions.IgnorePatternWhitespace + | RegexOptions.Compiled + ); + #endregion + return regex.Replace(strC, "$1_$2$3"); + } + + private string CorrectReservedWords(string strC) + { + #region All reserved C# words + Regex regex = new Regex(@"(\b)(new +| abstract +| as +| base +| bool +| break +| byte +| case +| catch +| char +| checked +| const +| continue +| decimal +| delegate +| double +| enum +| event +| explicit +| extern +| false +| finally +| fixed +| foreach +| implicit +| in +| int +| interface +| internal +| is +| lock +| long +| new +| null +| object +| operator +| out +| params +| private +| protected +| readonly +| ref +| sbyte +| sealed +| short +| sizeof +| stackalloc +| struct +| switch +| this +| throw +| true +| try +| typeof +| uint +| ulong +| unchecked +| unsafe +| ushort +| using +| virtual + +)(\b)", + RegexOptions.IgnorePatternWhitespace + | RegexOptions.Compiled + ); + #endregion + return regex.Replace(strC, "$1_$2$3"); + } + + private string CorrectEvent(string strC, string strName) + { + Regex regex = new Regex( + @"([^\w_])" + strName + @"(\s*)\(", + RegexOptions.IgnorePatternWhitespace + | RegexOptions.Compiled + ); + return regex.Replace(strC, "$1public override void " + strName + "$2("); + } + + private string CorrectEvents(string strC) + { + XmlNode words = xml.SelectSingleNode("//Words[@name='Appendix B. Events']"); + foreach (XmlNode xmlNode in words.SelectNodes(".//Word")) + { + string strName = xmlNode.Attributes["name"].InnerText; + strC = CorrectEvent(strC, strName); + } + return strC; + } + + // old vector parser + // <([^<>,;]*),([^<>,;]*),([^<>,;]*)> + private string CorrectVector(string strC) + { + Regex regex = new Regex(@" +< + (? + (?> + [^=(),>]+ + | \( (?) + | \) (?<-nr>) + | , + )* + (?(nr)(?!)) + ) +, + (? + (?> + [^=(),>]+ + | \( (?) + | \) (?<-nr>) + | , + )* + (?(nr)(?!)) + ) +, + (? + (?> + [^=()>]+ + | \( (?) + | \) (?<-nr>) + | , + )* + (?(nr)(?!)) + ) +> +", + RegexOptions.IgnorePatternWhitespace + | RegexOptions.Compiled + ); + return regex.Replace(strC, "new vector(${vector_x},${vector_y},${vector_z})"); + } + + // old rotation + // <([^<>,;]*),([^<>,;]*),([^<>,;]*),([^<>,;]*)> + private string CorrectRotation(string strC) + { + Regex regex = new Regex(@" +< + (? + (?> + [^=(),>]+ + | \( (?) + | \) (?<-nr>) + | , + )* + (?(nr)(?!)) + ) +, + (? + (?> + [^=(),>]+ + | \( (?) + | \) (?<-nr>) + | , + )* + (?(nr)(?!)) + ) +, + (? + (?> + [^=(),>]+ + | \( (?) + | \) (?<-nr>) + | , + )* + (?(nr)(?!)) + ) +, + (? + (?> + [^=()>]+ + | \( (?) + | \) (?<-nr>) + | , + )* + (?(nr)(?!)) + ) +> +", + RegexOptions.IgnorePatternWhitespace + | RegexOptions.Compiled + ); + return regex.Replace(strC, "new rotation(${rotation_x},${rotation_y},${rotation_z},${rotation_s})"); + } + + private string CorrectQuaternion(string strC) + { + Regex regex = new Regex( + @"(\b)quaternion(\b)", + RegexOptions.Compiled + | RegexOptions.IgnorePatternWhitespace + ); + return regex.Replace(strC, "$1rotation$2"); + } + + private string CorrectListsEvaluator(Match m) + { + string strValue = m.Value; + return "new list(new object[] {" + CorrectLists(strValue.Substring(1, strValue.Length - 2)) + "})"; + } + + private string CorrectLists(string strC) + { + Regex regex = new Regex( + @" +\[ + (?> + [^\[\]]+ + | \[ (?) + | \] (?<-number>) + )* + (?(number)(?!)) +\] +", + RegexOptions.IgnorePatternWhitespace + | RegexOptions.Compiled); + return regex.Replace(strC, new MatchEvaluator(CorrectListsEvaluator)); + } + + // changed 16 aug 2007 + private string CorrectJump(string strC) + { + // jump -> goto + Regex regex = new Regex( + @"(\b)jump(\s+)([^;]*;)", + RegexOptions.Compiled + | RegexOptions.IgnorePatternWhitespace + ); + strC = regex.Replace(strC, "$1goto$2_$3"); + + // @label; -> label:; + regex = new Regex( + @"@\s*([a-z0-9_]+)\s*;", + RegexOptions.Compiled + | RegexOptions.IgnoreCase + | RegexOptions.IgnorePatternWhitespace + ); + return regex.Replace(strC, "_$1:;"); + } + + + private string RemoveQuotedStrings(string strC, out List h) + { + h = new List(); + StringBuilder sb = new StringBuilder(); + StringBuilder QuotedString = null; + for (int intI = 0; intI < strC.Length; intI++) + { + char chrC = strC[intI]; + if (chrC == '"') + { + if (QuotedString != null) + { + // end of a quoted string + sb.Append('"'); + sb.Append(h.Count.ToString()); + sb.Append('"'); + h.Add(QuotedString.ToString()); + QuotedString = null; + continue; + } + else + { + if (chrC == '"') + { + // start of a new quoted string + QuotedString = new StringBuilder(); + continue; + } + // it was just a newline char, and not in a string + } + } + + if (QuotedString == null) + sb.Append(chrC); + else + { + if (chrC == '\n') + { + QuotedString.Append('\\'); + chrC = 'n'; + } + if (chrC != '\\') + { + QuotedString.Append(chrC); + } + else // it is a backslash + { + intI++; + chrC = strC[intI]; + if (chrC == 't') // tabs are 4 spaces in SL world!! + { + QuotedString.Append(" "); + } + else // nope, it is no tab, just output it all + { + QuotedString.Append('\\'); + QuotedString.Append(chrC); + } + } + } + } + return sb.ToString(); + } + + private string InsertQuotedStrings(string strC, List h) + { + StringBuilder sb = new StringBuilder(); + StringBuilder QuotedString = null; + for (int intI = 0; intI < strC.Length; intI++) + { + char chrC = strC[intI]; + if (chrC == '"') + { + if (QuotedString == null) + { + QuotedString = new StringBuilder(); + } + else + { + sb.Append('"'); + int intNumber; + // State("default") is not a number, result of 'CorrectStates' + if (int.TryParse(QuotedString.ToString(), out intNumber)) + sb.Append(h[intNumber]); + else + sb.Append(QuotedString.ToString()); + sb.Append('"'); + QuotedString = null; + } + continue; + } + + if (QuotedString == null) + sb.Append(chrC); + else + QuotedString.Append(chrC); + } + return sb.ToString(); + } + + private string MakeGlobalAndLocal(string strC) + { + Regex regexDefault = new Regex(@"^\s*(default)\W", + RegexOptions.IgnorePatternWhitespace + | RegexOptions.Multiline + | RegexOptions.Compiled); + + Match matchDefault = regexDefault.Match(strC); + + string strGlobal; + int intDefaultIndex; + if (matchDefault.Groups.Count == 2) + { + States.Add("default"); + intDefaultIndex = matchDefault.Groups[1].Index; + strGlobal = CorrectGlobal(strC.Substring(0, intDefaultIndex)); + } + else + { + intDefaultIndex = 0; + strGlobal = ""; + } + return "class GlobalClass : SecondLife\n{\n" + strGlobal + "}\n" + strC.Substring(intDefaultIndex); + } + + private string Capitalize(string strC, string strName) + { + Regex regex = new Regex(@"(\W)"+strName+@"(\W)", + RegexOptions.IgnorePatternWhitespace + | RegexOptions.Multiline + | RegexOptions.Compiled); + string strCap = strName[0].ToString().ToUpper() + strName.Substring(1); + return regex.Replace(strC, "$1"+strCap+"$2"); + } + + private string RemoveSingleQuotes(string strC) + { + if (Properties.Settings.Default.SingleQuote) + return strC.Replace("'", ""); + else + return strC; + } + + /// + /// This Class translates LSL script into CSharp code + /// + /// LSL scripting code + /// CSHarp code + public string Parse(string strLSLCode) + { + List quotedStrings; + + string strGlobalClass = "GlobalClass"; + + string strC = strLSLCode; + + strC = RemoveComments(strC); + + strC = RemoveQuotedStrings(strC, out quotedStrings); + + strC = RemoveSingleQuotes(strC); + + strC = PreCorrectReservedWords(strC); // Experimental + + strC = MakeGlobalAndLocal(strC); + + strC = CorrectJump(strC); + strC = CorrectEvents(strC); + + strC = Capitalize(strC, "float"); + strC = Capitalize(strC, "string"); // llList2string is also translated + + strC = CorrectStates(strC, strGlobalClass); + + strC = CorrectReservedWords(strC); // Experimental + + strC = CorrectRotation(strC); + strC = CorrectQuaternion(strC); + strC = CorrectVector(strC); + strC = CorrectLists(strC); + + strC = InsertQuotedStrings(strC, quotedStrings); + + return strC; + } + } + + +} diff --git a/Helpers/Measure.cs b/Helpers/Measure.cs new file mode 100644 index 0000000..d292556 --- /dev/null +++ b/Helpers/Measure.cs @@ -0,0 +1,70 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.Drawing; + +namespace LSLEditor.Helpers +{ + class Measure + { + public static RectangleF MeasureDisplayString(System.Windows.Forms.Control control, string text, Font font) + { + Graphics graphics = control.CreateGraphics(); + RectangleF rect = MeasureDisplayString(graphics, text, font); + graphics.Dispose(); + return rect; + } + + public static RectangleF MeasureDisplayString(Graphics graphics, string text, Font font) + { + StringFormat format = new StringFormat(); + RectangleF rect = new RectangleF(0, 0, 4096, 4096); + CharacterRange[] ranges = { new CharacterRange(0, text.Length) }; + Region[] regions = new Region[1]; + format.SetMeasurableCharacterRanges(ranges); + regions = graphics.MeasureCharacterRanges(text, font, rect, format); + return regions[0].GetBounds(graphics); + } + } +} diff --git a/Helpers/OopsFormatter.cs b/Helpers/OopsFormatter.cs new file mode 100644 index 0000000..b6bc088 --- /dev/null +++ b/Helpers/OopsFormatter.cs @@ -0,0 +1,66 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.IO; +using System.Text; + +namespace LSLEditor +{ + class OopsFormatter + { + public static string ApplyFormatting(string strInput) + { + strInput = strInput.Replace("SecondLifeHost.", ""); + strInput = strInput.Replace("GlobalClass.", ""); + strInput = strInput.Replace("State_", ""); + strInput = strInput.Replace("LSLEditor.", ""); + strInput = strInput.Replace("SecondLife.", ""); + strInput = strInput.Replace("String", "string"); + strInput = strInput.Replace("Float", "float"); + strInput = strInput.Replace(Properties.Settings.Default.OopsRemove, ""); + + return strInput; + } + } +} diff --git a/Helpers/PrinterHelper.cs b/Helpers/PrinterHelper.cs new file mode 100644 index 0000000..86f2b0a --- /dev/null +++ b/Helpers/PrinterHelper.cs @@ -0,0 +1,703 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Printing; +using System.Globalization; +using System.Windows.Forms; + +namespace LSLEditor.Helpers +{ + /// + /// Data Grid View Printer. Print functions for a datagridview, since MS + /// didn't see fit to do it. + /// + class PrinterHelper + { + //--------------------------------------------------------------------- + // global variables + //--------------------------------------------------------------------- + #region global variables + + // the data grid view we're printing + EditForm editForm = null; + int intCharFrom; + int intCharTo; + int intCharPrint; + + // print document + PrintDocument printDoc = null; + + // print status items + int fromPage = 0; + int toPage = -1; + + // page formatting options + int pageHeight = 0; + int pageWidth = 0; + int printWidth = 0; + int CurrentPage = 0; + PrintRange printRange; + + // calculated values + private float footerHeight = 0; + private float pagenumberHeight = 0; + #endregion + + //--------------------------------------------------------------------- + // properties - settable by user + //--------------------------------------------------------------------- + #region properties + + // Title + #region title properties + + /// + /// Title for this report. Default is empty. + /// + private String title; + public String Title + { + get { return title; } + set { title = value; printDoc.DocumentName = title; } + } + + /// + /// Font for the title. Default is Tahoma, 18pt. + /// + private Font titlefont; + public Font TitleFont + { + get { return titlefont; } + set { titlefont = value; } + } + + /// + /// Foreground color for the title. Default is Black + /// + private Color titlecolor; + public Color TitleColor + { + get { return titlecolor; } + set { titlecolor = value; } + } + + /// + /// Allow the user to override the title string alignment. Default value is + /// Alignment - Near; + /// + private StringAlignment titlealignment; + public StringAlignment TitleAlignment + { + get { return titlealignment; } + set { titlealignment = value; } + } + + /// + /// Allow the user to override the title string format flags. Default values + /// are: FormatFlags - NoWrap, LineLimit, NoClip + /// + private StringFormatFlags titleformatflags; + public StringFormatFlags TitleFormatFlags + { + get { return titleformatflags; } + set { titleformatflags = value; } + } + #endregion + + // SubTitle + #region subtitle properties + + /// + /// SubTitle for this report. Default is empty. + /// + private String subtitle; + public String SubTitle + { + get { return subtitle; } + set { subtitle = value; } + } + + /// + /// Font for the subtitle. Default is Tahoma, 12pt. + /// + private Font subtitlefont; + public Font SubTitleFont + { + get { return subtitlefont; } + set { subtitlefont = value; } + } + + /// + /// Foreground color for the subtitle. Default is Black + /// + private Color subtitlecolor; + public Color SubTitleColor + { + get { return subtitlecolor; } + set { subtitlecolor = value; } + } + + /// + /// Allow the user to override the subtitle string alignment. Default value is + /// Alignment - Near; + /// + private StringAlignment subtitlealignment; + public StringAlignment SubTitleAlignment + { + get { return subtitlealignment; } + set { subtitlealignment = value; } + } + + /// + /// Allow the user to override the subtitle string format flags. Default values + /// are: FormatFlags - NoWrap, LineLimit, NoClip + /// + private StringFormatFlags subtitleformatflags; + public StringFormatFlags SubTitleFormatFlags + { + get { return subtitleformatflags; } + set { subtitleformatflags = value; } + } + #endregion + + // Footer + #region footer properties + + /// + /// footer for this report. Default is empty. + /// + private String footer; + public String Footer + { + get { return footer; } + set { footer = value; } + } + + /// + /// Font for the footer. Default is Tahoma, 10pt. + /// + private Font footerfont; + public Font FooterFont + { + get { return footerfont; } + set { footerfont = value; } + } + + /// + /// Foreground color for the footer. Default is Black + /// + private Color footercolor; + public Color FooterColor + { + get { return footercolor; } + set { footercolor = value; } + } + + /// + /// Allow the user to override the footer string alignment. Default value is + /// Alignment - Center; + /// + private StringAlignment footeralignment; + public StringAlignment FooterAlignment + { + get { return footeralignment; } + set { footeralignment = value; } + } + + /// + /// Allow the user to override the footer string format flags. Default values + /// are: FormatFlags - NoWrap, LineLimit, NoClip + /// + private StringFormatFlags footerformatflags; + public StringFormatFlags FooterFormatFlags + { + get { return footerformatflags; } + set { footerformatflags = value; } + } + + private float footerspacing; + public float FooterSpacing + { + get { return footerspacing; } + set { footerspacing = value; } + } + #endregion + + // Page Numbering + #region page number properties + + /// + /// Include page number in the printout. Default is true. + /// + private bool pageno = true; + public bool PageNumbers + { + get { return pageno; } + set { pageno = value; } + } + + /// + /// Font for the page number, Default is Tahoma, 8pt. + /// + private Font pagenofont; + public Font PageNumberFont + { + get { return pagenofont; } + set { pagenofont = value; } + } + + /// + /// Text color (foreground) for the page number. Default is Black + /// + private Color pagenocolor; + public Color PageNumberColor + { + get { return pagenocolor; } + set { pagenocolor = value; } + } + + /// + /// Allow the user to override the page number string alignment. Default value is + /// Alignment - Near; + /// + private StringAlignment pagenumberalignment; + public StringAlignment PaageNumberAlignment + { + get { return pagenumberalignment; } + set { pagenumberalignment = value; } + } + + /// + /// Allow the user to override the pagenumber string format flags. Default values + /// are: FormatFlags - NoWrap, LineLimit, NoClip + /// + private StringFormatFlags pagenumberformatflags; + public StringFormatFlags PageNumberFormatFlags + { + get { return pagenumberformatflags; } + set { pagenumberformatflags = value; } + } + + /// + /// Allow the user to select whether to have the page number at the top or bottom + /// of the page. Default is false: page numbers on the bottom of the page + /// + private bool pagenumberontop = false; + public bool PageNumberInHeader + { + get { return pagenumberontop; } + set { pagenumberontop = value; } + } + + /// + /// Should the page number be printed on a separate line, or printed on the + /// same line as the header / footer? Default is false; + /// + private bool pagenumberonseparateline = false; + public bool PaageNumberOnSeparateLine + { + get { return pagenumberonseparateline; } + set { pagenumberonseparateline = value; } + } + + + #endregion + + // Page Level Properties + #region page level properties + + /// + /// Page margins override. Default is (60, 60, 60, 60) + /// + private Margins printmargins; + public Margins PrintMargins + { + get { return printmargins; } + set { printmargins = value; } + } + + #endregion + + #endregion + + /// + /// Constructor for PrinterHelper + /// + public PrinterHelper(PageSetupDialog pageSetupDialog) + { + // create print document + printDoc = new PrintDocument(); + printDoc.PrintPage += new PrintPageEventHandler(printDoc_PrintPage); + + if (pageSetupDialog.PrinterSettings != null) + printDoc.PrinterSettings = pageSetupDialog.PrinterSettings; + + if (pageSetupDialog.PageSettings != null) + printDoc.DefaultPageSettings = pageSetupDialog.PageSettings; + else + printDoc.DefaultPageSettings.Margins = new Margins(60, 80, 40, 40); + + printmargins = printDoc.DefaultPageSettings.Margins; + + // set default fonts + pagenofont = new Font("Tahoma", 8, FontStyle.Regular, GraphicsUnit.Point); + pagenocolor = Color.Black; + titlefont = new Font("Tahoma", 8, FontStyle.Bold, GraphicsUnit.Point); + titlecolor = Color.Black; + subtitlefont = new Font("Tahoma", 8, FontStyle.Regular, GraphicsUnit.Point); + subtitlecolor = Color.Black; + footerfont = new Font("Tahoma", 8, FontStyle.Regular, GraphicsUnit.Point); + footercolor = Color.Black; + + // set default string formats + titlealignment = StringAlignment.Near; + titleformatflags = StringFormatFlags.NoWrap | StringFormatFlags.LineLimit | StringFormatFlags.NoClip; + + subtitlealignment = StringAlignment.Near; + subtitleformatflags = StringFormatFlags.NoWrap | StringFormatFlags.LineLimit | StringFormatFlags.NoClip; + + footeralignment = StringAlignment.Near; + footerformatflags = StringFormatFlags.NoWrap | StringFormatFlags.LineLimit | StringFormatFlags.NoClip; + + pagenumberalignment = StringAlignment.Center; + pagenumberformatflags = StringFormatFlags.NoWrap | StringFormatFlags.LineLimit | StringFormatFlags.NoClip; + } + + /// + /// Start the printing process, print to a printer. + /// + /// The EditForm to print + /// NOTE: Any changes to this method also need to be done in PrintPreviewEditForm + public void PrintEditForm(EditForm editForm) + { + // save the datagridview we're printing + this.editForm = editForm; + this.intCharFrom = 0; + this.intCharPrint = 0; + this.intCharTo = editForm.TextBox.Text.Length; + + // create new print dialog + PrintDialog pd = new PrintDialog(); + pd.Document = printDoc; + //printDoc.DefaultPageSettings.Margins = printmargins; + pd.AllowSelection = true; + pd.AllowSomePages = false; + pd.AllowCurrentPage = false; + pd.AllowPrintToFile = false; + + // show print dialog + if (DialogResult.OK == pd.ShowDialog()) + { + SetupPrint(pd); + printDoc.Print(); + } + } + + /// + /// Start the printing process, print to a print preview dialog + /// + /// The EditForm to print + /// NOTE: Any changes to this method also need to be done in PrintDataGridView + public void PrintPreviewEditForm(EditForm editForm) + { + // save the datagridview we're printing + this.editForm = editForm; + this.intCharFrom = 0; + this.intCharTo = editForm.TextBox.Text.Length; + + // create new print dialog and set options + PrintDialog pd = new PrintDialog(); + pd.Document = printDoc; + //printDoc.DefaultPageSettings.Margins = printmargins; + pd.AllowSelection = true; + pd.AllowSomePages = false; + pd.AllowCurrentPage = false; + pd.AllowPrintToFile = false; + + // show print dialog + if (DialogResult.OK == pd.ShowDialog()) + { + SetupPrint(pd); + PrintPreviewDialog ppdialog = new PrintPreviewDialog(); + ppdialog.Document = printDoc; + ppdialog.ShowDialog(); + } + } + + /// + /// Set up the print job. Save information from print dialog + /// and print document for easy access. Also sets up the rows + /// and columns that will be printed. + /// + /// The print dialog the user just filled out + void SetupPrint(PrintDialog pd) + { + //----------------------------------------------------------------- + // save data from print dialog and document + //----------------------------------------------------------------- + + // check to see if we're doing landscape printing + if (printDoc.DefaultPageSettings.Landscape) + { + // landscape: switch width and height + pageHeight = printDoc.DefaultPageSettings.PaperSize.Width; + pageWidth = printDoc.DefaultPageSettings.PaperSize.Height; + } + else + { + // portrait: keep width and height as expected + pageHeight = printDoc.DefaultPageSettings.PaperSize.Height; + pageWidth = printDoc.DefaultPageSettings.PaperSize.Width; + } + + // save printer margins and calc print width + printmargins = printDoc.DefaultPageSettings.Margins; + printWidth = pageWidth - printmargins.Left - printmargins.Right; + + // save print range + printRange = pd.PrinterSettings.PrintRange; + + // pages to print handles "some pages" option + if (PrintRange.SomePages == printRange) + { + // set limits to only print some pages + fromPage = pd.PrinterSettings.FromPage; + toPage = pd.PrinterSettings.ToPage; + } + else + { + // set extremes so that we'll print all pages + fromPage = 0; + toPage = 2147483647; + } + + //----------------------------------------------------------------- + // set up the pages to print + //----------------------------------------------------------------- + + // pages (handles "selection" and "current page" options + if (PrintRange.Selection == printRange) + { + intCharPrint = this.editForm.TextBox.SelectionStart; + intCharFrom = intCharPrint; + intCharTo = intCharFrom + this.editForm.TextBox.SelectionLength; + } + else if (PrintRange.CurrentPage == printRange) + { + } + // this is the default for print all + else + { + intCharPrint = 0; + intCharFrom = intCharPrint; + intCharTo = this.editForm.TextBox.Text.Length; + } + } + + /// + /// Centralize the string format settings. Does the work of checking for user + /// overrides, and if they're not present, setting the cell alignment to match + /// (somewhat) the source control's string alignment. + /// + /// String alignment + /// String format flags + /// DataGridView style to apply (if available) + /// True if user overrode alignment or flags + /// + private static StringFormat managestringformat(StringAlignment alignment, StringFormatFlags flags) + { + // start with the provided + StringFormat format = new StringFormat(); + format.Trimming = StringTrimming.Word; + format.Alignment = alignment; + format.FormatFlags = flags; + + return format; + } + + /// + /// PrintPage event handler. This routine prints one page. It will + /// skip non-printable pages if the user selected the "some pages" option + /// on the print dialog. + /// + /// default object from windows + /// Event info from Windows about the printing + private void printDoc_PrintPage(object sender, PrintPageEventArgs e) + { + // adjust printing region, make space for headers and footers + Rectangle rect = new Rectangle( + e.MarginBounds.Left, + e.MarginBounds.Top + e.MarginBounds.Top, + e.MarginBounds.Width, + e.MarginBounds.Height - e.MarginBounds.Top - e.MarginBounds.Top); + PrintPageEventArgs ee = new PrintPageEventArgs(e.Graphics, rect, e.PageBounds, e.PageSettings); + // Print the content of RichTextBox. Store the last character printed. + intCharFrom = editForm.TextBox.Print(intCharFrom, intCharTo, ee); + + // increment page number & check page range + CurrentPage++; + + //----------------------------------------------------------------- + // print headers + //----------------------------------------------------------------- + + // reset printpos as it may have changed during the 'skip pages' routine just above. + float printpos = printmargins.Top; + + // print page number if user selected it + if (pagenumberontop) + { + // if we have a page number to print + if (pageno) + { + // ... then print it + printsection(e.Graphics, ref printpos, "Page " + CurrentPage.ToString(CultureInfo.CurrentCulture), + pagenofont, pagenocolor, pagenumberalignment, pagenumberformatflags); + + // if the page number is not on a separate line, don't "use up" it's vertical space + if (!pagenumberonseparateline) + printpos -= pagenumberHeight; + } + } + + // print title if provided + if (!String.IsNullOrEmpty(title)) + printsection(e.Graphics, ref printpos, title, titlefont, + titlecolor, titlealignment, titleformatflags); + + // print subtitle if provided + if (!String.IsNullOrEmpty(subtitle)) + printsection(e.Graphics, ref printpos, subtitle, subtitlefont, + subtitlecolor, subtitlealignment, subtitleformatflags); + + //----------------------------------------------------------------- + // print footer + //----------------------------------------------------------------- + printfooter(e.Graphics, ref printpos); + + // Check for more pages + if (intCharFrom < intCharTo) + e.HasMorePages = true; + else + { + intCharFrom = intCharPrint; // reset + CurrentPage = 0; + e.HasMorePages = false; + } + + } + + /// + /// Print a header or footer section. Used for page numbers and titles + /// + /// Graphic context to print in + /// Track vertical space used; 'y' location + /// String to print + /// Font to use for printing + /// Color to print in + /// Alignment - print to left, center or right + /// String format flags + /// True if the user overrode the alignment or flags + private void printsection(Graphics g, ref float pos, string text, + Font font, Color color, StringAlignment alignment, StringFormatFlags flags) + { + // string formatting setup + StringFormat printformat = managestringformat(alignment, flags); + + // measure string + SizeF printsize = g.MeasureString(text, font, printWidth, printformat); + + // build area to print within + RectangleF printarea = new RectangleF((float)printmargins.Left, pos, (float)printWidth, + printsize.Height); + + // do the actual print + g.DrawString(text, font, new SolidBrush(color), printarea, printformat); + + // track "used" vertical space + pos += printsize.Height; + } + + /// + /// Print the footer. This handles the footer spacing, and printing the page number + /// at the bottom of the page (if the page number is not in the header). + /// + /// Graphic context to print in + /// Track vertical space used; 'y' location + private void printfooter(Graphics g, ref float pos) + { + // print last footer. Note: need to force printpos to the bottom of the page + // as we may have run out of data anywhere on the page + pos = pageHeight - footerHeight - printmargins.Top - printmargins.Bottom; + + // add spacing + pos += footerspacing; + + // print the footer + printsection(g, ref pos, footer, footerfont, + footercolor, footeralignment, footerformatflags); + + // print the page number if it's on the bottom. + if (!pagenumberontop) + { + if (pageno) + { + pagenumberHeight = g.MeasureString("M", pagenofont).Height; + // if the pageno is not on a separate line, push the print location up by its height. + if (!pagenumberonseparateline) + pos = pos - pagenumberHeight; + + // print the page number + printsection(g, ref pos, "Page " + CurrentPage.ToString(CultureInfo.CurrentCulture), + pagenofont, pagenocolor, pagenumberalignment, pagenumberformatflags); + + } + } + } + } +} diff --git a/Helpers/SendMyKeys.cs b/Helpers/SendMyKeys.cs new file mode 100644 index 0000000..b2e7e4f --- /dev/null +++ b/Helpers/SendMyKeys.cs @@ -0,0 +1,273 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.Text; +using System.Threading; +using System.Diagnostics; +using System.Collections.Generic; +using System.Runtime.InteropServices; + +using System.Windows.Forms; + +namespace NativeHelper +{ + public class NativeWIN32 + { + public const ushort KEYEVENTF_KEYUP = 0x0002; + + public struct KEYBDINPUT + { + public ushort wVk; + public ushort wScan; + public uint dwFlags; + public long time; + public uint dwExtraInfo; + } + + [StructLayout(LayoutKind.Explicit, Size = 28)] + public struct INPUT + { + [FieldOffset(0)] + public uint type; + [FieldOffset(4)] + public KEYBDINPUT ki; + } + + [DllImport("user32.dll")] + public static extern uint SendInput(uint nInputs, ref INPUT pInputs, int cbSize); + + [DllImport("user32.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + public static extern bool SetForegroundWindow(IntPtr hWnd); + } + + public class SendMyKeys + { + public static void PasteTextToApp(string strText,string strAppName, string strTitle) + { + foreach (Process p in Process.GetProcessesByName(strAppName)) + { + if(strTitle!=null) + if (p.MainWindowTitle.IndexOf(strTitle) < 0) + continue; + NativeWIN32.SetForegroundWindow(p.MainWindowHandle); + Thread.Sleep(5000); + SendMyKeys.SendString(strText); + return; + } + } + + public static void ClipBoardToApp(string strAppName, string strTitle) + { + foreach (Process p in Process.GetProcessesByName(strAppName)) + { + if (strTitle != null) + if (p.MainWindowTitle.IndexOf(strTitle) < 0) + continue; + NativeWIN32.SetForegroundWindow(p.MainWindowHandle); + Thread.Sleep(1000); + SendMyKeys.SendChar((ushort)Keys.V,false,true); + return; + } + } + + public static void SendChar(ushort wVk, bool ShiftKey, bool ControlKey) + { + uint uintReturn; + + NativeWIN32.INPUT structInput = new NativeWIN32.INPUT(); + structInput.type = (uint)1; + structInput.ki.wScan = 0; + structInput.ki.time = 0; + structInput.ki.dwFlags = 0; + structInput.ki.dwExtraInfo = 0; + + if (ControlKey) + { + structInput.ki.wVk = (ushort)Keys.ControlKey; + uintReturn = NativeWIN32.SendInput((uint)1, ref structInput, Marshal.SizeOf(structInput)); + } + + if (ShiftKey) + { + structInput.ki.wVk = (ushort)Keys.ShiftKey; + uintReturn = NativeWIN32.SendInput((uint)1, ref structInput, Marshal.SizeOf(structInput)); + } + + structInput.ki.wVk = wVk; + uintReturn = NativeWIN32.SendInput((uint)1, ref structInput, Marshal.SizeOf(structInput)); + + structInput.ki.dwFlags = NativeWIN32.KEYEVENTF_KEYUP; + structInput.ki.wVk = wVk; + uintReturn = NativeWIN32.SendInput((uint)1, ref structInput, Marshal.SizeOf(structInput)); + + if (ShiftKey) + { + structInput.ki.dwFlags = NativeWIN32.KEYEVENTF_KEYUP; + structInput.ki.wVk = (ushort)Keys.ShiftKey; + uintReturn = NativeWIN32.SendInput((uint)1, ref structInput, Marshal.SizeOf(structInput)); + } + + if (ControlKey) + { + structInput.ki.dwFlags = NativeWIN32.KEYEVENTF_KEYUP; + structInput.ki.wVk = (ushort)Keys.ControlKey; + uintReturn = NativeWIN32.SendInput((uint)1, ref structInput, Marshal.SizeOf(structInput)); + } + } + + public static void SendString(string s) + { + ushort wVk; + bool ShiftKey; + foreach (Char c in s.ToCharArray()) + { + if (Char.IsUpper(c)) + ShiftKey = true; + else + ShiftKey = false; + + wVk = (ushort)Char.ToUpper(c); + + string special = ")!@#$%^&*("; + + int intDigit = special.IndexOf(c); + if (intDigit >= 0) + { + ShiftKey = true; + wVk = (ushort)('0' + intDigit); + } + else + { + switch (c) + { + case ':': + ShiftKey = true; + wVk = (ushort)Keys.Oem1; + break; + case ';': + wVk = (ushort)Keys.Oem1; + break; + case '-': + wVk = (ushort)Keys.OemMinus; + break; + case '_': + ShiftKey = true; + wVk = (ushort)Keys.OemMinus; + break; + case '+': + ShiftKey = true; + wVk = (ushort)Keys.Oemplus; + break; + case '=': + wVk = (ushort)Keys.Oemplus; + break; + case '/': + wVk = (ushort)Keys.Oem2; + break; + case '?': + ShiftKey = true; + wVk = (ushort)Keys.OemQuestion; + break; + case '.': + wVk = (ushort)Keys.OemPeriod; + break; + case '>': + ShiftKey = true; + wVk = (ushort)Keys.OemPeriod; + break; + case ',': + wVk = (ushort)Keys.Oemcomma; + break; + case '<': + ShiftKey = true; + wVk = (ushort)Keys.Oemcomma; + break; + case '`': + wVk = (ushort)Keys.Oemtilde; + break; + case '~': + ShiftKey = true; + wVk = (ushort)Keys.Oemtilde; + break; + case '|': + ShiftKey = true; + wVk = (ushort)Keys.Oem5; + break; + case '\\': + wVk = (ushort)Keys.Oem5; + break; + case '[': + wVk = (ushort)Keys.OemOpenBrackets; + break; + case '{': + ShiftKey = true; + wVk = (ushort)Keys.OemOpenBrackets; + break; + case ']': + wVk = (ushort)Keys.Oem6; + break; + case '}': + ShiftKey = true; + wVk = (ushort)Keys.Oem6; + break; + case '\'': + wVk = (ushort)Keys.Oem7; + break; + case '"': + ShiftKey = true; + wVk = (ushort)Keys.Oem7; + break; + default: + break; + } + } + + SendChar(wVk, ShiftKey, false); + + } + } + } + +} diff --git a/Helpers/Settings.cs b/Helpers/Settings.cs new file mode 100644 index 0000000..f083f7e --- /dev/null +++ b/Helpers/Settings.cs @@ -0,0 +1,71 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +namespace LSLEditor.Properties { + + + // This class allows you to handle specific events on the settings class: + // The SettingChanging event is raised before a setting's value is changed. + // The PropertyChanged event is raised after a setting's value is changed. + // The SettingsLoaded event is raised after the setting values are loaded. + // The SettingsSaving event is raised before the setting values are saved. + internal sealed partial class Settings { + + public Settings() { + // // To add event handlers for saving and changing settings, uncomment the lines below: + // + // this.SettingChanging += this.SettingChangingEventHandler; + // + // this.SettingsSaving += this.SettingsSavingEventHandler; + // + } + + private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) { + // Add code to handle the SettingChangingEvent event here. + } + + private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) { + // Add code to handle the SettingsSaving event here. + } + } +} diff --git a/Helpers/SmtpClient.cs b/Helpers/SmtpClient.cs new file mode 100644 index 0000000..b5dffbf --- /dev/null +++ b/Helpers/SmtpClient.cs @@ -0,0 +1,355 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.IO; +using System.Net; +using System.Text; +using System.Net.Sockets; +using System.Collections; + +namespace LSLEditor +{ + public class MailAttachment + { + public string Filename; + public MailAttachment(string strAttachmentFile) + { + this.Filename = strAttachmentFile; + } + } + + public class MailMessage + { + public string Body; + public string From; + public string To; + public string Cc; + public string Bcc; + public string Subject; + public Hashtable Headers; + public ArrayList Attachments; + + public MailMessage() + { + this.Headers = new Hashtable(); + this.Attachments = new ArrayList(); + } + } + + /// + /// provides methods to send email via smtp direct to mail server + /// http://www.ietf.org/rfc/rfc0821.txt + /// + public class SmtpClient + { + /// + /// Get / Set the name of the SMTP mail server + /// + public string SmtpServer; + private enum SMTPResponse: int + { + CONNECT_SUCCESS = 220, + GENERIC_SUCCESS = 250, + DATA_SUCCESS = 354, + QUIT_SUCCESS = 221, + + AUTH_SUCCESS = 334, + AUTH_GRANTED = 235 + } + + public string Send(MailMessage message) + { + string strResponse; + byte[] data; + IPHostEntry IPhst; + try + { + IPhst = Dns.GetHostEntry(SmtpServer); + } + catch (Exception exception) + { + return "Email:Error on "+exception.Message; + } + IPEndPoint endPt = new IPEndPoint(IPhst.AddressList[0], 25); + Socket s= new Socket(endPt.AddressFamily, SocketType.Stream,ProtocolType.Tcp); + s.Connect(endPt); + + if(!Check_Response(s, SMTPResponse.CONNECT_SUCCESS, out strResponse)) + { + s.Close(); + return "Email:Error on connection (" + strResponse + ")"; + } + + Senddata(s, string.Format("HELO {0}\r\n", Dns.GetHostName() )); + if (!Check_Response(s, SMTPResponse.GENERIC_SUCCESS, out strResponse)) + { + s.Close(); + return "Email:Error on HELO (" + strResponse + ")"; + } + + // SMTP Authentication + if (Properties.Settings.Default.SmtpUserid != "") + { + if (Properties.Settings.Default.SmtpAuth == "PLAIN") + { + Senddata(s, "AUTH PLAIN\r\n"); + if (!Check_Response(s, SMTPResponse.AUTH_SUCCESS, out strResponse)) + { + s.Close(); + return "Email: Error on AUTH PLAIN (" + strResponse + ")"; + } + data = Encoding.ASCII.GetBytes(string.Format("\0{0}\0{1}", + Properties.Settings.Default.SmtpUserid, + Properties.Settings.Default.SmtpPassword)); + Senddata(s, string.Format("{0}\r\n",Convert.ToBase64String(data))); + if (!Check_Response(s, SMTPResponse.AUTH_GRANTED, out strResponse)) + { + s.Close(); + return "Email: AUTH PLAIN not granted (" + strResponse + ")"; + } + } + if (Properties.Settings.Default.SmtpAuth == "LOGIN") + { + Senddata(s, "AUTH LOGIN\r\n"); + if (!Check_Response(s, SMTPResponse.AUTH_SUCCESS, out strResponse)) + { + s.Close(); + return "Email: Error on AUTH LOGIN (" + strResponse + ")"; + } + data = Encoding.ASCII.GetBytes(Properties.Settings.Default.SmtpUserid); + Senddata(s, string.Format("{0}\r\n", Convert.ToBase64String(data))); + if (!Check_Response(s, SMTPResponse.AUTH_SUCCESS, out strResponse)) + { + s.Close(); + return "Email: AUTH LOGIN userid error (" + strResponse + ")"; + } + data = Encoding.ASCII.GetBytes(Properties.Settings.Default.SmtpPassword); + Senddata(s, string.Format("{0}\r\n", Convert.ToBase64String(data))); + if (!Check_Response(s, SMTPResponse.AUTH_GRANTED, out strResponse)) + { + s.Close(); + return "Email: AUTH LOGIN not granted (" + strResponse + ")"; + } + } + if (Properties.Settings.Default.SmtpAuth == "CRAM-MD5") + { + s.Close(); + return "Email: LSLEditor Not Implemented CRAM-MD5"; + + } + if (Properties.Settings.Default.SmtpAuth == "DIGEST-MD5") + { + s.Close(); + return "Email: LSLEditor Not Implemented DIGEST-MD5"; + } + if (Properties.Settings.Default.SmtpAuth == "EXTERNAL") + { + s.Close(); + return "Email: LSLEditor Not Implemented EXTERNAL"; + } + if (Properties.Settings.Default.SmtpAuth == "ANONYMOUS") + { + s.Close(); + return "Email: LSLEditor Not Implemented ANONYMOUS"; + } + } + + Senddata(s, string.Format("MAIL From: {0}\r\n", message.From )); + if (!Check_Response(s, SMTPResponse.GENERIC_SUCCESS, out strResponse)) + { + s.Close(); + return "Email: Error on MAIL From (" + strResponse + ")"; + } + + string _To = message.To; + string[] Tos= _To.Split(new char[] {';'}); + foreach (string To in Tos) + { + Senddata(s, string.Format("RCPT TO: {0}\r\n", To)); + if (!Check_Response(s, SMTPResponse.GENERIC_SUCCESS, out strResponse)) + { + s.Close(); + return "Email: Error on RCPT TO (" + strResponse + ")"; + } + } + + if(message.Cc!=null) + { + Tos= message.Cc.Split(new char[] {';'}); + foreach (string To in Tos) + { + Senddata(s, string.Format("RCPT TO: {0}\r\n", To)); + if (!Check_Response(s, SMTPResponse.GENERIC_SUCCESS, out strResponse)) + { + s.Close(); + return "Email: Error on (CC) RCPT TO (" + strResponse + ")"; + } + } + } + + StringBuilder Header=new StringBuilder(); + Header.Append("From: " + message.From + "\r\n"); + Tos= message.To.Split(new char[] {';'}); + Header.Append("To: "); + for( int i=0; i< Tos.Length; i++) + { + Header.Append( i > 0 ? "," : "" ); + Header.Append(Tos[i]); + } + Header.Append("\r\n"); + if(message.Cc!=null) + { + Tos= message.Cc.Split(new char[] {';'}); + Header.Append("Cc: "); + for( int i=0; i< Tos.Length; i++) + { + Header.Append( i > 0 ? "," : "" ); + Header.Append(Tos[i]); + } + Header.Append("\r\n"); + } + Header.Append("Date: " + DateTime.Now.ToString("R" ) + "\r\n"); + Header.Append("Subject: " + message.Subject+ "\r\n"); + Header.Append("X-Mailer: SMTPClient v2.36 (LSL-Editor)\r\n" ); + // escape . on newline + + string MsgBody = message.Body.Replace("\n.","\n.."); + if(!MsgBody.EndsWith("\r\n")) + MsgBody+="\r\n"; + if(message.Attachments.Count>0) + { + Header.Append( "MIME-Version: 1.0\r\n" ); + Header.Append( "Content-Type: multipart/mixed; boundary=unique-boundary-1\r\n" ); + Header.Append("\r\n"); + Header.Append( "This is a multi-part message in MIME format.\r\n" ); + StringBuilder sb = new StringBuilder(); + sb.Append("--unique-boundary-1\r\n"); + sb.Append("Content-Type: text/plain\r\n"); + sb.Append("Content-Transfer-Encoding: 7Bit\r\n"); + sb.Append("\r\n"); + sb.Append(MsgBody + "\r\n"); + sb.Append("\r\n"); + + foreach(object o in message.Attachments) + { + MailAttachment a = o as MailAttachment; + byte[] binaryData; + if(a!=null) + { + FileInfo f = new FileInfo(a.Filename); + sb.Append("--unique-boundary-1\r\n"); + sb.Append("Content-Type: application/octet-stream; file=" + f.Name + "\r\n"); + sb.Append("Content-Transfer-Encoding: base64\r\n"); + sb.Append("Content-Disposition: attachment; filename=" + f.Name + "\r\n"); + sb.Append("\r\n"); + FileStream fs = f.OpenRead(); + binaryData = new Byte[fs.Length]; + long bytesRead = fs.Read(binaryData, 0, (int)fs.Length); + fs.Close(); + string base64String = System.Convert.ToBase64String(binaryData, 0,binaryData.Length); + + for(int i=0; i< base64String.Length ; ) + { + int nextchunk=100; + if(base64String.Length - (i + nextchunk ) <0) + nextchunk = base64String.Length -i; + sb.Append(base64String.Substring(i, nextchunk)); + sb.Append("\r\n"); + i+=nextchunk; + + } + sb.Append("\r\n"); + } + } + MsgBody=sb.ToString(); + } + + Senddata(s, ("DATA\r\n")); + if (!Check_Response(s, SMTPResponse.DATA_SUCCESS, out strResponse)) + { + s.Close(); + return "Email:Error on DATA (" + strResponse + ")"; + } + Header.Append( "\r\n" ); + Header.Append( MsgBody); + Header.Append("\r\n.\r\n"); + Senddata(s, Header.ToString()); + if (!Check_Response(s, SMTPResponse.GENERIC_SUCCESS, out strResponse)) + { + s.Close(); + return "Email:Error on message body (" + strResponse + ")"; + } + + Senddata(s, "QUIT\r\n"); + if (!Check_Response(s, SMTPResponse.QUIT_SUCCESS, out strResponse)) + { + s.Close(); + return "Email:Error on QUIT (" + strResponse + ")"; + } + s.Close(); + return "Email: Succes :-)"; + } + private void Senddata(Socket s, string msg) + { + byte[] _msg = Encoding.ASCII.GetBytes(msg); + s.Send(_msg , 0, _msg .Length, SocketFlags.None); + } + private bool Check_Response(Socket s, SMTPResponse response_expected, out string sResponse) + { + byte[] bytes = new byte[1024]; + while (s.Available==0) + { + System.Threading.Thread.Sleep(100); + } + + int intCount = s.Receive(bytes, 0, s.Available, SocketFlags.None); + sResponse = Encoding.ASCII.GetString(bytes,0,intCount); + int response = Convert.ToInt32(sResponse.Substring(0,3)); + if(response != (int)response_expected) + return false; + return true; + } + } +} + diff --git a/Helpers/TabControlExtended.Designer.cs b/Helpers/TabControlExtended.Designer.cs new file mode 100644 index 0000000..cae4121 --- /dev/null +++ b/Helpers/TabControlExtended.Designer.cs @@ -0,0 +1,28 @@ +namespace System.Windows.Forms +{ + partial class TabControlExtended + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/Helpers/TabControlExtended.cs b/Helpers/TabControlExtended.cs new file mode 100644 index 0000000..c5fb659 --- /dev/null +++ b/Helpers/TabControlExtended.cs @@ -0,0 +1,249 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.Drawing; +using System.ComponentModel; +using System.Windows.Forms; +using System.Windows.Forms.VisualStyles; + +namespace System.Windows.Forms +{ + public partial class TabControlExtended : System.Windows.Forms.TabControl + { + private int HoverIndex; + private bool Extended; + + public event EventHandler OnTabClose; + + public TabControlExtended() + { + InitializeComponent(); + } + + public TabControlExtended(IContainer container) + { + InitializeComponent(); + + container.Add(this); + } + + public void SetDrawMode() + { + try + { + HoverIndex = 0; + VisualStyleRenderer render = new VisualStyleRenderer(VisualStyleElement.Tab.Pane.Normal); + this.DrawMode = TabDrawMode.OwnerDrawFixed; + this.SetStyle(ControlStyles.UserPaint, true); + this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); + this.SetStyle(ControlStyles.DoubleBuffer, true); + this.SetStyle(ControlStyles.ResizeRedraw, true); + this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); + this.Extended = true; + } + catch + { + this.Extended = false; + this.DrawMode = TabDrawMode.Normal; + } + } + +/* +protected override bool ProcessMnemonic(char charCode) +{ + foreach (TabPage p in this.TabPages) + { + if (Control.IsMnemonic(charCode, p.Text)) + { + this.SelectedTab = p; + this.Focus(); + return true; + } + } + return false; +} +*/ + + protected override void OnPaint(PaintEventArgs e) + { + base.OnPaint(e); + if (!this.Extended) + return; + MyPaint(e); + } + + protected override void OnSelectedIndexChanged(EventArgs e) + { + this.HoverIndex = -1; + base.OnSelectedIndexChanged(e); + } + + private void MyPaint(PaintEventArgs e) + { + if (!this.Visible) + return; + + Graphics g = e.Graphics; + + Rectangle displayRectangle = this.DisplayRectangle; + + Size borderSize = SystemInformation.Border3DSize; + displayRectangle.Inflate(borderSize.Width << 1, borderSize.Height << 1); + + VisualStyleRenderer render = new VisualStyleRenderer(VisualStyleElement.Tab.Pane.Normal); + + render.DrawBackground(g, displayRectangle); + + for (int intI = 0; intI < this.TabCount; intI++) + if (intI != this.SelectedIndex) + DrawTab(g, intI); + if (this.SelectedIndex >= 0) + DrawTab(g, this.SelectedIndex); + } + + protected override void OnMouseMove(MouseEventArgs e) + { + base.OnMouseMove(e); + if (!Extended) + return; + + Point p = e.Location; + for (int intI = 0; intI < this.TabCount; intI++) + { + Rectangle rectangle = GetTabRect(intI); + if (rectangle.Contains(p)) + { + HoverIndex = intI; + this.Invalidate(); + } + } + } + + protected override void OnMouseLeave(EventArgs e) + { + base.OnMouseLeave(e); + if (!Extended) + return; + + HoverIndex = this.SelectedIndex; + this.Invalidate(); + } + + protected override void OnMouseUp(MouseEventArgs e) + { + base.OnMouseUp(e); + if (!Extended) + return; + + Point p = e.Location; + Rectangle rectangle = this.GetTabRect(this.SelectedIndex); + if (rectangle.Contains(p)) + { + Rectangle closeImage = new Rectangle(rectangle.Right - 15 - 5, 5, 15, 15); + if (closeImage.Contains(p)) + { + if (OnTabClose != null) + OnTabClose(this.SelectedIndex, new EventArgs()); + else + this.TabPages.RemoveAt(this.SelectedIndex); + } + } + } + + private void DrawTab(Graphics g, int intIndex) + { + Font font; + Bitmap bitmap; + + Rectangle recBounds = this.GetTabRect(intIndex); + RectangleF tabTextArea = (RectangleF)this.GetTabRect(intIndex); + + TabPage tabPage = this.TabPages[intIndex]; + + Size borderSize = SystemInformation.Border3DSize; + + VisualStyleRenderer render; + if (this.SelectedIndex == intIndex) + { + font = new Font(this.Font, FontStyle.Bold); + Point p = this.PointToClient(Control.MousePosition); + Rectangle closeImage = new Rectangle(recBounds.Right - 15 - 5, 5, 15, 15); + if (closeImage.Contains(p)) + bitmap = new Bitmap(Type.GetType("LSLEditor.LSLEditorForm"), "Images.Close-Active.gif"); + else + bitmap = new Bitmap(Type.GetType("LSLEditor.LSLEditorForm"), "Images.Close-Inactive.gif"); + recBounds.X -= borderSize.Width; + recBounds.Y -= borderSize.Height; + recBounds.Width += borderSize.Width << 1; + recBounds.Height += borderSize.Height; + render = new VisualStyleRenderer(VisualStyleElement.Tab.TabItem.Pressed); + Rectangle clipper = new Rectangle(recBounds.X, recBounds.Y, recBounds.Width, recBounds.Height - 1); + render.DrawBackground(g, recBounds, clipper); + } + else + { + font = new Font(this.Font, FontStyle.Regular); + if (this.HoverIndex == intIndex) + { + render = new VisualStyleRenderer(VisualStyleElement.Tab.TopTabItem.Hot); + bitmap = new Bitmap(Type.GetType("LSLEditor.LSLEditorForm"), "Images.Close-Active.gif"); + } + else + { + render = new VisualStyleRenderer(VisualStyleElement.Tab.TabItem.Normal); + bitmap = new Bitmap(Type.GetType("LSLEditor.LSLEditorForm"), "Images.Close-Disabled.gif"); + } + recBounds.Height -= borderSize.Height; + render.DrawBackground(g, recBounds); + } + + SolidBrush br = new SolidBrush(tabPage.ForeColor); + //Console.WriteLine("["+tabPage.Text+"]"); + g.DrawString(tabPage.Text, font, br, tabTextArea.Left + 2, tabTextArea.Top + 3); + font.Dispose(); + g.DrawImage(bitmap, new Point((int)tabTextArea.Right - bitmap.Width - 5, 5)); + } + + } +} diff --git a/Helpers/TaskQueue.cs b/Helpers/TaskQueue.cs new file mode 100644 index 0000000..cf4b94e --- /dev/null +++ b/Helpers/TaskQueue.cs @@ -0,0 +1,263 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.Reflection; +using System.Collections; +using System.Diagnostics; +using System.Threading; + +// http://www.codeproject.com/csharp/messageloop.asp + +namespace LSLEditor.Helpers +{ + /// + /// Represents an object that performs a certain action asynchronously, by using an internal buffer queue + /// and one internal thread. + /// + public class TaskQueue : IDisposable + { + #region Member Variables + + /// Reference to the thread used to empty the queue + private Thread WorkerThread; + /// Internal queue that serves as buffer for required actions + private Queue Tasks; + /// Used to signal the thread when a new object is added to the queue + private AutoResetEvent SignalNewTask; + /// Flag that notifies that the object should be disposed + private bool stop; + #endregion Member Variables + + #region Constructor + + /// Creates a new buffered object + public TaskQueue() + { + WorkerThread = null; + + // Make sure the queue is synchronized. This is required because items are added to the queue + // from a different thread than the thread that empties the queue + Tasks = Queue.Synchronized(new Queue()); + + SignalNewTask = new AutoResetEvent(false); + + stop = false; + } + #endregion Ctor + + #region Public Methods + + public void Start() + { + Stop(); + + stop = false; + Tasks.Clear(); + + WorkerThread = new Thread(new ThreadStart(Worker)); + WorkerThread.IsBackground = true; + WorkerThread.Start(); + } + + public void Stop() + { + if(WorkerThread!=null) + { + WorkerThread.Abort(); + if (!WorkerThread.Join(2000)) + { + // problems + System.Windows.Forms.MessageBox.Show("TaskQueue thread not Aborted", "Oops..."); + } + WorkerThread = null; + } + } + + public void Invoke(object ActiveObject,string MethodName, params object[] args) + { + if (ActiveObject == null) + return; + try + { + // Add the object to the internal buffer + Tasks.Enqueue(new Task(ActiveObject, MethodName, args)); + + // Signal the internal thread that there is some new object in the buffer + SignalNewTask.Set(); + } + catch (Exception e) + { + Trace.WriteLine(string.Format("I An exception occurred in TaskQueue.Invoke: {0}", e.Message)); + // Since the exception was not actually handled and only logged - propagate it + throw; + } + } + #endregion Public Methods + + #region Private Methods + + /// Method executed by the internal thread to empty the queue + private void Worker() + { + Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US", false); + Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-US", false); + + while (!stop) + { + try + { + // Note: this code is safe (i.e. performing the .Count and .Dequeue not inside a lock) + // because there is only one thread emptying the queue. + // Even if .Count returns 0, and before Dequeue is called a new object is added to the Queue + // then still the system will behave nicely: the next if statement will return false and + // since this is run in an endless loop, in the next iteration we will have .Count > 0. + if (Tasks.Count > 0) + { + (Tasks.Dequeue() as Task).Execute(); + } + + // Wait until new objects are received or Dispose was called + if (Tasks.Count == 0) + { + SignalNewTask.WaitOne(); + } + } + catch (ThreadAbortException) + { + Trace.WriteLine("TaskQueue.Worker: ThreadAbortException, no problem"); + } + catch (Exception e) + { + Trace.WriteLine(string.Format("TaskQueue.Worker: {0}", e.Message)); + // Since the exception was not actually handled and only logged - propagate it + throw; + } + } + } + + #endregion Private Methods + + #region IDisposable Members and Dispose Pattern + + private bool disposed = false; + + ~TaskQueue() + { + Dispose(false); + } + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if (!this.disposed) + { + if (disposing) + { + try + { + stop = true; + SignalNewTask.Set(); + } + catch (Exception e) + { + Trace.WriteLine(string.Format("An exception occurred in MessageLoop.AddToBuffer: {0}", e.Message)); + // Since the exception was not actually handled and only logged - propagate it + throw; + } + } + this.disposed = true; + } + } + #endregion IDisposable Members and Dispose Pattern + + #region Task + /// The tasks being saved in the queue + private class Task + { + private object ActiveObject; + private object[] args; + public string MethodName; + public Task(object ActiveObject, string MethodName, params object[] args) + { + this.ActiveObject = ActiveObject; + this.MethodName = MethodName; + this.args = args; + } + + public void Execute() + { + try + { + MethodInfo mi = ActiveObject.GetType().GetMethod(MethodName, + BindingFlags.Public | + BindingFlags.Instance | + //BindingFlags.DeclaredOnly | + BindingFlags.NonPublic + ); + mi.Invoke(ActiveObject, args); + } + catch (ThreadAbortException) + { + Trace.WriteLine("TaskQueue.Task.Execute: ThreadAbortException, no problem"); + } + catch (Exception exception) + { + Exception innerException = exception.InnerException; + if (innerException == null) + innerException = exception; + string strMessage = OopsFormatter.ApplyFormatting(innerException.Message); + string strStackTrace = OopsFormatter.ApplyFormatting(innerException.StackTrace); + + System.Windows.Forms.MessageBox.Show(strMessage + "\r\n" + strStackTrace, "Oops..."); + } + } + } + #endregion Task + } +} diff --git a/Helpers/WebRequestClass.cs b/Helpers/WebRequestClass.cs new file mode 100644 index 0000000..c4cff82 --- /dev/null +++ b/Helpers/WebRequestClass.cs @@ -0,0 +1,251 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.Collections; +using System.Net; +using System.IO; +using System.Text; +using System.Threading; + +namespace LSLEditor +{ + public class RequestState + { + // This class stores the state of the request. + public SecondLife secondlife; + public SecondLife.key httpkey; + public byte[] postData; + const int BUFFER_SIZE = 1024; + public StringBuilder requestData; + public byte[] bufferRead; + public WebRequest request; + public WebResponse response; + public Stream responseStream; + public RequestState() + { + bufferRead = new byte[BUFFER_SIZE]; + requestData = new StringBuilder(""); + request = null; + responseStream = null; + postData = null; + } + } + + class WebRequestClass + { + public static ManualResetEvent allDone= new ManualResetEvent(false); + const int BUFFER_SIZE = 1024; + public WebRequestClass(WebProxy proxy, SecondLife secondlife, string strUrl, SecondLife.list parameters, string postData, SecondLife.key key) + { + try + { + // Create a new webrequest to the mentioned URL. + WebRequest myWebRequest = WebRequest.Create(strUrl); + + myWebRequest.Headers.Add("Cache-Control", "max-age=259200"); + //myWebRequest.Headers.Add("Connection", "keep-alive"); + myWebRequest.Headers.Add("Pragma", "no-cache"); + //myWebRequest.Headers.Add("Via", "1.1 sim3560.agni.lindenlab.com:3128 (squid/2.6.STABLE12)"); + //myWebRequest.Headers.Add("Content-Length", "3"); + //myWebRequest.Headers.Add("Content-Type", "text/plain;charset=utf-8"); + //myWebRequest.Headers.Add("Accept", "text/*"); + myWebRequest.Headers.Add("Accept-Charset", "utf-8;q=1.0, *;q=0.5"); + myWebRequest.Headers.Add("Accept-Encoding", "deflate, gzip"); + //myWebRequest.Headers.Add("Host", "www.lsleditor.org"); + //myWebRequest.Headers.Add("User-Agent", "LSLEditor 2.24 (http://www.lsleditor.org)"); + myWebRequest.Headers.Add("X-SecondLife-Shard", "Production"); + + SecondLife.vector RegionCorner = secondlife.llGetRegionCorner(); + SecondLife.vector pos = secondlife.llGetPos(); + + myWebRequest.Headers.Add("X-SecondLife-Object-Name", secondlife.host.GetObjectName()); + myWebRequest.Headers.Add("X-SecondLife-Object-Key", secondlife.host.GetKey().ToString()); + myWebRequest.Headers.Add("X-SecondLife-Region", Properties.Settings.Default.RegionName + " (" + (int)RegionCorner.x + ", " + (int)RegionCorner.y + ")"); + myWebRequest.Headers.Add("X-SecondLife-Local-Position", "("+pos.x+", "+pos.y+", "+pos.z+")"); + myWebRequest.Headers.Add("X-SecondLife-Local-Rotation", "(0.000000, 0.000000, 0.000000, 1.000000)"); + myWebRequest.Headers.Add("X-SecondLife-Local-Velocity", "(0.000000, 0.000000, 0.000000)"); + myWebRequest.Headers.Add("X-SecondLife-Owner-Name", Properties.Settings.Default.AvatarName); + myWebRequest.Headers.Add("X-SecondLife-Owner-Key", Properties.Settings.Default.AvatarKey); + myWebRequest.Headers.Add("X-Forwarded-For", "127.0.0.1"); + + // Setting up paramters + for (int intI = 0; intI < parameters.Count; intI += 2) + { + switch (int.Parse(parameters[intI].ToString())) + { + case 0: + myWebRequest.Method = parameters[intI + 1].ToString(); + break; + case 1: + myWebRequest.ContentType = parameters[intI + 1].ToString(); + break; + case 2: + // HTTP_BODY_MAXLENGTH + break; + default: + break; + } + } + + if (proxy != null) + myWebRequest.Proxy = proxy; + + // Create a new instance of the RequestState. + RequestState myRequestState = new RequestState(); + + myRequestState.secondlife = secondlife; + myRequestState.httpkey = key; + myRequestState.postData = Encoding.UTF8.GetBytes(postData); + + // 19 sep 2007 + myWebRequest.ContentLength = myRequestState.postData.Length; + + // The 'WebRequest' object is associated to the 'RequestState' object. + myRequestState.request = myWebRequest; + + // Start the Asynchronous call for response. + IAsyncResult asyncResult; + if (myWebRequest.Method == "POST" || myWebRequest.Method == "PUT") + asyncResult = (IAsyncResult)myWebRequest.BeginGetRequestStream(new AsyncCallback(RespCallback), myRequestState); + else + asyncResult = (IAsyncResult)myWebRequest.BeginGetResponse(new AsyncCallback(RespCallback), myRequestState); + } + catch (WebException e) + { + secondlife.host.VerboseMessage(e.Message); + secondlife.host.VerboseMessage(e.Status.ToString()); + } + catch (Exception e) + { + Console.WriteLine("Exception raised!"); + Console.WriteLine("Source : " + e.Source); + Console.WriteLine("Message : " + e.Message); + secondlife.host.VerboseMessage(e.Message); + } + } + + private static void RespCallback(IAsyncResult asynchronousResult) + { + RequestState myRequestState=(RequestState) asynchronousResult.AsyncState; + try + { + // Set the State of request to asynchronous. + WebRequest request = myRequestState.request; + + if (request.Method == "POST" || request.Method == "PUT") // TODO check if this post works!!!! + { + // End the operation. + Stream postStream = request.EndGetRequestStream(asynchronousResult); + // Write to the request stream. + postStream.Write(myRequestState.postData, 0, myRequestState.postData.Length); + postStream.Close(); + + myRequestState.response = (HttpWebResponse)request.GetResponse(); + } + else + { + // End the Asynchronous response. + myRequestState.response = request.EndGetResponse(asynchronousResult); + } + + // Read the response into a 'Stream' object. + Stream responseStream = myRequestState.response.GetResponseStream(); + myRequestState.responseStream = responseStream; + // Begin the reading of the response + IAsyncResult asynchronousResultRead = responseStream.BeginRead(myRequestState.bufferRead, 0, BUFFER_SIZE, new AsyncCallback(ReadCallBack), myRequestState); + } + catch (WebException e) + { + myRequestState.secondlife.host.VerboseMessage(e.Message); + myRequestState.secondlife.host.VerboseMessage(e.Status.ToString()); + } + catch (Exception e) + { + Console.WriteLine("Exception raised!"); + Console.WriteLine("Source : " + e.Source); + Console.WriteLine("Message : " + e.Message); + myRequestState.secondlife.host.VerboseMessage(e.Message); + } + } + + private static void ReadCallBack(IAsyncResult asyncResult) + { + RequestState myRequestState = (RequestState)asyncResult.AsyncState; + try + { + // Result state is set to AsyncState. + Stream responseStream = myRequestState.responseStream; + int read = responseStream.EndRead( asyncResult ); + // Read the contents of the HTML page and then print to the console. + if (read > 0) + { + myRequestState.requestData.Append(Encoding.ASCII.GetString(myRequestState.bufferRead, 0, read)); + IAsyncResult asynchronousResult = responseStream.BeginRead( myRequestState.bufferRead, 0, BUFFER_SIZE, new AsyncCallback(ReadCallBack), myRequestState); + } + else + { + responseStream.Close(); + if(myRequestState.requestData.Length>1) + { + myRequestState.secondlife.host.ExecuteSecondLife("http_response",myRequestState.httpkey, (SecondLife.integer)200, new SecondLife.list(), (SecondLife.String)myRequestState.requestData.ToString()); + } + } + } + catch(WebException e) + { + myRequestState.secondlife.host.VerboseMessage(e.Message); + myRequestState.secondlife.host.VerboseMessage(e.Status.ToString()); + } + catch(Exception e) + { + Console.WriteLine("Exception raised!"); + Console.WriteLine("Source : {0}" , e.Source); + Console.WriteLine("Message : {0}" , e.Message); + myRequestState.secondlife.host.VerboseMessage(e.Message); + } + + } + } +} + diff --git a/Helpers/XMLRPC.cs b/Helpers/XMLRPC.cs new file mode 100644 index 0000000..45e8994 --- /dev/null +++ b/Helpers/XMLRPC.cs @@ -0,0 +1,322 @@ +// /** +// ******** +// * +// * ORIGIONAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden +// * The code was donated on 4/28/2010 by Alphons van der Heijden +// * To Brandon'Dimentox Travanti' Husbands & Malcolm J. Kudra which in turn Liscense under the GPLv2. +// * In agreement to Alphons van der Heijden wishes. +// * +// * The community would like to thank Alphons for all of his hard work, blood sweat and tears. +// * Without his work the community would be stuck with crappy editors. +// * +// * The source code in this file ("Source Code") is provided by The LSLEditor Group +// * to you under the terms of the GNU General Public License, version 2.0 +// * ("GPL"), unless you have obtained a separate licensing agreement +// * ("Other License"), formally executed by you and Linden Lab. Terms of +// * the GPL can be found in the gplv2.txt document. +// * +// ******** +// * GPLv2 Header +// ******** +// * LSLEditor, a External editor for the LSL Language. +// * Copyright (C) 2010 The LSLEditor Group. +// +// * This program is free software; you can redistribute it and/or +// * modify it under the terms of the GNU General Public License +// * as published by the Free Software Foundation; either version 2 +// * of the License, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program; if not, write to the Free Software +// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// ******** +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// ******** +// */ +using System; +using System.Xml; +using System.Net; +using System.Threading; + +namespace LSLEditor.Helpers +{ + class XmlRpcRequestEventArgs : EventArgs + { + public SecondLife.key channel; + public SecondLife.key message_id; + public SecondLife.String sData; + public SecondLife.integer iData; + public SecondLife.String sender; + } + + class XMLRPC + { + private HttpListener listener; + private Thread thread; + private bool blnRunning; + private WebRequest request; + + public SecondLife.key guid; + public HttpListenerContext context; + public delegate void RequestEventHandler(object sender, XmlRpcRequestEventArgs e); + public event RequestEventHandler OnReply; + public event RequestEventHandler OnRequest; + + public string Prefix; + public XMLRPC() + { + this.guid = SecondLife.NULL_KEY; + } + + public SecondLife.key OpenChannel(int intChannel) + { + if (!HttpListener.IsSupported) + return this.guid; + + // Yes, it works + this.guid = new SecondLife.key(Guid.NewGuid()); + + + // Create a listener. + listener = new HttpListener(); + + // Add the prefix. + int intPort = 50888 + intChannel; + Prefix = "http://localhost:" + intPort + "/"; + listener.Prefixes.Add(Prefix); + + listener.Start(); + + blnRunning = true; + thread = new Thread(new ThreadStart(Worker)); + thread.Name = "Worker"; + thread.Start(); + + return this.guid; + } + + private XmlRpcRequestEventArgs DecodeRequest(System.IO.Stream stream) + { + XmlRpcRequestEventArgs e = new XmlRpcRequestEventArgs(); + e.sender = ""; + e.message_id = SecondLife.NULL_KEY; + /* + + + llRemoteData + + + + + + Channel + 4a250e12-c02e-94fb-6d2f-13529cbaad63 + + + IntValue + 0 + + + StringValue + test + + + + + + +*/ + XmlDocument xml = new XmlDocument(); + xml.Load(stream); + + XmlNode methodCall = xml.SelectSingleNode("/methodCall"); + + if (methodCall == null) + return e; + + XmlNode methodName = methodCall.SelectSingleNode("./methodName"); + if (methodName == null) + return e; + + if (methodName.InnerText != "llRemoteData") + return e; + + foreach (XmlNode xmlMember in methodCall.SelectNodes("./params/param/value/struct/member")) + { + string strName = xmlMember.SelectSingleNode("./name").InnerText; + string strValue = xmlMember.SelectSingleNode("./value").InnerText; + switch (strName) + { + case "Channel": + e.channel = new SecondLife.key(strValue); + break; + case "StringValue": + e.sData = strValue; + break; + case "IntValue": + int iData; + int.TryParse(strValue, out iData); + e.iData = iData; + break; + default: + break; + } + } + return e; + } + + private void Worker() + { + XmlRpcRequestEventArgs e; + while (blnRunning) + { + // Note: The GetContext method blocks while waiting for a request. + try + { + context = listener.GetContext(); + e = DecodeRequest(context.Request.InputStream); + + if (OnRequest != null) + OnRequest(this, e); + } + catch (HttpListenerException) + { + } + catch (ThreadAbortException) + { + } + catch (Exception exception) + { + System.Windows.Forms.MessageBox.Show("RPC Error:" + exception.Message, "Oops..."); + } + } + } + + public void RemoteDataReply(SecondLife.key channel, SecondLife.key message_id, string sData, int iData) + { + // Obtain a response object. + HttpListenerResponse response = context.Response; + + // Construct a response. + string responseString = string.Format(@" + + + + + + + Channel + {0} + + + StringValue + {1} + + + IntValue + {2} + + + + + + ", channel.ToString(),sData,iData); + byte[] buffer = System.Text.Encoding.UTF8.GetBytes(responseString); + + // Get a response stream and write the response to it. + response.ContentLength64 = buffer.Length; + response.ContentType = "text/xml"; + System.IO.Stream output = response.OutputStream; + output.Write(buffer, 0, buffer.Length); + + // You must close the output stream. + output.Close(); + } + + public void CloseChannel() + { + blnRunning = false; + if(listener!=null) + listener.Stop(); + if (thread != null) + { + thread.Abort(); + bool succes = thread.Join(1000); + } + thread = null; + listener = null; + } + + public SecondLife.key SendRemoteData(SecondLife.key channel, string dest, int iData, string sData) + { + this.guid = new SecondLife.key(Guid.NewGuid()); + + // Construct a request. + string requestString = string.Format(@" + + llRemoteData + + + + + + Channel + {0} + + + IntValue + {1} + + + StringValue + {2} + + + + + + ", channel.ToString(), iData, sData); + + request = WebRequest.Create(dest); + + byte[] buffer = System.Text.Encoding.UTF8.GetBytes(requestString); + + // Get a response stream and write the response to it. + request.ContentLength = buffer.Length; + request.ContentType = "text/xml"; + System.IO.Stream requestStream = request.GetRequestStream(); + requestStream.Write(buffer, 0, buffer.Length); + + // You must close the request stream. + requestStream.Close(); + + thread = new Thread(new ThreadStart(WaitOnResponse)); + thread.Name = "WaitOnResponse"; + thread.Start(); + + return this.guid; + } + + private void WaitOnResponse() + { + Thread.Sleep(100); + WebResponse response = request.GetResponse(); + + XmlRpcRequestEventArgs e = DecodeRequest(response.GetResponseStream()); + + // yes!! + e.message_id = this.guid; + + if (OnReply != null) + OnReply(this, e); + } + } +} diff --git a/Icons/ADDITEM.GIF b/Icons/ADDITEM.GIF new file mode 100644 index 0000000000000000000000000000000000000000..2d903e2d424a109c0ae119a81e40419e5849129c GIT binary patch literal 192 zcmZ?wbhEHb6lV})*!-X2|NsBh)zvL6Ee8%9sAgbjVPNJ4YD6Q(bzRLNjHzMwPFdeYpR=SuF%G0a-NZ3-I`8=rwg z4v*VRR|X9gGe+i+k1r$FE6Qpp`IPm}ff5o3Hj0_A+3_2h|kh}wv%as0=T#x1MaU@1M zZr--w_i4||4@!kQmSz1gIiO_{l#-_vJMY7}?+f0%coUpp`H~?fQ{$ycfU|?d<0SSWS9hgj}^sk()a4y0ixJ62| w#`0Wu=_8M{+hI}~k+mUQ$BQbDH58xz9>wNxVpl}m;%grwSk6sb%*0>~06Y~S!2kdN literal 0 HcmV?d00001 diff --git a/Icons/DEINDENT.GIF b/Icons/DEINDENT.GIF new file mode 100644 index 0000000000000000000000000000000000000000..4bfaca9a69c826f378dbbebe364a3bb9cd23e511 GIT binary patch literal 93 zcmZ?wbhEHb6lV})nE0RJz<~n{3@r>`p!k!85ya2|5g>U7CcT#al~RpN$uV1Qb#K16 o=k+&_CiiJ-rbR*u>!uWM5x(4@lC$N8mb2)5C02hIZ$<`d0IAppF literal 0 HcmV?d00001 diff --git a/Icons/DELETE.GIF b/Icons/DELETE.GIF new file mode 100644 index 0000000000000000000000000000000000000000..efc5541a90a29b4465de2222f5a3fb75c15c1def GIT binary patch literal 96 zcmZ?wbhEHb6lV})nE0Oo2o4-L@c%!ErTCMDk%57cK?fuXl6PP-?CD=w{XmEz#p_ac uarMPl{7roA6K+||UG}i`9k+4zO}%96`0}-j7R_A!q(U$0O@#&ngEaut|03T2 literal 0 HcmV?d00001 diff --git a/Icons/END.GIF b/Icons/END.GIF new file mode 100644 index 0000000000000000000000000000000000000000..fb71f90cccab49b50bd0d630be6c201ac950ec13 GIT binary patch literal 75 zcmZ?wbhEHb6lV})X!y^-z|e5uzyZadEQ|~cj0`$JJ_AU`fk~;Sf92`B49X>2)HK)L d+hcE&nebxjv(9B&MoiJa`wVwnb7N$%1^_I<7?=P6 literal 0 HcmV?d00001 diff --git a/Icons/FIND.GIF b/Icons/FIND.GIF new file mode 100644 index 0000000000000000000000000000000000000000..b47c9e67fdd8f2f492b85c80d089842a2688fc92 GIT binary patch literal 111 zcmZ?wbhEHb6lV})nE0RJ|Ns974jf#j0_Bn3_2hlNZx_Tp{IYPG!xV9?lq28 zdTHkGS$${y2z}N$YwpId#P3;iW?1BQJ^yviZf5@_4juCeA1t2SP};c2-D65)Mn~$T K_Op+;7_0#|7%Nl& literal 0 HcmV?d00001 diff --git a/Icons/ININDENT.GIF b/Icons/ININDENT.GIF new file mode 100644 index 0000000000000000000000000000000000000000..92e539f254472462360c5336b3d850503dd3841d GIT binary patch literal 93 zcmZ?wbhEHb6lV})nE0RJz<~n{3@r>`p!k!85ya2|5g>U7CcT#amC}Vw$uV1Qb#K16 o=lwU2CiiJ-rbR*u>!t{A%e-_&HD}8WEoV{t&n*5&ycij*0kNhXlmGw# literal 0 HcmV?d00001 diff --git a/Icons/NEWDOC.GIF b/Icons/NEWDOC.GIF new file mode 100644 index 0000000000000000000000000000000000000000..0d3c48250ab2bc74adbc77289db25fdf279ccbcc GIT binary patch literal 102 zcmZ?wbhEHb6k`x)nE0RJ|Ns974jf#j0_Bn3_2hlNZx_Tyr+Mq_5=Mz5i9m` ztKGGUe3Nn4W7=`{PMNNiJRCDW`CMPxvRis~srz))Sy(9!~w0544ncZ-5_B=;H25Y!G*s2dS6?o`K z_0MEXIGMu~;=b^bXR8$Z%%&izw|*;qv&((-%8eOvtg^+@*jYrS0t9qr%QjAANa&fy z%-5jqpWD_Rm=nvvKin&@h1x-0|O(24oC!~)`8hWV%ME} ztqeh{bouY~ZjQeu?h&PZ-k$kD126U=0AhxHNJA literal 0 HcmV?d00001 diff --git a/Icons/PRINT.GIF b/Icons/PRINT.GIF new file mode 100644 index 0000000000000000000000000000000000000000..b1c0d60f2afe7bbdc33978b96a4309aae59f22f9 GIT binary patch literal 129 zcmZ?wbhEHb6lV})SoEI(2o4-L(9qEE|3AZjAcg_OpDc_F42%pqAOVnC2WB^kU3dO* z2{^o5W6-dtJT26tFzIDw{Hk?#LVZ_umTJ7Gn&iN8$*QvsDKl-{h$MRoDY*bT=$UV8FRl(@a s2{wb&FsHjY&o?nN*?6>EJ>}H3#xQeocjJYZSrOmj&dmN1#l&C@099@|Qvd(} literal 0 HcmV?d00001 diff --git a/Icons/PROPS.GIF b/Icons/PROPS.GIF new file mode 100644 index 0000000000000000000000000000000000000000..059046418bd4e14dcefdbb6ff17148ee8ae2a2c9 GIT binary patch literal 122 zcmZ?wbhEHb6lV})nE0Oo3>pp`IPm}ff5o3Hj0_A+3_2h|kh}wv_muvXT*e9uY!q6q z&be1m$=tFiA@TOlnpdZ`MJ$TXwl0Dq79JU=08(T`q|L literal 0 HcmV?d00001 diff --git a/Icons/REDO.GIF b/Icons/REDO.GIF new file mode 100644 index 0000000000000000000000000000000000000000..180655a801ffe7e71a627e0a606c756537483af6 GIT binary patch literal 87 zcmZ?wbhEHb6lV})nE0Q8fuR8i4jecDWGVh+VPs%nV$cDy89?$5Od3=AS90rIm^Noi nl)##MG3*?r{LEd?I+wlrqPS4dw=gJZE%&+C=f0;iGFSruKf)Ze literal 0 HcmV?d00001 diff --git a/Icons/SAVE.GIF b/Icons/SAVE.GIF new file mode 100644 index 0000000000000000000000000000000000000000..8a351eaddc1f8c3e33c76088c0368be04319c110 GIT binary patch literal 119 zcmZ?wbhEHb6lV})nE0RJz<~qR)eJ2y3_zgxlZ6pP>wpN5yaSU*OaDr1BW|~ffOCx- zGp9V|FY^-SSgN^z@5r`yvptk1ZH(C(mb%0D13wQJzq#9yY0|3hcE^miaYv?^OcwdP R#>!!~&f8y-U5Ts=)&O#aC(i%? literal 0 HcmV?d00001 diff --git a/Icons/SAVEALL.GIF b/Icons/SAVEALL.GIF new file mode 100644 index 0000000000000000000000000000000000000000..99448a67814d5e99c82f2097599f69a995a03040 GIT binary patch literal 125 zcmZ?wbhEHb6lV})nE0RJz<~qR)eJ2y3_zgxlZ6pP>wpN5yaSV8OaDqMqo1>47PK}l zUR<*12CJW0$I|0VU+r4d_Dv`6sYSTOr0d7N{fk%ROrHC2L&gwpN5yaSV8OaDqMqo1>47PK}l zUR<*12CJW0$I|0VU+r4d_Dv`6sYSTOr0d7N{fk%ROrHC2L&g&G+t{ Y;){{@nD#8P?=EXs*3oq@dPEqk0WHcJ1ONa4 literal 0 HcmV?d00001 diff --git a/Icons/UNDO.GIF b/Icons/UNDO.GIF new file mode 100644 index 0000000000000000000000000000000000000000..3613279fdfe71fa72b4f6ef7b1a8294656fc5340 GIT binary patch literal 85 zcmZ?wbhEHb6lV})nE0Q8fuR8i4jecDWGVh+VPs%nV$cDy89?$5Olnj5S85kLh)dXV lYxe@bgh%{sN}Ez2cP@M7m3f!dH0|lRWPy#p=7}*_0{}jb9l!tp literal 0 HcmV?d00001 diff --git a/Images/Class.gif b/Images/Class.gif new file mode 100644 index 0000000000000000000000000000000000000000..d55a72daa47cb45bb0118f553e1a09d2763b2012 GIT binary patch literal 150 zcmZ?wbhEHb6krfw*v!E2|Nnmm28M=)1|Z$g0A>LNK@cR42^4>_fCY6xB*+W~7H0tu zfn|G*db-xjMVr?$I~F9fO!NlZ7F1qm@S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im`-6kVJ;q})b+ g@Jc@WTd4)?2Nar1@?ScY-I@~bk{q6qihv7$0Uhfba{vGU literal 0 HcmV?d00001 diff --git a/Images/Close-Inactive.gif b/Images/Close-Inactive.gif new file mode 100644 index 0000000000000000000000000000000000000000..7028d741d89d318eee3775253d64b1c84fdcf845 GIT binary patch literal 1016 zcmZ?wbhEHbSAwm6~-eC~lss^V;_Mr+Ge) zXDoWMbnT1vYrmFyU$XUmY#;P|)#m3bHaxGYz8Vnxbn(JR<>jv)J^1%E}pPw(Hp ze)0Uzk8f{I9Gc_p{MjqwT2%6#+}gd~{!g6!kNNrCu??EyX1{H6_rvz?Rc=1#(lQ=R zn|m!Za)F=2Ia}{X&z?N$oiNYMd6u`+quz<1yuxp0WIvv<_|==&lbjtsdWAh|YyaRD z{CN7J4{qW29^StZ9rt|s`tNUEzsT}waIkvm8ve4t=jo!gKfZn5RonR1Ipk4G+vBXP z=g*!zp1tJjy$7#D{GTjXHP_GKQBdsaxRiS(WzC+>&n8a0H*?|hj_zm6HmnPF{^%Ay z+uP}8a%!8s{g$elU*Espd3gWn?8W!eaytXO-W@sd=H1(OPaiLGb$PaU&DBMV*0t9? zwhKDc-gPT0XInz*(*-MM`8qwAJo{UT?_>%=JsRJTGd4hrCDuZOkE9O-T4mQO{8N7J7VnUO@ zfU?$&f|YJ9E`~OhrxssqVDuMLFj)97;Q)hPf|ibeLc&1?-cUIUfrO*H{F2&yG7VP_ z_HZf{+}dz}ks&~Wf#Ds?&IK*a3sfhG%;j|0I&m_OYm34rV^*$7&Kv?S7!GkTOA1AN zSaGrFahIZ*Vp+~Dr`AbJCCy%VR5UGXneNbRBjRAFc6pYt=f6D-A2ZHP&|zI9a7uBx zPzS%T#*&9ymY?PqoZGWUaPguu96ov+0yCDVyEZGA)_8OtQTJ0LmF3bpQYW literal 0 HcmV?d00001 diff --git a/Images/Enum.gif b/Images/Enum.gif new file mode 100644 index 0000000000000000000000000000000000000000..619865fccd497280e007be1d70a8bc3363e6dda6 GIT binary patch literal 110 zcmZ?wbhEHb6krfwSj52a|Nnmm5Xo@hz=4K_1|S;(6o0aS89E>mq?Uo%m}A$Se+FI- zt5hd+Y^<(e5%0PEJR?SH#`LX|4!4&n?F~}0dACNlX{Q6{lijuzyE}_^dN43p0{}Ar BB~$PZlt(10q3c8JLYYcHQ}R zq4h@743Qg!FU4fs1P-iViRXxvUnRog!}icLfj{@Yx6Pzk()!JZ1dUHD37W{jU=08y CA|kc` literal 0 HcmV?d00001 diff --git a/Images/Namespace.gif b/Images/Namespace.gif new file mode 100644 index 0000000000000000000000000000000000000000..bac956e80457264ad65787dcd89081b5739a1fa1 GIT binary patch literal 74 zcmZ?wbhEHb6krfwXkcLY|NlP&1B2pE79h#MpaUX6G7Lp7!d#f literal 0 HcmV?d00001 diff --git a/Images/Properties.gif b/Images/Properties.gif new file mode 100644 index 0000000000000000000000000000000000000000..dd4b64146eb9a953fea3aa47f9fcf2d6999f0a5f GIT binary patch literal 113 zcmZ?wbhEHb6krfwSj52a|Nnmm28II%4lpn@00EE<0g69azziJ_2~x|zY{s$c&Od`w z4w@2=Sr1koIJd2oDI&1RV^-IyWotNg9GrSJZ1y>yw*qVL@svN(tr2+g;Yf(ryz?v! F)&NdoCr|(Y literal 0 HcmV?d00001 diff --git a/Images/SealedClass.gif b/Images/SealedClass.gif new file mode 100644 index 0000000000000000000000000000000000000000..66f3e3b3f05d5ee4dfd58d39e7dd318c523d3552 GIT binary patch literal 127 zcmZ?wbhEHb6krfwSj52a|Nnmm5XsQc0O5dG4Gay6KUsj{3=BFT0;HCK*@a`5z#n}M z_QedF^*WC(5Kyl;EFPDf88uf*}0cZg_fB`_)0wd%b049JLUqWz;f5p8a@{iE`8aJhf6Z|?bX#c!EEDu;&4{i9B|W`GCa1^9q1 z0NS4b>Ua0XleRGQBMu7DeG z4sZuBzF65JhXsIZ!F3_j>dI=$2p%kIQ*?m1c4QYqfRB&&e!yCnqB(r=X;zrl6#uBqyh4q^6;xXJBAhPql%Gk)DZ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628de1b061 GIT binary patch literal 55 zcmZ?wbhEHb6krfwXkcLY|NlP&1B2pE79h#MpaUX6G7L<7E&VG`zvW*%XUnbb&33E| F)&Ol-4$J@m literal 0 HcmV?d00001 diff --git a/Images/Vars.gif b/Images/Vars.gif new file mode 100644 index 0000000000000000000000000000000000000000..619865fccd497280e007be1d70a8bc3363e6dda6 GIT binary patch literal 110 zcmZ?wbhEHb6krfwSj52a|Nnmm5Xo@hz=4K_1|S;(6o0aS89E>mq?Uo%m}A$Se+FI- zt5hd+Y^<(e5%0PEJR?SH#`LX|4!4&n?F~}0dACNlX{Q6{lijuzyE}_^dN43p0{}Ar BB~$JTMKY7(ZGC7$hDM>q3Jvlj{R;!gCK8a4%Xw<*b>!o`Rm58gW$U`M* z2TR1YCn{Pm43B(Q{~A+|{veAg?mv7usaAiVR6l(DWK5&^^<(_=$ndV5{E6}Lv$wn6 z4gEJcF?s0N$+uF_p0{#m9B@6M!$b=RXh+EmJUt+ zI?#M(M_yr0-HDq$J>SRG6Pod{vGL3^^_q$Cod=7azZtmt^zje%M1Dn;S~KzQ=#M?e zEA}3g{5PQ%AFnukwqbmH^3Aue@4tNAd$|0D;?Loq>d{}5$ImtWm>AzzQnlms@#MOr zL+a7){@(81r$060SqBg9KT@?Tui!vY>Emb5_8u$w_CwurL$3NZl$KYpqoCs5&ym!+ z<9jbO>^oZ8`M7sqe(~P3wOfuArY>q7yZ#(y~d7W^!^;^Xs>2 z#(#~A8|wa3YtD8(zVzVUw#BHrfW0xcI;$x7PIK7M9l7xZ4N}Lwpj;zCu=d!!Y9>c`}XOa z)F36yK`xGlIp8+3&M)#EFo;=MSfdie1w-txsd_L zuWW=N9MuWX zfpITT*mMLR)Tb-+seDNMi)K*9OE#&+@@c-kYk45hNfwB+47O}sR1t{^bLs3TEem6I=lC}uu)0B#oMRVz(P4+FTi+;rf` z1h)j%H3oplOK$)Q%ival4Qgr4y&!d^}{=?y)Lrt_MDG?vb& zys?ueQFXZTPI9{})`bma(;}27#7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fPku~R4j literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Animation.gif b/ImagesSolutionExplorer/Animation.gif new file mode 100644 index 0000000000000000000000000000000000000000..0fd284fb1083619e9664b25ac43ebd89a1b41479 GIT binary patch literal 129 zcmZ?wbhEHb6krfwSj52a|NpyLB_{tLb*QSU+S%DLz<}aU7BEu>M1s^ZFuQr|vN@N_ z%fJ?5oDlf_%n^kM#hr0bi9DSa5@AkgCIy0knWAlcRm8pqiq|->J1t~L8n7JtfQ;0yYLa3=VGcT1+ z+tp2zK_z5SASI=Fo4T!S&FqVymSETi39~lao@ReUpE?K5x5MH5_?_ImoOGdr3%KAX z01btEw?68sq*=vBDQI)><+JjZR++u?1e-|^B;j>eZ=p`)(M>s&PM6Z}(F9O83TVt` zP$U&Td0dP9_8{`eWFmqcB5Rz{CFFrLsMmvUYi*idrqKv7NYnO`X=yP= z6Qnc35t_&o#X1}{!>=mG-Q`|KMG(3CAG%DvP^+z~>aS0B8naCXW%AZJC>{G3pq_M<^R;+F$?+cDc<$SdS4dE_J+qb0PTS z*VuIqfT8*x2!X+j8T3>Xu%T@y+SZLv)*|HW?t_L$fC{NwUX9mQ0RYIz$O!3w{F@61 zeE8p>#2ww)1Ry^HHvNEP$THSMQx3xMnA5DA>S33UzmlsJ*Ky(mF*(fr3Fqs++`o*s zN1ViF#0rI?wK=kskvFu`f6jobvo}gD(F~Azi!&mw7!?zd>PxD7QY$?iWF;hik^|Do ztEPFEpyFLac3GT^e;jKPux~_(*95ruAP38r`M%TCed$-u@`skKE>$W{3%|O=ZxSR% za#>jg@c_WxBrbRHn+37;0Kd)UkE$^0p`@gTphF-|w;FX)v1%Q1_QhKovzO@6sdw5E VipaZ`J!eMnYna;-b}ICYqCe?S7~TK? literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Body Parts.gif b/ImagesSolutionExplorer/Body Parts.gif new file mode 100644 index 0000000000000000000000000000000000000000..df1dc737f91acce3a01a0978d93bd46e6ddc7a7f GIT binary patch literal 166 zcmZ?wbhEHb6krfw*v!E2|Nor-=jMF>{{8>|bN}xxn=^-DMqS;xbIE2}TE@o43=9l* zc6LA#4itZ~fY~}A5@ZGgOK`zS&((XkWvu<6b;y9h;bN-$D!JQgqRdL?O$tg3lHPc3 zlI}S0R`{_Xhus3+a1)ijlMf8Ozy2%Wz33e0UC)`jo(pn{G-YOdPCptqSLDNvn0E(V H7#OSp#~wdX literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Calling Cards.gif b/ImagesSolutionExplorer/Calling Cards.gif new file mode 100644 index 0000000000000000000000000000000000000000..3c751c71cf25f515186d0a0cc0249fefc9a69413 GIT binary patch literal 162 zcmZ?wbhEHb6krfw*v!DNXz`hai;gc_d1K$cJG18;{q*_g_wV2T|DW^!+?@YFJcr@j zx#a)<|1&T!*xA_uNyVQmK$3w$2Sk9(U|{jTaME-2-muKO8-m>?$+TZe^LuJ Nzjpb{d9yHB0{|yQNSpuw literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Clothes.gif b/ImagesSolutionExplorer/Clothes.gif new file mode 100644 index 0000000000000000000000000000000000000000..9099f1c42d493f7be53f71500e1a168fd408b616 GIT binary patch literal 230 zcmZ?wbhEHb6krfwIKsf7qN4Ku|9?eAMLj)rV`CjXZ4Etbbqx(AJ3I65-@j|9Dls!N zzkUDz|G7DruKxg1|NqaKGl${axnu?g20J@DAc-F+{$v3w&;gMkI~iD$6;%6DGUuf& zStab{dh)YFz?Ee|>%3oUxouhyz&3G9!-P&FfdD@R-pAQyg%(r7TozX>36t!3ZG3B~ xuFM1NDb`CFFC-qAcBhTw0UzTOzB^KUtSns2ysbfk)}7Yoe!YEOdK!uh)&NsdM>zlh literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Eyes.gif b/ImagesSolutionExplorer/Eyes.gif new file mode 100644 index 0000000000000000000000000000000000000000..151e10124463f493e70f6abd6102bdccac20409c GIT binary patch literal 375 zcmZ?wbhEHb6krfwxXQpFB`N9P=4@l{Xy@c~U|p5GoV==rnzWR(rK63Ft%I4Z<**U9=BITx zXZ(_ql9Uh^x3jlPk9D=Nb3C!7Zr$Ac%g80g8an5Hs!$V z0uLRjeiw;D3=9$i2CA1iLyu%^meh4y7_&M0sPdu2L@n+H?vz(GS`*pNrfDxVYdPHL zaJ?rhqC`<#oL66;w?swVG*XC1*VMF4U$UQPQq-i`mDRH+MGMSU;^yPyo-be+77=AA zCKkU=%Rqy*omH5VQ+vDqPEKuZxDzskwb~V>c@?GFSruU}!bm literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Gestures.gif b/ImagesSolutionExplorer/Gestures.gif new file mode 100644 index 0000000000000000000000000000000000000000..36ba7d9e15a7bea95cd80464610095accddda9f9 GIT binary patch literal 1023 zcmeH`>q}E%0EgfA?6`Aw-@GMeH!9#XBYor!L5}A;gX4=$kI-4kI7X#BQ$h?rwZExA%(8rz+&&TJ(4}Q`E@sUw-F%W}a z07$rEf+P$E;IL-^i23>oI9v&2Llzq&Aa~YPHa}ZW5dh_+^p%3pm z+loT$wlwR@>lxGlEsog!d$A(Kf>}Ngm3zOaIqC~(aL;`|eVS+PrWp31M z?oludoOTXqwO|VXA#8l2VNaJi&2&GjrQ+C-MP})vd%6@&&+--=+RWsbMPx)vHuXL4 zx!JnW_kHuu4qXG#S3|U<@pvjJigLMYFaRI~rb;j5>}2$CICv9-tTs(D#D&N+q%&a1X(2d#oet#E2?WQ->AD->D@-}O^F_qCW ztO8YAKzezsS+oros+!yP^8Ed=?+X&~{<4)Ktja`(e6d!?hZ-koN0+4-s6wwD?Z1Wl z1QtX_9Ly=?700T2=6=q|+iT-Xn+h7`8&o8-H7l~dj4i3$T&fIe$c_`@(hCvw@`{OA z)$YxI z>go!jJYlY87IqeHdJ+rroa`MPIwJK9)D?C#_{+-5)&**-N%2j~a#~#A6y|JXVPRoo z>tN^NxV^!@FWziZg=3J7nuUWkJ1gs&D(_Ms4Mhol86hrnTg&;m4sya=I&wnZ2I3X| znhtKxvO-)^f*d*Ss~>C0%ZgoWZLFk)I2jokJ0tZN7#QsA?0_WMK=CIFSg#I<1jPvh`z<6Ug+7bn_0*2 zRX$+A$-uyonZ+x?b|8?S&)(cw(<@-Xq!SHNqJl;_7aNwgODZtWxOu^7A%~!d#i1oZ Un;kgVKEkwLN)pu1pNp0Ey}*=>Px# literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Inventory.gif b/ImagesSolutionExplorer/Inventory.gif new file mode 100644 index 0000000000000000000000000000000000000000..18c83dda170791aa1c1c9e020e7b1972198d89f5 GIT binary patch literal 126 zcmZ?wbhEHb6krfwSj52a{rmU-|If{t!vG}Col9n5VEF%kj-8#I;!hSJn}IuZxDz%# zJQ?6xprM$gEHl?aPn(}7Sy^Vbx$aRn%SvtK^>)VE#(IwuLc`@H?dz&! zU;!Nv39^%cwJbp`DmpW7+KNfHOLNaIV_Y$7Ys0dcpXa49M*6ky{8F}Pn%biS7NP<@ z>(o}C=wO|jQgvI?bjF%A1J%mjgtlcy6+Wq|CTSbxRJ86HPuy^i<#SIz0K9S`W=pkzHL!p;ouWEI9GuwlB--sZT9&t4hCxg{=h7m literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Landmarks.gif b/ImagesSolutionExplorer/Landmarks.gif new file mode 100644 index 0000000000000000000000000000000000000000..069677f6cc7e89b90c4f0cb5ea2a8d1a4485f73f GIT binary patch literal 1023 zcmeHG-Ahve9R1zxI=6*2C1Qq{J|q?VXT*}0yMED>+6b!U-FY4wt z-FC0{Zi=G#&>!GKmLGR(+ud%P7W809Q4fNpF7I{s{<{7TJ$4?>%i%nn!#VYhb(X5f zCNRMt0D^=a&v-iZ1O-0+kPJj7fqA_ZJgM8)yqOT99xp$Y_E=@P@$0 z5{MM$c#N?M3ISRlPukw6+7)CDFhc_P1H|N%9?^};CLSeFipdy}lsQB}!i;AI5PiOI z5sI5a+K#dZfBQ)wV|;gTUX{G@cn>NedI}_Ag7O=cgF`tNUgg^)^dTlZQ$~Ojpw(fH zPR8spzKf68vm5?Bfu8Y_xs3@t@+-Ii8XyROJT<2Q<19rJD6r5 zinE{v9|fB+YbwzRga)$@xYnemc8$5M*AL#dMLe}bRhNf0%w*9UJpykTiFWjbxgEcgang|5|75st@!ZcTyrM_gEaur;XNS$ literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Notecard.gif b/ImagesSolutionExplorer/Notecard.gif new file mode 100644 index 0000000000000000000000000000000000000000..f411fcd6d57172daccaeef957cd62c5033623bdb GIT binary patch literal 342 zcmZ?wbhEHb6krfwxXQrr>-V2;-@gC&{q@_|ud&Gy@u`7J7q2*f;qvn3%bz}Z^6c63 z>(}qRc=77y&HLZJ{5o~&TxVxXR$kicS8qIhy-G^TO3U-@eQfUD|9JcM-K&=_2Zjdq z_VxVu{xc^x@5qr8)22`9?w$}9754kr?}rZ_-MV>y_wJou0d`lf-Z-%TKx$h0rAt?B zY;6Ah2LT2K20J@DAW0HX{K*1VuLB}MeqvxNJ}|w&Lr1Ec_4>shk_uB!i@OvhsxELl zwdiV6rE!GftAkH>?OF3-;hmzL7Zp}4e`8m@Qzb*=!q(-nsnP-Jv2po2x-wjX0m4eP y<+>80c`jPIOy$b5Vu?;t47z+gnx)$AY`m(=wAZ?^sO7EQyv|i`%MNWv25SIGACfQt literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Notecards.gif b/ImagesSolutionExplorer/Notecards.gif new file mode 100644 index 0000000000000000000000000000000000000000..3bc9e1901a990eb1ffe787d2f82a2409d48b2520 GIT binary patch literal 1022 zcmeHGOHUI45T4yWD3DO(fPy621hhsIdr*VH5E2Q(#Sp`Vs8|%FO5(|QQ4^s+K=Db} z(spUPP#(UBydi3o%A@Ue`vyYrKny0v6Nw1zcH43J3!a_BcbLp1^L^iZ=PJqyPuFHb zChPzJ0YCzzK*(Q*Xp{me6`K-BU|2%JHq!AWBao@lEd+T+41-3y3|9?2Ml9A8lbtl% z!N*>G``XHRYD1hmiAIwJkh3yo2_|{U0=!`4k@0hv5Wh}NPYFqHm}_L&8;PVd;H?!B z81!8Xc^VL-HXG4R6A@RPjfSzwH&ZjiNp#5|714k@?wHSrXvaABd_c17ZbV@%%<6)E z9macvB?JDk31}YZYsLhZ5WE(Hc)7#pZva9@S(PA5_jB6M&KU`Sk&$wqyC9O3gUKq# z9fr1vQwjmm=e>g1;|^W+vp0Kak%eV^VhUpnkHX5rtxc}~(O^m(X=EuuaG2@zK%^eA zOWd=X0P&M3B;p+F(E=$$J|M&yK5Q0{3;MO_qrKs4La3WD$@xTY7b8bp4!RdH+MmSX zdFO}LJ|#gyEGcq~vut%dWcGw>Q1C^Ux-dGQKsw^`@QH0cU;u?I=)L~ZXozD{G^)6` zSj7MJ&kCqwyZ;VwY!`Mj0g5#^nwnSs-af0B7u{af5Y78rDCx;(n`L@)0c0$+hvqW& z?vadsEIHfy)S5=V8?V;)raaENU$!qeqVuI4qSTSprVVH3@%*|%#&NJ&RZcx|sWfwb z$6(i)%G|NV(lWL3!G`Wc#fy~+!+3X0WzVvdo>J8R{52sf$kSes4sG6QG$UwGSoj3Ng_|e*s~#dfos4 literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Object.gif b/ImagesSolutionExplorer/Object.gif new file mode 100644 index 0000000000000000000000000000000000000000..d26b4adcf2d6a2239e1d9f8dd25f8b7fe30df029 GIT binary patch literal 1027 zcmZ?wbhEHb6krfw_|CwvdtP`;EbsqU3y#jxKEF`+#2g)MZS9SX%oY|Fdza_x>FJ$a zpe-sY>a5Q)Aw#e~Tl)AM?Pph~xSR3cT&~fVDdlA?Hm6W_e!HiJhQ|NTi>GIc2n!2e zTBJCuQ1;HL_V#4SgA;iFznNE`AhxYjgw|=gnCjW11uQk7qibU;9p+Jv!YV&_#7Q~BZjUdfy;YpPi!n(+bI11%aZHM zG{nWkZ?4k6v{+|qzR1lLnq6tq+L|)|-_4hjlA4w$s-vURmMU>>p|+WsSz990jAHSo zc=3x1l|x)5FE7=bRVw`Ka{tNMDvvklOwN}&JXvCCjrjC(rE?2(9-iwqRbk-e;n+DR zba|ie=SQ8>t`=fuX8!+dmZ%8txrI8iva*bf zjQ`&+?o421V`XDtV6d~Z1CpbFo*|(4lLc&@4u}Nh2?mY_44j-Y9vc=oGB>kH8dwxu z=xmAop(3+|k?~+B14Bi@W>$uYE$Pz)J{g}lEn;BP^@ejIV}K+>vxI=u5;m>|8NnAE z0t)J9TDcFD4+&yg`9GRe*h0Be}TZ}dCbDjPdThLB|p3=DR5c0iIKQ2faPR-*$VL3T2*#y&7%4a%I>xWaFe z;NA^NYZpzisrYwh3(En6HkM1j8I_$Lc|EEyRpEZJ;d+nFV*jOGFQ+IhxfONgl<&7= q=a*Gl>itk^()?}u;Mn0c%y;#|C;G57RA>pby0n>eb_pvoSOWkZ?nQn8 literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Photo Album.gif b/ImagesSolutionExplorer/Photo Album.gif new file mode 100644 index 0000000000000000000000000000000000000000..8fb54ff60a383a7edcecfd6dba908e48db156042 GIT binary patch literal 347 zcmZ?wbhEHb6krfwxXQr5z{tS4>s|gPZbk-nCI&{kf|m>|%zVq<6>bz^U}9k4W?%5c zgOh=kg@J{KnSq6YVbyaV&)gT5*|*$Np8R{yz_;QtI|IY~$EFNSoO2#nG3@=Ey@!>N zft7)giGhRh`}gl0yFPI+Fi6dPT(pv(Vdv{<&s;exR zss3X#gCd=8rOl7T5NhSg#Gvg1%n8q89yzjZdDWXbQEox zdcKs4T~tI#kGHTm!-#=VK}|(UyRNHLLseXoTR@_-Aw*7@i9=JG!Jw$2&Qx8WSyqgH VMOXCJ=y21WyLRvP^KfLa1^@(sWcL67 literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Prim.gif b/ImagesSolutionExplorer/Prim.gif new file mode 100644 index 0000000000000000000000000000000000000000..d26b4adcf2d6a2239e1d9f8dd25f8b7fe30df029 GIT binary patch literal 1027 zcmZ?wbhEHb6krfw_|CwvdtP`;EbsqU3y#jxKEF`+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90f2467dce2b0370dee7036822095318684c1f7c GIT binary patch literal 170 zcmZ?wbhEHb6krfw*v!Ci;J|^mGAhQ##^0t@{{PSL|NnmzW0RPen5Ao1p1631;Xi|& zogD)bQ2faP=IMY)kQodt;RPo>SKC;~E6%X>IiZju6sEASM>V)Yc*Po(q^^x8ZaMJl zx3?GsO3z9%pZlW1P^^9b0;7~9rn#ybLGD3Pvkpro3vkq~?@?(I)G+3`&#Z9g>cPg# Jnl?-f)&QcgIB5U? literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Scripts.gif b/ImagesSolutionExplorer/Scripts.gif new file mode 100644 index 0000000000000000000000000000000000000000..e0a61f134e510406d6a32ffd9adb04e53a706837 GIT binary patch literal 600 zcmaix$xjmj7{$Mtc4QGrHDX)|C@vU{Mx&vkHADr$6(zV(A}tCPq_#5`51JUnYP^t0 zpv-jIGNwW_5f8?L7cJ2sZKt!e2vHM{dcsJ87}}YB7XJa?;dgj>hnM$iYO5>EHWQfO zI{=UX21sKcAmk9#yyRN~q$Icd{J;f>h-&A3l%F>s#!+Ku)|a6+2>IaW0F?nb*~AOL z`T&f8I6SF3SQa!4ii#ceDB_c!N#5rJOh4C9(9*(uhDH4Y7?<}6g{TKn?w922X=x-P z-igchXw(srJL94&A$4*7T*SB2v1Y_qO04mt+`{va&Ln}zf1k*jssUg^X+@pIRH%o8 zM6!Wn2@NBILjF(?w2bH-fz*OO6@RRuGM==du3$1SAW$q%eTsLg(VMF10HA&_HUIC`ZonNLpQkmEvr8gqC&Lu*K z;(!;PzIaAtTdAVeYR&Fyu~@SFuSyq;|1vukx%dg>yuQnH-|M;WdEhy=XYJB6@Q}IM z>{xdA^44BYRr{Lr7tiglKT>hFr21O-@fPz@_vk3SVRNZv3$xRoi3WTUfFek zS#{8~&pq}oT;96!5K~k`mbqO{iME}tyujq0*tYufS68@m(@rDPWiPD#;T)rj>zaBC zZd}?pM;A|&?;fN2&5doh!T!?56>a|}R)xE(3#gOMTjns~G41Ur$bIx{I8@t5kPUAj Juf7B-{{m)i7O?;T literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Shape.gif b/ImagesSolutionExplorer/Shape.gif new file mode 100644 index 0000000000000000000000000000000000000000..8b4c1133907c371ef703dc636a7f6bf9d5d09831 GIT binary patch literal 1035 zcmZ?wbhEHb6krfw_|CvEt+K2lA)z@Vqb51IJU)I-bMyZPt5>dEnGz7Nysxh~Iyyfh zqA@)^FCrp8GO{u;@&B_8dloO;I%igHcz8ovTC%@?QAA{CZf>fdf2^06kF|ACbab?v zd!&nNl&fofO3ME)yMvva3ZtW^S67$C#q|{y2H86_rlob{lO%G_|s_DLviS(J0x+ zw>&P+*WU2|>#g%zT4KDsCYP4hCMU=F_;lyx^%fSE#KdHUgp|g{W`~4MDlP3TDER++ zi?4-Ms;}Rb^&RO!K_N~~4GBRZj!w_c&#OyG3AT5P_x1h%_C$An{sAzn9yfzY|JnU1~dc| zf3kq>*8!2BJi);6f`O4!#$&?*2aT|pgpNc;pP6^~U6#h({z;L!(iRre6h2xRl`F(;)DjE$e-3K(JS!Dh)FFAf~YYH33 znav63hRVY}n*pHWC0i%VWKtj_2 z9m!>TI295c8kigG1R@$77DzTXB=E~9f9PY=D#}nev4C}(gmR(NgE&0{1qN#X{5lHm literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Shirt.gif b/ImagesSolutionExplorer/Shirt.gif new file mode 100644 index 0000000000000000000000000000000000000000..7c6e6d4adbcb17a55f4ca8a4954bc7f86ce33f93 GIT binary patch literal 587 zcmZ?wbhEHb6krfwc*elcIpxW{M}Ll-`n~PopPxVfUb^w$x-4YR(f>;~{C@lXf91?I z^H+U8eER?X6aN>jc_nRR_W0?qyAS_w+4t}G+5bBa{@H*0|Dn_Wr_Q^1`@#P!x4s>} z@c-$H|EsrtHZV$Ez2)br^Zzei`@ieZ*AJimA3gVf=b^vnF8{xD^Z&Y?|7S1za_7N+ zCI;yn_x`Wh{=a9+*&BENfByP^{mu`kFa1At>F@EgzpmZ+w_x>;*~>ofI{bIhitA@C z{Wx>!KQn_=NX)$Y_Cw4J(pK6I3=9l*c6LB=hyul*EMS-GfJjiBFtD#^aBOOBX>D`p z=yYgxuFU@9(sc)3%io){(W=a@f@5pev+jYsk#au+jdOql1Nt#10;r zC(mzNnrqrB$TNNDVN?~gl{R9z^23$Gqk&;n1qVlC(*p$s0fjv;6qDGRg!#5>-jc|l Nu(Mx*m6eIX8UPA^#mN8w literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Shoes.gif b/ImagesSolutionExplorer/Shoes.gif new file mode 100644 index 0000000000000000000000000000000000000000..a74ee6ee0553bcca29484df5e0f74f9fa3dbf7eb GIT binary patch literal 334 zcmZ?wbhEHb6krfwxXQqg@C&B zMff-b1qG|)oR*cjA6neHY#V8uEh667ZawrqzP1s*z5{U=f;ea+e=qLx0fv!h~`^zkRI zDeK(k_8)6F8L`7DE%AfG)_b~)?Wb!T*;Ft5UgE?lrthPu#H%Y(z~I}Z&#oz2pxfE4 n&!{iXBE&FjGNax+A5LGM?z!`vOP9>k^H{aYYyAdSM+R#EGRI;( literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Skin.gif b/ImagesSolutionExplorer/Skin.gif new file mode 100644 index 0000000000000000000000000000000000000000..ba2b0c6115aa97b3dfaba9529f0f84d516380935 GIT binary patch literal 125 zcmZ?wbhEHb6krfwSj4~(8XtOP|0)IshX40h+1c3v84#fOlLgGs0g)iJ49rd*yNrKN z*rKMCqZl&7l+$^e=OPDA27`Gm34D1uRo&KiO}_Z;tUD}rv`;AKuiM1wX9ZcNI5Z@9 ST$^x-MM2(sMxq)6gEaskVI{c$ literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Skirt.gif b/ImagesSolutionExplorer/Skirt.gif new file mode 100644 index 0000000000000000000000000000000000000000..a785d00a86d3c2a0e32404f6acea0f5e445a21a1 GIT binary patch literal 595 zcmZ?wbhEHb6krfwc*ekRGU)fQ(4W1g2Mz~)Q&dv95cBs~&}UXQwu!cf6%>^w+8($N z{cD-oqdM!QI|80gcQ|$+;5`cqOMr6n;rMSGBR@>CK3HzNRKq~$K*;O;!EaW$UpXA~ zc}wEAo5{bXIh;Nc{Of$^zj=-)PkQ`368QCW@c-4$_jkp-I~M$Xo!7%_sefeU4*ry3LhorgG8f=$q8|&HFId&TDKN0@J&d!cu z5Cg@ZEMV8^fJjiBFtBfE@NV+Dt3?(|X9H`g#!)pd36Z1VA(F>{8`RCgaUDFF!+ zey>*X=6RmNHqtuwj@+}Gr+cb6GitJOdl`GqndZsB;J_&BbwXyp$3X^LF9p^UULvQ@ z%6VyD_R_o7;%UU>rQ~IK`QCIkj>}wLieA@Nsk?X?cyTem7V|l?mD$Nl>dK0Q102kZ vf2OTCbTQ#bAHNmT4~rQA3l-UgWDHIwc(87EVc~1>5m02DG}(iRk--`Ob;`b< literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Snapshot.gif b/ImagesSolutionExplorer/Snapshot.gif new file mode 100644 index 0000000000000000000000000000000000000000..6f510853abea3fb60f1b534e5b9c56e88b74e697 GIT binary patch literal 1070 zcmZ?wbhEHb6krfw_|Cv!5qm}1{gi*%J${oz{H6y}C%xFPVZ-Lln=f9x$ZvY+-@kv# z?k6i(f4X+<+KCeTMVXzb=U+5hi7!`-`g|Gr~* z^ytxcxMl z6Q8F{dN%bO%cf16E?v4*vFgK=^M6}+J&tX^v2Wi#@8T;yMc0(vPd$6~?8%cS$BrGF zc;?59ODvPm|G9DFM%TeNU%!5h@4Efz)2G^vkAJ>mxO#%&?s``<(R=D6%*FNUl$j<@*bUTeogqzkXfW z?F7H+0e+K%?;kL<@BjMm9Yg4Jz5@pil&^T3)b}WN_U*ra|E6yfG>^HMu!{fS!Gq?J zXMIa)A_f6aHm#uhx`t)hb*vpEp zM~@siGUdX*v@HVh%lT6#JoPTT^!oMdU%!5ReFk*lx1J;K|Gs4ipUJmv+qUEl0(~bw zmo9rX;W*32jT`++ZpSR)uix^#b@zwp1$+^6_$Hrbd3}eWVD7#9_wRrI{(a}po#v6J zm0gej`SXY0%?fT^$e!$`cG6{}~cFWjqQNFtJ)D?2S6H;h{FS zm{(52)C7m=j4T`~D^9c?U=0_aa$uLB!hvRn8b7^=4XsnBxJo84&aey?WaDX?u|RQS zS}1FTJPQZ!s)v`<&GK`ubX;K&W94F9v@U`1B%h>>TGJT^25ly0Ho*iL$>t8>DGtGY zQ$1O@SvvS+wQ4<;vM$UEaGqz;$l&d|Si<(vn~cpTFZF8~@%;>3%+S-O=CUEc>EY23 zMJu;YA|Dgn_~)o9`(1f>aZ!l6c8E*MgbP{cB;D&x6g@w4T+s-cacGH!0cU8NPL!I$ zg9i;0XK1W4k}a6X)gj=2{MC$#W%oHGKkCgb&KDn1(P@qr6wvqUm1TZGKG87nuqJw&lSBE{a&U; w-~1t`wMD<5ip`p)Q%R2uBv|4bmNu~mSPDnJP4U{$;vBs>vG?2tQ$Yr60MK7DbN~PV literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Solution.gif b/ImagesSolutionExplorer/Solution.gif new file mode 100644 index 0000000000000000000000000000000000000000..f230f5b2cc809114e81904a342a8edc67ab4b972 GIT binary patch literal 1046 zcmZ?wbhEHb6krfw_|CxK5n22E{U3E*V|5+l{#k4O{rms!)35(WB)?g9`1sB5om$eLzx@eHYJ2qNcW^|ke?se<&wpNh_*K2m`TxKF_h0?` z`Rm`qS3f_0|Eq0i=IrYJ^xdELiyFUW8h)Cn^X%=Nx=QZO zvmZWH*PiECU3>gvX@TYc>$YkAPyYP<@8X~Q`|tmx84e8_tfy@Ic|F|fW;cCH0A8$m=Zod8e zS42|Tn-AYVC+j%7xPAQc%d7J0UTsMy7x(TBUl*Lpz4qj1M0`#}Z2J4Jf9+=9o9k$9 zPj$F6GiycIh;Pr0Ye36E*N^XS8k(5Ab-73Xes zng9Cp@A>=R!3{UIyJ+k8-2M3NZ^yRSq`tP)nFc>ES=4QQG-v&G*U|m3cFNbE z|7P#~^C{h2L)ZAv|Nmam^{PhhlQw=heC3rz%e52NUR5o4<56*?b>+wKsJOSE{~WsZ z?R}czsuM3KZu(+2<56T%$^4Z&?dKvoL}JQeqzb2A}+5f3Vu&CqEb@Ntq3EXXI981Qzd za+kw&A3?E(#DoI}ScPQDet0};WLUe{BU3b?QNedEXRh5zuc{D_X1>)-8aEEPAGor_ z+)QCX)1yXS<7Io)&R*!4yhK95WX%QVtOM5C;V?bsrt7Suj$En^LVrFs zv4~9;j_39|Gz|8Rf-?!iY z|NsB<_y2!}>K>-{)(H*m4X2MEsq1BEYN;>oWh?JyVBlalcH($#dwoZ9!~cJOe*XW$ zz`*|hH$!t{Q)dUm|Nq~9{{ssDZE9f`VqiUX_UQj#zyAN{WME)z>frkIpY8u2hSv6~ z)>h^tM^7>WH3B97Gc~sK{{Q{|*scF|c6LBF;sT04S-?^{AQI#!2DT`N*##atQvD~E z6j`p>!r*i1*oQ?Lj)oo!CJJ8b>SS+cHR$EqrvI_v&&cx_5Z@!r$gEat~8F|M5 literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Sounds.gif b/ImagesSolutionExplorer/Sounds.gif new file mode 100644 index 0000000000000000000000000000000000000000..841c56a310467465f3892eb8b95ce21afea72dee GIT binary patch literal 171 zcmZ?wbhEHb6krfw*v!E2`E%dSo!#HRf8Q{@_U+rrFJAQjKR3tFkn=x~n!|AJT=M__ zbN>Hl_z%Pk40d*Qia%L^32Z+GOG%NaY;!HxnJgpinYgZ?KyGQ!+m0jB0(EUK4NkEw UzuGyqrnKnB`-(m6!i)^o03XOojsO4v literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Texture.gif b/ImagesSolutionExplorer/Texture.gif new file mode 100644 index 0000000000000000000000000000000000000000..a1185f7ccb5e0d6c7d96e500d8ead081198cc700 GIT binary patch literal 591 zcmZ?wbhEHb6krfwc*ek>qM{<1;v8SAB5j#h-lQa*A0-}ZsMH=M<&`U$=8{;ix-mm1 zZ<5v>EAxap73~>oR3;{>PD;v>%G8>^+DbG`vDNi)OpJ0uuUwhG+U)uXA<8m^K1%J; zDeG*cyt21?cqo;3bZjwoEKoaNZ6X^`dfv~(RxIj#aPXaA^XVrn=Uc0H7%5tdMySrL zkw`K+wbZC@mZnlgr(=P-xPEkJo>Jv}z4$s+h3J;4;i}3>{a3@nY{jB?o-lPS*PP#| zKIw>+cazTb2DAGu7A?LCX&vfvA|WyXrIP7xa-yN>l4;#LOmBvVC#|qlh-}_+$oPP< zfq1OJjg4kX9qx6VDhCP;WJ=?uGRz)CMafkpitEP+3kx&Q7byN@0b8g8B0+J&z`mw| zp((1RwJj<-nxT`|s#8mq~*gFk5);gPXD*AK^>UO#rPmK=d z=@b>{6!v}A$z|IqBiSj={EUUEQ%|~+zeq*PNpT{BV5d-sXNmHCF=5X$j)_}YSvp-j X$`0Ia(w^9^(;4A$!=or!fx#L8fYzSN literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Textures.gif b/ImagesSolutionExplorer/Textures.gif new file mode 100644 index 0000000000000000000000000000000000000000..11bee71692b6897791d5f437ee8c01ab5102d05d GIT binary patch literal 1024 zcmeHG%TE(=5T4!b6RMOJc?d?t1u^0a)CeYsNO>8FQ4fe!Xk)8ELn1MnK!}Cn1N1<( zgm$+tnv@VV1`l4m2pYt0w{M~x@Bn!6C?b?X_vhCC!JFSGInj*I)pl94Zg5OV0#TF6uIq!Xc# z%?@^#*x?kR-@j0T^#)paCcpp)9B>Q>!6xSi0VL+kKO?j+tP6NMX2bgEbhA2B%|zQk zEL#r_kI;ZP+kl5pk=SS=;=9DmYAm#9)Ik6NDCUU5mAUaE`o4z}pbd%(xY&rE zpM1{%ML??A#Va7^kUz*?o@eyjCOZ?>0G8sQgmyaF&OXa4mTkG7qem#Q&lVAuNJGl!BSMe-*=@(s30 z^XeyDQ$~@o*)%Gg$?6}RkSv@tP7YR7Z0(X5A5AN>o9f3wu~?UN4F3@e@u}{S$BM$p zX~UUxRk8LC42@6rVqyW=d3&rzq3SlvsxKOP`wK-iB-3`oCsZArH&mHjrwU5z^jufXh=!PFOW&# F#2*6r7Eb^G literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Trash.gif b/ImagesSolutionExplorer/Trash.gif new file mode 100644 index 0000000000000000000000000000000000000000..e2f1f93957f25cd9bbf756bd61718de2e1b78aa4 GIT binary patch literal 357 zcmZ?wbhEHb6krfwxXQpVWy+Lmm#@Xg#()0w`Rb*sS1w-p^zl<#O4{VflXJ3i9zA+A zXU-f?PtWVuuZxL^ojZ4~q@-l#%$bP^iPNS{%Sg*uym;}d6|0gHle03iUcGqb?(VLy zrym;|J9p09-Me<5J$p7aId#*fP2JtyO^r=cr%p{xP4)NlcXf3&GBoOF?|Aj{)r1KX zZrr$$otbT7Z1VsAe+C8yJ3BidNhDDG$pTiX10q3wVqj}JFe8AYnYaJA(wnJ)N}cPc zvo{nNa2Am;Z5pM+R#E7hZq; literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Underpants.gif b/ImagesSolutionExplorer/Underpants.gif new file mode 100644 index 0000000000000000000000000000000000000000..0d8d876e22ed707b05711b86bdb921de52a5f5bb GIT binary patch literal 224 zcmZ?wbhEHb6krfwIKsg2^7W7Vk3PS9|MT*-H#hHmc=Ytk)tm30zWDy^#n-zJK0bK- z{o2iU*KU3L^!cx>oV>QN-j5&uZ0sD5pMG-d-mm}v|1&T!*xA_uNnAkjCkt3g2SkGG zWMGY5pxT#`IqymE+ML^~f^^Pr&b}|q>gZd{!pfjv5$UV8doDwwf`(8}(o>I>PAp9a z5(;!y?XqG>6tGw)BX+gqQZ&PvK97_yspbzp1)KDpEYHwF$um%8< C{aqjc literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Undershirt.gif b/ImagesSolutionExplorer/Undershirt.gif new file mode 100644 index 0000000000000000000000000000000000000000..450500231dbc75932b311793addbab191b5f051f GIT binary patch literal 380 zcmV-?0fYWWNk%w1VGsZi0M!5h%+c%7*6Q8g=!lG~-{bn)-}uPR>(0~b-r@7w-ujc5 zxY^$N#K`5>+1|&?+~D}v+wq2rt-ZnCo1eXQdYq%D!^XowbRPb>#DEQ+1>jiCnY>SLDt&oD>E+U=jH$a06soG0000000000 z00000A^8LV00000EC2ui01yBW000J=z@2c1)8T~0<8Z0V>4eSaa;R$(@0xfJ#vTKh9Vsn2ZV$0Qce679 literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/Unknown.gif b/ImagesSolutionExplorer/Unknown.gif new file mode 100644 index 0000000000000000000000000000000000000000..8412424884f351b30e3656b71f60c5f19849fd2b GIT binary patch literal 986 zcmb_bziZQR5WUz~s)z|bGf^B@4frx@X^Y^;8>1wv_=ul z^l7F?6InB&-EKR6ck=YW6W`45Qm)PlPZlvoU+DMJB?cEXLx&0!0;8Wi?h0 zQs^~dQ#NCBaKtFPuq(TSfHqG>hKXx!vOF?JB)@}SP4Hs6VtE*oFEtq!5Uy7jY-e~4=e^Ypgm3$ z-6$hRI4%Ywp$}`3S$fIB*L3eFrW1zE=_=8ij1Je6cQKmmh$AG0fs{zcO%jg)PSAKA za3z=rO<1+_XEsClEA+-&9sddHTBhS&!?)fadp&izbL;AxVy!Tl>*=q5y?L)yu2bg3 z#%~LysTI1=R~@<2+CRN(`=vAca;TNyc9-0`$~ba}n6Iyo@`WhR|n=Ee3|L!*g!-7 E0126@6#xJL literal 0 HcmV?d00001 diff --git a/ImagesSolutionExplorer/question.gif b/ImagesSolutionExplorer/question.gif new file mode 100644 index 0000000000000000000000000000000000000000..8412424884f351b30e3656b71f60c5f19849fd2b GIT binary patch literal 986 zcmb_bziZQR5WUz~s)z|bGf^B@4frx@X^Y^;8>1wv_=ul z^l7F?6InB&-EKR6ck=YW6W`45Qm)PlPZlvoU+DMJB?cEXLx&0!0;8Wi?h0 zQs^~dQ#NCBaKtFPuq(TSfHqG>hKXx!vOF?JB)@}SP4Hs6VtE*oFEtq!5Uy7jY-e~4=e^Ypgm3$ z-6$hRI4%Ywp$}`3S$fIB*L3eFrW1zE=_=8ij1Je6cQKmmh$AG0fs{zcO%jg)PSAKA za3z=rO<1+_XEsClEA+-&9sddHTBhS&!?)fadp&izbL;AxVy!Tl>*=q5y?L)yu2bg3 z#%~LysTI1=R~@<2+CRN(`=vAca;TNyc9-0`$~ba}n6Iyo@`WhR|n=Ee3|L!*g!-7 E0126@6#xJL literal 0 HcmV?d00001 diff --git a/LSLEditor.RES b/LSLEditor.RES new file mode 100644 index 0000000000000000000000000000000000000000..2dd6e4e66454d4e77eca2b819d8a99b00d8f90cf GIT binary patch literal 68612 zcmeHw34B~tz5hvDC`DN+OA&$I79lBS@1Cw{mNqmSnS=rgaWZq044KSKXK9imv@AkF zq{w1HMOg%S!V^Wr1$-7#G>r?R!8kpK7hJIh_>X5l^F|MOoMNRyel_nvcp z=eKW12q7%|3=hj6{ONgJI7x^F_++JM5cT-oE>?+Z(JWSrkSH~u%3I3C6kIJ|D;w$; zEDRqZju6jp5Q)~w>+GsGZWSLqeR!g2@)uW6d+RRo!H&pro4`@=81{MtVs*>BhV;)QRCS8o#UJ-pZOvorqn*nyo52S!^CAAb7q zi_eL?bgkHRuefH*>G$7z*Y5kpo4*uSZ~4;uPfXkSQ}NI3`{p9^GixT_chA;;KV#y9 zUoD8Qo_u-Nq!(X#{e!2E*m0@&&gJXB+c)Whr#`*=!98Q4BQ80&d-#PT|9r!Q?LU~X z^Jn69>L~~txsHVELuClazVga^j z#y=)asT3PTF>M!ZlbAfbal=_>pY!E&&)anV1z)-Fs~2s)_-mJ3dfDY)-*V2O2bE6Q zV~;7N2OWCp;RmO`u&OJ(@&s}4;a@v!TIj@2A9BdtFO?kIHtn#@(}z}nI+Hl&n8~we zlvnIiJN>KH=l1^eiepYc{eS~bpFHD;Ij7Yvxv*@0&Ft-eJ$nB~`j7g=+DYvfp7Q6( ze?5Kw{SW*{>mhqhxI%=Z6Zbo}@3ErAgWJx#d(S0DeD=jvTW{QW=qF#c7H``6_q)zL zVCH8ZX*jN;X`lE%=N)?f&K>uiUpnFCi@#9&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i#KeD7U&7lzS5j{Ld%xVRbf8!tN)ZUw*VA} zstF}dIIeLe-#`-zFPmGxWy_~L)B0j$%ek%zeJPuarDy<}&}qw-&K=xxlKq5fl2fZ@~rYzK(b@#3 znuO5gz4BiR7w$EC;lW@3`piiMN0(o|`KuRRaQ=DcoV|$#IB?&6e11;6tz2->tOc`5 zzrJ{nf@AVQXAOHS;6#^f%U1pv~8Xs&w zZMX984eC99vmJ}yY{xEBb}W7m(|z=NBYsbJezP5m_iV@FCbnbAZrzIOwEYS*knLFf zW;>S5Lb6+7f3h7*cBp#K_ABgF{hRGryk|QWzu1n&@Be8#wijb8pmB!x6%C?Rw24m9 zB&zXuv#7_rYP_q%_w;hxw`6Qj7W?lHf0&pgC_BCY@95vX1m$>75QiKh-%+OFL}6L- gO3KHWgm>~gic0Sx%FE?<m&uqTWE1#y+Em;e9( literal 0 HcmV?d00001 diff --git a/LSLEditor.aps b/LSLEditor.aps new file mode 100644 index 0000000000000000000000000000000000000000..dddb8bddd675cc5638c9c9cdf6ceb2a0aaa076bf GIT binary patch literal 26284 zcmeHw2Ygi3w)aYb04flv7T{15kaTJYC6G`g0ZdW37l@OYlVr$b&M<`p5E29-APNc? zEGUR@eaf|Bg?kNHDJsgnqS7LQR3QRFEI8kP?Q_nwH1B)f_j})aZas76oZZ%5eXYGG z5D`hZ+-~*4SHEJ#Qx9BY=?)r+yW1V4)wc=NzR(~O(Wt~JDT>imBwL*h$zU}}nX=Pq zw&pvgBwK6+iq$bC-8|hYnY1>tb;|8#hs$7*GMz4yS&`ynWBX5;WLKukMyF#+T4q|R z$?R0@Q6pui!TT6(H)7Idn0XNHV`vetA9OmZLZ_VJ!~*FIEin-=@am*GF}zwXr8^X_9^KHIzN(BVT@cGLd- z`%awx?&mLBUD-n?9;dU<(NFuDxsP@IM6Rii`G}n-Lq?Z z%^te&H(FP5_tirks$Zv{_qTKz2RiNu+r6{$uk%7axj)DCsQ!TX;Nu6~2Qdy{rQ9lU8q=+&wlKVB4c`1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