Compare commits

..

No commits in common. "master" and "next" have entirely different histories.
master ... next

469 changed files with 66885 additions and 73476 deletions

398
.gitignore vendored
View file

@ -1,398 +0,0 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp
# Visual Studio 6 technical files
*.ncb
*.aps
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# Visual Studio History (VSHistory) files
.vshistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
*.sln.iml

View file

@ -1,5 +0,0 @@
LSL-Editor v3 porting TODO list
The aim of this overhaul of the code-base is to make it multi-platform friendly and gain a better insight into the workings of all areas of the code. Hopefully this will lead to removal of any cruft and a leaner code-base.
===============================
1) Port window UI/control to GTK+.
2) Clean up all the 'syntax' stuff. Alphabetise all constants, events, functions, etc.)

View file

@ -1,100 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
// About.cs
// Provides the code for the About dialogue
// </summary>
using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
namespace LSLEditor
{
/// <summary>
/// About dialogue box form.
/// </summary>
public partial class About : Form
{
/// <summary>
/// Initialises a new instance of the <see cref="About" /> class.
/// </summary>
/// <param name="parent">The parent form.</param>
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1642:ConstructorSummaryDocumentationMustBeginWithStandardText", Justification = "Reviewed.")]
public About(LSLEditorForm parent)
{
this.InitializeComponent();
this.Icon = parent.Icon;
string strVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();
this.label2.Text = strVersion;
}
/// <summary>
/// OK/Close button.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button1_Click(object sender, EventArgs e)
{
this.Close();
}
/// <summary>
/// Link to SourceForge page.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start(Properties.Settings.Default.ContactUrl);
}
/// <summary>
/// Loads the page.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void About_Load(object sender, EventArgs e)
{
string strExeFileName = Path.GetFileName(Assembly.GetExecutingAssembly().CodeBase);
this.webBrowser1.Navigate("res://" + strExeFileName + "/" + Properties.Settings.Default.About);
}
}
}

View file

@ -1,667 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="LSLEditor.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="lsleditor.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="LSLEditor.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="lsleditor.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<userSettings>
<LSLEditor.Properties.Settings>
<setting name="AvatarName" serializeAs="String">
<value>SecondLife Name</value>
</setting>
<setting name="BrowserInWindow" serializeAs="String">
<value>False</value>
</setting>
<setting name="AvatarKey" serializeAs="String">
<value />
</setting>
<setting name="RegionName" serializeAs="String">
<value>LSLEditor Island</value>
</setting>
<setting name="EmailServer" serializeAs="String">
<value>smtp.emailserver.tld</value>
</setting>
<setting name="EmailAddress" serializeAs="String">
<value>youraddress@yourdomain.tld</value>
</setting>
<setting name="ProxyServer" serializeAs="String">
<value />
</setting>
<setting name="ProxyUserid" serializeAs="String">
<value />
</setting>
<setting name="ProxyPassword" serializeAs="String">
<value />
</setting>
<setting name="BrowserLocation" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="FindLocation" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="BrowserSize" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="Help" serializeAs="String">
<value>http://www.lslwiki.net/lslwiki/wakka.php?wakka=</value>
</setting>
<setting name="LSLEditorLocation" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="LSLEditorSize" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="RegionFPS" serializeAs="String">
<value>25</value>
</setting>
<setting name="SimulatorSize" serializeAs="String">
<value>0, 175</value>
</setting>
<setting name="SimulatorLocation" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="RegionCorner" serializeAs="String">
<value>254464, 255232</value>
</setting>
<setting name="TabbedDocument" serializeAs="String">
<value>True</value>
</setting>
<setting name="SLColorScheme" serializeAs="String">
<value>False</value>
</setting>
<setting name="SL4SpacesIndent" serializeAs="String">
<value>False</value>
</setting>
<setting name="AutoWordSelection" serializeAs="String">
<value>False</value>
</setting>
<setting name="GotoLocation" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="WikiSeperateBrowser" serializeAs="String">
<value>False</value>
</setting>
<setting name="BracketHighlight" serializeAs="String">
<value>224, 224, 224</value>
</setting>
<setting name="SolutionSize" serializeAs="String">
<value>175, 0</value>
</setting>
<setting name="CallUpgrade" serializeAs="String">
<value>True</value>
</setting>
<setting name="RecentFileMax" serializeAs="String">
<value>15</value>
</setting>
<setting name="CheckForUpdates" serializeAs="String">
<value>True</value>
</setting>
<setting name="CheckEveryDay" serializeAs="String">
<value>True</value>
</setting>
<setting name="CheckEveryWeek" serializeAs="String">
<value>False</value>
</setting>
<setting name="CheckDate" serializeAs="String">
<value>2010-01-01</value>
</setting>
<setting name="RecentProjectMax" serializeAs="String">
<value>15</value>
</setting>
<setting name="IndentCursorPlacement" serializeAs="String">
<value>False</value>
</setting>
<setting name="IndentFullAuto" serializeAs="String">
<value>True</value>
</setting>
<setting name="Indent" serializeAs="String">
<value>True</value>
</setting>
<setting name="SmtpUserid" serializeAs="String">
<value />
</setting>
<setting name="SmtpPassword" serializeAs="String">
<value />
</setting>
<setting name="SmtpAuth" serializeAs="String">
<value>PLAIN</value>
</setting>
<setting name="HelpOnline" serializeAs="String">
<value>True</value>
</setting>
<setting name="HelpOffline" serializeAs="String">
<value>False</value>
</setting>
<setting name="CVSEXE" serializeAs="String">
<value />
</setting>
<setting name="CVSROOT" serializeAs="String">
<value />
</setting>
<setting name="ProjectLocation" serializeAs="String">
<value />
</setting>
<setting name="DeleteOldFiles" serializeAs="String">
<value>False</value>
</setting>
<setting name="CodeCompletionUserVar" serializeAs="String">
<value>False</value>
</setting>
<setting name="CodeCompletion" serializeAs="String">
<value>True</value>
</setting>
<setting name="CommentCStyle" serializeAs="String">
<value>False</value>
</setting>
<setting name="SkipWarnings" serializeAs="String">
<value>False</value>
</setting>
<setting name="SingleQuote" serializeAs="String">
<value>False</value>
</setting>
<setting name="QuotesListVerbose" serializeAs="String">
<value>False</value>
</setting>
<setting name="CodeCompletionArguments" serializeAs="String">
<value>True</value>
</setting>
<setting name="IndentWarning" serializeAs="String">
<value>True</value>
</setting>
<setting name="IndentAutoCorrect" serializeAs="String">
<value>False</value>
</setting>
<setting name="SvnExe" serializeAs="String">
<value />
</setting>
<setting name="SvnUserid" serializeAs="String">
<value />
</setting>
<setting name="SvnPassword" serializeAs="String">
<value />
</setting>
<setting name="ShowSolutionExplorer" serializeAs="String">
<value>False</value>
</setting>
<setting name="WorkingDirectory" serializeAs="String">
<value />
</setting>
<setting name="XSecondLifeShard" serializeAs="String">
<value>Production</value>
</setting>
<setting name="AutoSaveOnDebug" serializeAs="String">
<value>False</value>
</setting>
<setting name="ToolTip" serializeAs="String">
<value>True</value>
</setting>
<setting name="HelpNewTab" serializeAs="String">
<value>True</value>
</setting>
<setting name="CodeCompletionAnimation" serializeAs="String">
<value>True</value>
</setting>
<setting name="ExampleNameNotecard" serializeAs="String">
<value>NoteCard.txt</value>
</setting>
<setting name="llGetScriptName" serializeAs="String">
<value>False</value>
</setting>
<setting name="StatesInGlobalFunctions" serializeAs="String">
<value>False</value>
</setting>
<setting name="ParcelName" serializeAs="String">
<value>LSLEditor parcel</value>
</setting>
<setting name="ParcelDescription" serializeAs="String">
<value>Description of LSLEditor parcel</value>
</setting>
<setting name="ParcelOwner" serializeAs="String">
<value>00000000-0000-0000-0000-000000000000</value>
</setting>
<setting name="ParcelGroup" serializeAs="String">
<value>00000000-0000-0000-0000-000000000000</value>
</setting>
<setting name="ParcelArea" serializeAs="String">
<value>512</value>
</setting>
<setting name="VersionControl" serializeAs="String">
<value>True</value>
</setting>
<setting name="VersionControlSVN" serializeAs="String">
<value>True</value>
</setting>
<setting name="OutputFormat" serializeAs="String">
<value>UTF-8</value>
</setting>
<setting name="ParcelID" serializeAs="String">
<value>00000000-0000-0000-0000-000000000000</value>
</setting>
<setting name="ParcelSeeAvatars" serializeAs="String">
<value>True</value>
</setting>
<setting name="ShowIncludeMetaData" serializeAs="String">
<value>True</value>
</setting>
<setting name="ExampleNameLSLI" serializeAs="String">
<value>default.lsli</value>
</setting>
</LSLEditor.Properties.Settings>
<lsleditor.Properties.Settings>
<setting name="AvatarName" serializeAs="String">
<value>SecondLife Name</value>
</setting>
<setting name="BrowserInWindow" serializeAs="String">
<value>False</value>
</setting>
<setting name="AvatarKey" serializeAs="String">
<value />
</setting>
<setting name="RegionName" serializeAs="String">
<value>LSLEditor Island</value>
</setting>
<setting name="EmailServer" serializeAs="String">
<value>smtp.emailserver.tld</value>
</setting>
<setting name="EmailAddress" serializeAs="String">
<value>youraddress@yourdomain.ext</value>
</setting>
<setting name="ProxyServer" serializeAs="String">
<value />
</setting>
<setting name="ProxyUserid" serializeAs="String">
<value />
</setting>
<setting name="ProxyPassword" serializeAs="String">
<value />
</setting>
<setting name="BrowserLocation" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="FindLocation" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="BrowserSize" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="Help" serializeAs="String">
<value>http://www.lslwiki.net/lslwiki/wakka.php?wakka=</value>
</setting>
<setting name="LSLEditorLocation" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="LSLEditorSize" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="RegionFPS" serializeAs="String">
<value>25</value>
</setting>
<setting name="SimulatorSize" serializeAs="String">
<value>0, 175</value>
</setting>
<setting name="SimulatorLocation" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="RegionCorner" serializeAs="String">
<value>254464, 255232</value>
</setting>
<setting name="TabbedDocument" serializeAs="String">
<value>True</value>
</setting>
<setting name="SLColorScheme" serializeAs="String">
<value>False</value>
</setting>
<setting name="SL4SpacesIndent" serializeAs="String">
<value>False</value>
</setting>
<setting name="AutoWordSelection" serializeAs="String">
<value>False</value>
</setting>
<setting name="GotoLocation" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="WikiSeperateBrowser" serializeAs="String">
<value>False</value>
</setting>
<setting name="BracketHighlight" serializeAs="String">
<value>224, 224, 224</value>
</setting>
<setting name="SolutionSize" serializeAs="String">
<value>175, 0</value>
</setting>
<setting name="CallUpgrade" serializeAs="String">
<value>True</value>
</setting>
<setting name="RecentFileMax" serializeAs="String">
<value>15</value>
</setting>
<setting name="CheckForUpdates" serializeAs="String">
<value>True</value>
</setting>
<setting name="CheckEveryDay" serializeAs="String">
<value>True</value>
</setting>
<setting name="CheckEveryWeek" serializeAs="String">
<value>False</value>
</setting>
<setting name="CheckDate" serializeAs="String">
<value>2010-01-01</value>
</setting>
<setting name="RecentProjectMax" serializeAs="String">
<value>15</value>
</setting>
<setting name="IndentCursorPlacement" serializeAs="String">
<value>False</value>
</setting>
<setting name="IndentFullAuto" serializeAs="String">
<value>True</value>
</setting>
<setting name="Indent" serializeAs="String">
<value>True</value>
</setting>
<setting name="SmtpUserid" serializeAs="String">
<value />
</setting>
<setting name="SmtpPassword" serializeAs="String">
<value />
</setting>
<setting name="SmtpAuth" serializeAs="String">
<value>PLAIN</value>
</setting>
<setting name="HelpOnline" serializeAs="String">
<value>True</value>
</setting>
<setting name="HelpOffline" serializeAs="String">
<value>False</value>
</setting>
<setting name="CVSEXE" serializeAs="String">
<value />
</setting>
<setting name="CVSROOT" serializeAs="String">
<value />
</setting>
<setting name="ProjectLocation" serializeAs="String">
<value />
</setting>
<setting name="DeleteOldFiles" serializeAs="String">
<value>False</value>
</setting>
<setting name="CodeCompletionUserVar" serializeAs="String">
<value>False</value>
</setting>
<setting name="CodeCompletion" serializeAs="String">
<value>True</value>
</setting>
<setting name="CommentCStyle" serializeAs="String">
<value>False</value>
</setting>
<setting name="SkipWarnings" serializeAs="String">
<value>False</value>
</setting>
<setting name="SingleQuote" serializeAs="String">
<value>False</value>
</setting>
<setting name="QuotesListVerbose" serializeAs="String">
<value>False</value>
</setting>
<setting name="CodeCompletionArguments" serializeAs="String">
<value>True</value>
</setting>
<setting name="IndentWarning" serializeAs="String">
<value>True</value>
</setting>
<setting name="IndentAutoCorrect" serializeAs="String">
<value>False</value>
</setting>
<setting name="SvnExe" serializeAs="String">
<value />
</setting>
<setting name="SvnUserid" serializeAs="String">
<value />
</setting>
<setting name="SvnPassword" serializeAs="String">
<value />
</setting>
<setting name="ShowSolutionExplorer" serializeAs="String">
<value>False</value>
</setting>
<setting name="WorkingDirectory" serializeAs="String">
<value />
</setting>
<setting name="XSecondLifeShard" serializeAs="String">
<value>Production</value>
</setting>
<setting name="AutoSaveOnDebug" serializeAs="String">
<value>False</value>
</setting>
<setting name="ToolTip" serializeAs="String">
<value>True</value>
</setting>
<setting name="HelpNewTab" serializeAs="String">
<value>True</value>
</setting>
<setting name="CodeCompletionAnimation" serializeAs="String">
<value>True</value>
</setting>
<setting name="ExampleNameNotecard" serializeAs="String">
<value>NoteCard.txt</value>
</setting>
<setting name="llGetScriptName" serializeAs="String">
<value>False</value>
</setting>
<setting name="StatesInGlobalFunctions" serializeAs="String">
<value>False</value>
</setting>
<setting name="ParcelName" serializeAs="String">
<value>LSLEditor parcel</value>
</setting>
<setting name="ParcelDescription" serializeAs="String">
<value>Description of LSLEditor parcel</value>
</setting>
<setting name="ParcelOwner" serializeAs="String">
<value>00000000-0000-0000-0000-000000000000</value>
</setting>
<setting name="ParcelGroup" serializeAs="String">
<value>00000000-0000-0000-0000-000000000000</value>
</setting>
<setting name="ParcelArea" serializeAs="String">
<value>512</value>
</setting>
<setting name="VersionControl" serializeAs="String">
<value>True</value>
</setting>
<setting name="VersionControlSVN" serializeAs="String">
<value>True</value>
</setting>
<setting name="OutputFormat" serializeAs="String">
<value>UTF-8</value>
</setting>
</lsleditor.Properties.Settings>
</userSettings>
<applicationSettings>
<LSLEditor.Properties.Settings>
<setting name="ConfLSL" serializeAs="String">
<value>Resource.ConfLSL.xml</value>
</setting>
<setting name="ExampleName" serializeAs="String">
<value>new.lsl</value>
</setting>
<setting name="ReleaseNotes" serializeAs="String">
<value>ReleaseNotes.htm</value>
</setting>
<setting name="About" serializeAs="String">
<value>About.htm</value>
</setting>
<setting name="TabStops" serializeAs="String">
<value>4</value>
</setting>
<setting name="ToolTipDelay" serializeAs="String">
<value>100</value>
</setting>
<setting name="PathClipLength" serializeAs="String">
<value>60</value>
</setting>
<setting name="ExampleTemplate" serializeAs="String">
<value>default.lsl</value>
</setting>
<setting name="HelpOfflineFile" serializeAs="String">
<value>LSLEditorHelp.chm</value>
</setting>
<setting name="Example" serializeAs="String">
<value>
default
{
state_entry()
{
llSay(0, "Hello, Avatar!");
}
touch_start(integer total_number)
{
llSay(0, "Touched: "+(string)total_number);
}
}
</value>
</setting>
<setting name="Examples" serializeAs="String">
<value>http://www.lsleditor.org/examples/</value>
</setting>
<setting name="Upload" serializeAs="String">
<value>http://www.lsleditor.org/uploadscript/</value>
</setting>
<setting name="ConfCSharp" serializeAs="String">
<value>Resource.ConfCSharp.xml</value>
</setting>
<setting name="ToolsOptions" serializeAs="String">
<value>Resource.ToolsOptions.xml</value>
</setting>
<setting name="ContactUrl" serializeAs="String">
<value>https://sourceforge.net/tracker/?group_id=319248</value>
</setting>
<setting name="DonateUrl" serializeAs="String">
<value>http://www.lsleditor.org/donate.htm</value>
</setting>
<setting name="Help2" serializeAs="String">
<value>http://wiki.secondlife.com/wiki/Special:Search?go=Go&amp;search=</value>
</setting>
<setting name="Help1" serializeAs="String">
<value>http://www.lslwiki.net/lslwiki/wakka.php?wakka=</value>
</setting>
<setting name="ForumLSLEditor" serializeAs="String">
<value>https://sourceforge.net/projects/lsleditor/forums</value>
</setting>
<setting name="qasite" serializeAs="String">
<value>http://metaversegames.net/questions/lsl</value>
</setting>
<setting name="svnloc" serializeAs="String">
<value />
</setting>
<setting name="Update" serializeAs="String">
<value>http://lsleditor.sourceforge.net/check4update.php</value>
</setting>
<setting name="UpdateManifest" serializeAs="String">
<value>http://lsleditor.sourceforge.net/update.php</value>
</setting>
<setting name="Update1" serializeAs="String">
<value>http://a-w-d.dyndns.org:8080/lsleditor/check4update.php</value>
</setting>
<setting name="UpdateManifest1" serializeAs="String">
<value>http://a-w-d.dyndns.org:8080/lsleditor/update.php</value>
</setting>
</LSLEditor.Properties.Settings>
<lsleditor.Properties.Settings>
<setting name="ConfLSL" serializeAs="String">
<value>Resource.ConfLSL.xml</value>
</setting>
<setting name="ExampleName" serializeAs="String">
<value>new.lsl</value>
</setting>
<setting name="ReleaseNotes" serializeAs="String">
<value>ReleaseNotes.htm</value>
</setting>
<setting name="About" serializeAs="String">
<value>About.htm</value>
</setting>
<setting name="TabStops" serializeAs="String">
<value>4</value>
</setting>
<setting name="ToolTipDelay" serializeAs="String">
<value>100</value>
</setting>
<setting name="PathClipLength" serializeAs="String">
<value>60</value>
</setting>
<setting name="ExampleTemplate" serializeAs="String">
<value>default.lsl</value>
</setting>
<setting name="HelpOfflineFile" serializeAs="String">
<value>LSLEditorHelp.chm</value>
</setting>
<setting name="Example" serializeAs="String">
<value>
default
{
state_entry()
{
llSay(0, "Hello, Avatar!");
}
touch_start(integer total_number)
{
llSay(0, "Touched: "+(string)total_number);
}
}
</value>
</setting>
<setting name="Examples" serializeAs="String">
<value>http://www.lsleditor.org/examples/</value>
</setting>
<setting name="Upload" serializeAs="String">
<value>http://www.lsleditor.org/uploadscript/</value>
</setting>
<setting name="ConfCSharp" serializeAs="String">
<value>Resource.ConfCSharp.xml</value>
</setting>
<setting name="ToolsOptions" serializeAs="String">
<value>Resource.ToolsOptions.xml</value>
</setting>
<setting name="ContactUrl" serializeAs="String">
<value>https://sourceforge.net/tracker/?group_id=319248</value>
</setting>
<setting name="DonateUrl" serializeAs="String">
<value>http://www.lsleditor.org/donate.htm</value>
</setting>
<setting name="Help2" serializeAs="String">
<value>http://wiki.secondlife.com/wiki/Special:Search?go=Go&amp;search=</value>
</setting>
<setting name="Help1" serializeAs="String">
<value>http://www.lslwiki.net/lslwiki/wakka.php?wakka=</value>
</setting>
<setting name="ForumLSLEditor" serializeAs="String">
<value>https://sourceforge.net/projects/lsleditor/forums</value>
</setting>
<setting name="qasite" serializeAs="String">
<value>http://metaversegames.net/questions/lsl</value>
</setting>
<setting name="svnloc" serializeAs="String">
<value />
</setting>
<setting name="Update" serializeAs="String">
<value>http://lsleditor.sourceforge.net/check4update.php</value>
</setting>
<setting name="UpdateManifest" serializeAs="String">
<value>http://lsleditor.sourceforge.net/update.php</value>
</setting>
<setting name="Update1" serializeAs="String">
<value>http://a-w-d.dyndns.org:8080/lsleditor/check4update.php</value>
</setting>
<setting name="UpdateManifest1" serializeAs="String">
<value>http://a-w-d.dyndns.org:8080/lsleditor/update.php</value>
</setting>
</lsleditor.Properties.Settings>
</applicationSettings>
</configuration>

View file

@ -1,63 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
using System.IO;
// BZip2.Decompress(File.OpenRead("in"), File.Create("out"));
namespace LSLEditor.Decompressor
{
public sealed class BZip2
{
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();
}
}
}
}
}
}

View file

@ -1,160 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
// Browser.cs
//
// </summary>
using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Imaging;
using System.Windows.Forms;
using LSLEditor.Docking;
namespace LSLEditor
{
public partial class Browser : DockContent
{
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) {
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) {
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) {
this.tabControl1.TabPages.RemoveAt(intTabToClose);
}
}
private void tabControl1_MouseDown(object sender, MouseEventArgs e)
{
TabControl tabControl = sender as TabControl;
if (tabControl != null) {
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));
}
}
}
}
}
}
}

View file

@ -1,93 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
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);
}
}
}
}

View file

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -1,638 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
using System.IO;
using System.Xml;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using LSLEditor.Docking;
using LSLEditor.Helpers;
using System.Collections.Generic;
namespace LSLEditor
{
public partial class EditForm : DockContent
{
public RuntimeConsole runtime;
public List<string> verboseQueue = new List<string>();
private string m_FullPathName;
private Guid m_Guid;
// private bool sOutline = true;
public LSLEditorForm parent;
public Encoding encodedAs = null;
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.setEditform(this);
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);
ImageList imageList = new ImageList();
imageList.Images.Add(Images.Images.Unknown);
imageList.Images.Add(Images.Images.Functions);
imageList.Images.Add(Images.Images.Events);
imageList.Images.Add(Images.Images.Constants);
imageList.Images.Add(Images.Images.Class);
imageList.Images.Add(Images.Images.Vars);
imageList.Images.Add(Images.Images.Properties);
imageList.Images.Add(Images.Images.States);
this.tvOutline.ImageList = imageList;
if (lslEditorForm.outlineToolStripMenuItem.Checked) {
splitContainer1.Panel2Collapsed = false;
} else {
splitContainer1.Panel2Collapsed = true;
}
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)
{
if(parent.IsReadOnly(this))
{
Dirty = false;
return;
}
if(this.Text == null || this.ScriptName == null)
{
this.Text = this.ScriptName;
}
if (LSLIPathHelper.GetExpandedTabName(this.ScriptName) == this.Text)
{
if (this.numberedTextBoxUC1.TextBox.Dirty)
{
this.Text = this.Text.Trim() + "* ";
}
}
else
{
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 intResult;
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) {
intResult = 50;
} else {
intResult = (int)Math.Round((100.0 * intTabs) / (intTabs + intSpaces));
}
return intResult;
}
public void LoadFile(string strPath)
{
if (strPath.StartsWith("http://")) {
this.FullPathName = Path.GetFileName(strPath);
} else {
this.FullPathName = strPath;
}
this.encodedAs = this.numberedTextBoxUC1.TextBox.LoadFile(strPath);
if (this.IsScript) {
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)
{
// Check if this is an expanded.lsl
if (!LSLIPathHelper.IsExpandedLSL(strPath))
{
this.FullPathName = strPath;
Encoding encodeAs = this.encodedAs;
if (this.IsScript && encodeAs == null)
{
switch (Properties.Settings.Default.OutputFormat)
{
case "UTF8":
encodeAs = Encoding.UTF8;
break;
case "Unicode":
encodeAs = Encoding.Unicode;
break;
case "BigEndianUnicode":
encodeAs = Encoding.BigEndianUnicode;
break;
default:
encodeAs = Encoding.Default;
break;
}
}
else if (encodeAs == null)
{
encodeAs = Encoding.UTF8;
}
this.numberedTextBoxUC1.TextBox.SaveCurrentFile(strPath, encodeAs);
this.encodedAs = encodeAs;
} else if (LSLIPathHelper.IsExpandedLSL(strPath))
{
string LSLIfilePath = LSLIPathHelper.CreateCollapsedPathAndScriptName(strPath);
// Check if an LSLI version of this script exists
if (File.Exists(LSLIfilePath))
{
// Save the LSLI file as well
File.WriteAllText(LSLIfilePath, LSLIConverter.CollapseToLSLI(this.numberedTextBoxUC1.TextBox.Text));
EditForm form = null;
// If it's currently open, then refresh it
for (int i = 0; i < Application.OpenForms.Count; i++)
{
Form openForm = Application.OpenForms[i];
string filename = LSLIPathHelper.TrimStarsAndWhiteSpace(openForm.Text);
if (filename == Path.GetFileName(LSLIfilePath))
{
form = (EditForm)openForm;
}
}
if (form != null && form.Enabled)
{
parent.OpenFile(LSLIfilePath, Guid.NewGuid(), true);
form.Close();
}
}
this.numberedTextBoxUC1.TextBox.Dirty = false;
this.Text = LSLIPathHelper.GetExpandedTabName(strPath);
}
}
public void SaveCurrentFile()
{
this.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()
{
bool blnResult = false;
//if (this.disableCompilesyntaxCheckToolStripMenuItem.Checked)
// return false;
if (this.IsScript) {
StopCompiler();
if (this.parent != null) {
runtime = new RuntimeConsole(this.parent);
// for disposing
this.components.Add(runtime);
foreach (string message in verboseQueue)
{
runtime.VerboseConsole(message);
if (message.StartsWith("Error: "))
{
StopCompiler();
this.tabControl1.SelectedIndex = 0;
verboseQueue = new List<string>();
return false;
}
}
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;
blnResult = true;
}
}
return blnResult;
}
public bool SyntaxCheck()
{
bool blnResult = false;
//if (this.disableCompilesyntaxCheckToolStripMenuItem.Checked)
// return false;
if (this.IsScript) {
string lsl = SourceCode;
// If it is LSLI, it needs to import scripts first, before it recognizes imported functions
if (LSLIPathHelper.IsLSLI(this.FullPathName))
{
LSLIConverter converter = new LSLIConverter();
lsl = converter.ExpandToLSL(this);
}
LSL2CSharp translator = new LSL2CSharp(ConfLSL);
string strCSharp = translator.Parse(lsl);
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);
}
blnResult = (null != CompilerHelper.CompileCSharp(this, strCSharp));
}
return blnResult;
}
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) {
string scriptToSave = ScriptName;
if (LSLIPathHelper.IsExpandedLSL(ScriptName))
{
// Expanded scripts will always be saved as LSLI's
scriptToSave = LSLIPathHelper.CreateCollapsedScriptName(scriptToSave);
}
DialogResult dialogResult = MessageBox.Show(this, @"Save """ + scriptToSave + @"""?", "File has changed", MessageBoxButtons.YesNoCancel);
if (dialogResult == DialogResult.Yes) {
e.Cancel = !this.parent.SaveFile(this, false);
} else {
e.Cancel = (dialogResult == DialogResult.Cancel);
}
}
if (!e.Cancel)
{
// Close related readonly's if this is an expanded script
if (LSLIPathHelper.IsExpandedLSL(ScriptName))
{
// Check if a LSLI readonly is open
EditForm readOnlyLSLI = (EditForm)parent.GetForm(Path.GetFileName(LSLIPathHelper.GetReadOnlyTabName(ScriptName)));
if (readOnlyLSLI != null)
{
readOnlyLSLI.Close();
}
}
if(!this.parent.IsReadOnly(this)) // If this is not a readonly (LSLI)
{
// Delete expanded file when closing
string expandedFile = LSLIPathHelper.CreateExpandedPathAndScriptName(FullPathName);
EditForm expandedForm = (EditForm)parent.GetForm(LSLIPathHelper.GetExpandedTabName(Path.GetFileName(expandedFile)));
if (expandedForm != null && !LSLIPathHelper.IsExpandedLSL(ScriptName))
{
expandedForm.Close();
}
if (File.Exists(expandedFile))
{
File.Delete(expandedFile);
}
}
}
this.parent.CancelClosing = e.Cancel;
}
private void disableCompilesyntaxCheckToolStripMenuItem_Click(object sender, EventArgs e)
{
//this.disableCompilesyntaxCheckToolStripMenuItem.Checked = !this.disableCompilesyntaxCheckToolStripMenuItem.Checked;
}
private void tvOutline_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{
this.parent.BeginInvoke(new TreeNodeMouseClickEventHandler(
delegate(object sender2, TreeNodeMouseClickEventArgs e2)
{
if (e.Node.Tag is Helpers.OutlineHelper) {
Helpers.OutlineHelper ohOutline = (Helpers.OutlineHelper)e.Node.Tag;
if (ohOutline.line < this.TextBox.Lines.Length) {
//editForm.Focus();
//editForm.TextBox.Select();
//editForm.TextBox.Goto(ohOutline.line + 1);
//TextBox.Focus();
this.TextBox.Select();
this.TextBox.SelectionStart = this.TextBox.GetFirstCharIndexFromLine(ohOutline.line);
}
}
}), sender, e);
}
private void tvOutline_AfterSelect(object sender, TreeViewEventArgs e)
{
//this.TextBox.Select
}
private void splitContainer1_Click(object sender, EventArgs e)
{
}
private void tvOutline_VisibleChanged(object sender, EventArgs e)
{
this.tvOutline.ExpandAll();
}
}
}

View file

@ -1,39 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>

View file

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -1,85 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
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);
this.syntaxRichTextBox1.OnCursorPositionChanged += new LSLEditor.SyntaxRichTextBox.CursorPositionChangedHandler(syntaxRichTextBox1_OnCursorPositionChanged);
}
void syntaxRichTextBox1_OnCursorPositionChanged(object sender, LSLEditor.SyntaxRichTextBox.CursorPositionEventArgs e)
{
this.numbered1.Invalidate();
}
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;
}
}
}
}

View file

@ -1,289 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
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) {
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) {
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) {
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();
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,89 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
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) {
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;
}
}
}
}

View file

@ -1,100 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System.Collections.Generic;
using System.Drawing;
using System.Text.RegularExpressions;
namespace LSLEditor.Helpers
{
class CodeCompletion
{
Regex regex;
public CodeCompletion()
{
this.regex = new Regex(
@"
\b(?<type>integer|float|string|vector|rotation|state|key|list)\s
(?>
\s* (?<name>[\w]*) \s*
(?>\= \s*
(?:
(?>
[^(),;]+
| \( (?<nr>)
| \) (?<-nr>)
)*
(?(nr)(?!))
)
\s*)? [,;)]
)*
"
,
RegexOptions.IgnorePatternWhitespace | RegexOptions.Compiled);
}
public void CodeCompletionUserVar(string strKeyWord, string strTextIn, int intStart, List<KeyWordInfo> 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;
}
}
}
}
}
}

View file

@ -1,111 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
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");
}
}
}

View file

@ -1,67 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
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;
}
}
}

View file

@ -1,684 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
// This class is used to convert LSLI to LSL and the other way around.
// Created by Jasper Wiggerink
// 13-11-2017
// </summary>
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
namespace LSLEditor.Helpers
{
class LSLIConverter
{
private EditForm editForm;
private const string BEGIN = "//#BEGIN";
private const string END = "//#END";
private const string INCLUDE = "//#include";
public const string EXPANDED_SUBEXT = ".expanded";
public const string LSL_EXT = ".lsl";
public const string LSLI_EXT = ".lsli";
public static List<string> validExtensions = new List<string>() { LSLI_EXT, LSL_EXT };
private const string INCLUDE_REGEX = "(\n|^)\\s*" + INCLUDE + "\\(\".*?\"\\).*";
private const string BEGIN_REGEX = "(\\s+|^)" + BEGIN;
private const string END_REGEX = "(\\s+|^)" + END;
private const string EMPTY_OR_WHITESPACE_REGEX = "^\\s*$";
private const string PATH_OF_INCLUDE_REGEX = "\".*?\"";
private const string EMPTY_SCRIPT = "// Empty script\n";
private List<string> implementedIncludes = new List<string>();
private int includeDepth = 0;
public LSLIConverter()
{
}
/// <summary>
/// Searches for a file with one of the validExtensions based on a name or path. Also searches in the IncludeDirectories
/// </summary>
/// <param name="file"></param>
/// <returns>File path</returns>
private static string SearchFile(string file)
{
// Search in optional include directories
foreach (string directory in Properties.Settings.Default.IncludeDirectories)
{
string pFile;
if (file.ToLower().Contains(directory.ToLower()))
{
pFile = file;
}
else
{
pFile = directory + file;
}
if (File.Exists(pFile))
{
return pFile;
}
if (Path.GetExtension(file) == "")
{
foreach (string extension in validExtensions)
{
if (file.Contains(directory))
{
pFile = file + extension;
}
else
{
pFile = directory + file + extension;
}
if (File.Exists(pFile))
{
return pFile;
}
}
}
}
// Search for file relative to the script
if (File.Exists(file))
{
return file;
}
if (Path.GetExtension(file) == "")
{
string pFile = "";
foreach (string extension in validExtensions)
{
pFile = file + extension;
if (File.Exists(pFile)) {
return pFile;
}
}
}
return "";
}
/// <summary>
/// Returns the path of the file
/// </summary>
/// <param name="pathOfInclude"></param>
/// <param name="pathOfScript"></param>
/// <returns></returns>
private string GetFilePath(string pathOfInclude, string pathOfScript)
{
// Step 1 (optional). Search from include directories
// Step 2. Search from relative path from script
string pathOfIncludeOriginal = pathOfInclude;
pathOfInclude = SearchFile(pathOfInclude);
if (pathOfInclude == "")
{
// If path is relative and no includedirectories
if (!Path.IsPathRooted(pathOfIncludeOriginal))
{
pathOfInclude = LSLIPathHelper.GetRelativePath(pathOfScript, Environment.CurrentDirectory) + pathOfIncludeOriginal;
}
else if (this.implementedIncludes.Count > 0) // If there are already includes, the relative path is already correct
{
pathOfInclude = Path.GetDirectoryName(this.implementedIncludes.LastOrDefault()) + '\\' + pathOfIncludeOriginal;
}
else
{
pathOfInclude = pathOfIncludeOriginal;
}
// If path is absolute it will stay the pathOfInclude
pathOfInclude = SearchFile(pathOfInclude);
}
return pathOfInclude;
}
/// <summary>
/// Finds all indexes of a value in a string
/// </summary>
/// <param name="str"></param>
/// <param name="value"></param>
/// <returns></returns>
public static List<int> AllIndexesOf(string str, string value)
{
if (!String.IsNullOrEmpty(value))
{
List<int> indexes = new List<int>();
for (int index = 0; ; index += value.Length)
{
index = str.IndexOf(value, index);
if (index == -1)
return indexes;
indexes.Add(index);
}
}
return null;
}
/// <summary>
/// Compares 2 paths and returns true if they are different, false if they're the same.
/// Warning: This doesn't compare extensions.
/// </summary>
/// <param name="pathOfInclude"></param>
/// <param name="pathOfScript"></param>
/// <returns></returns>
public static bool IsDifferentScript(string pathOfInclude, string pathOfScript)
{
string pathOfScriptNoExt = LSLIPathHelper.RemoveExpandedSubExtension(Path.GetFileNameWithoutExtension(pathOfScript));
string pathOfIncludeNoExt = LSLIPathHelper.RemoveExpandedSubExtension(Path.GetFileNameWithoutExtension(pathOfInclude));
// Compare paths
return !pathOfScriptNoExt.EndsWith(pathOfIncludeNoExt);
}
/// <summary>
/// This is a hack to get the correct line, since problems arose in WriteAfterLine when inserting index-based.
/// It checks for each occurance of lineBefore (when it's an include statement) if it has a BEGIN after it.
/// </summary>
/// <param name="lineBefore"></param>
/// <returns></returns>
private int GetCorrectIndexOfLine(string lineBefore, string context)
{
string trimmedLine = Regex.Replace(lineBefore, @"\s+", "");
string matchString = Regex.Match(trimmedLine, INCLUDE_REGEX).ToString();
// Tussen de één na laatste en de laatste moet de include statement staan, of na de laatste
int lastButOneNewLineIndex = lineBefore.TrimEnd('\n').LastIndexOf('\n') > -1 ? lineBefore.TrimEnd('\n').LastIndexOf('\n') : 0;
string lineBeforeAfterLastButOneNewLine = lineBefore.Substring(lastButOneNewLineIndex).TrimEnd('\n'); // Best variable name ever?
if (Regex.IsMatch(lineBefore.TrimEnd('\n'), INCLUDE_REGEX)
&& Regex.IsMatch(lineBeforeAfterLastButOneNewLine, INCLUDE_REGEX)) // Line before this line is an include statement, that means this is a BEGIN statement //lineBefore.TrimEnd('\n').EndsWith(matchString)
{
// Get all matches with this linebefore
List<int> allIndexes = AllIndexesOf(context, lineBefore);
foreach (int index in allIndexes)
{
// Check wether there is already a begin statement
string targetText = context.Substring(index + lineBefore.Length); // This is the text after lineBefore
targetText = Regex.Replace(targetText, @"\s+", "");
if (targetText.StartsWith(BEGIN)) // If the targetted text starts with BEGIN, then we should keep searching
{
continue;
} else
{
return index; // Found a free spot! Return the index
}
}
}
return context.LastIndexOf(lineBefore); // If the lineBefore is not an include statement, simply return the last index of it.
}
/// <summary>
/// Creates a new line in the context after another line
/// </summary>
/// <param name="context"></param>
/// <param name="newLine"></param>
/// <param name="lineBefore"></param>
/// <returns>Context with the new line</returns>
private StringBuilder WriteAfterLine(StringBuilder context, string newLine, string lineBefore)
{
string ctx = context.ToString();
int lastIndexOfLineBefore = GetCorrectIndexOfLine(lineBefore, ctx);
int includeIndex = lastIndexOfLineBefore + lineBefore.Length;
string hasSeperator = lineBefore.Substring(lineBefore.Length - 1, 1);
if (hasSeperator != "\n")
{
newLine = "\n" + newLine;
}
hasSeperator = newLine.Substring(newLine.Length - 1, 1);
if (hasSeperator != "\n")
{
newLine += "\n";
}
context.Insert(includeIndex, newLine);
return context;
}
/// <summary>
/// Shows an 'Oops...' messagebox with the message and verboses it.
/// </summary>
/// <param name="message"></param>
private void ShowError(string message)
{
if (!editForm.verboseQueue.Contains(message))
{
MessageBox.Show(message, "Oops...", MessageBoxButtons.OK, MessageBoxIcon.Error);
editForm.verboseQueue.Add(message);
}
}
/// <summary>
/// Returns the amount of tabs for an include depth
/// </summary>
/// <param name="includeDepth"></param>
/// <param name="OneLess"></param>
/// <returns></returns>
private string GetTabsForIncludeDepth(int includeDepth, bool OneLess = false)
{
string tabs = "";
if(OneLess && includeDepth != 0)
{
includeDepth--;
}
for(int i = 0; i < includeDepth; i++)
{
tabs += "\t";
}
return tabs;
}
/// <summary>
/// Returns the amount of tabs in front of an include statement
/// </summary>
/// <param name="includeLine"></param>
/// <returns></returns>
private string GetTabsForIndentedInclude(string includeLine, int includeDepth, bool isDebug = false)
{
if(includeLine.Contains('\t'))
{
int includeIndex = Regex.Match(includeLine, INCLUDE).Index;
string beforeInclude = includeLine.Substring(0, includeIndex);
if(beforeInclude.Contains('\n'))
{
// Last '\n' before includeIndex
int lastIndexNewLine = beforeInclude.LastIndexOf('\n');
beforeInclude = beforeInclude.Substring(lastIndexNewLine, beforeInclude.Length - lastIndexNewLine);
}
int tabCount = 0;
// Count the tabs between the start of the line and the begin of the include.
if (isDebug)
{
tabCount = beforeInclude.Count(f => f == '\t') - (includeDepth - 1); // The tabcount should be without the includeDepth, because this was already added.
} else
{
tabCount = beforeInclude.Count(f => f == '\t');
}
string tabs = "";
for (int i = 0; i < tabCount; i++)
{
tabs += "\t";
}
return tabs;
}
return "";
}
/// <summary>
/// Returns the amount of spaces in front of an include statement
/// </summary>
/// <param name="includeLine"></param>
/// <returns></returns>
private string GetSpacesForIndentedInclude(string includeLine, int includeDepth, bool isDebug = false)
{
if (includeLine.Contains(" "))
{
int includeIndex = Regex.Match(includeLine, INCLUDE).Index;
string beforeInclude = includeLine.Substring(0, includeIndex);
int spaceCount = 0;
// Count the space between the start of the line and the begin of the include.
if (isDebug)
{
// The spacecount should be without the includeDepth, because this was already added.
spaceCount = beforeInclude.Count(f => f == ' ') - (includeDepth - 1);
}
else
{
spaceCount = beforeInclude.Count(f => f == ' ');
}
string spaces = "";
for (int i = 0; i < spaceCount; i++)
{
spaces += " ";
}
return spaces;
}
return "";
}
/// <summary>
/// Returns the amount of tabs/spaces for an include script
/// </summary>
/// <param name="includeLine"></param>
/// <param name="includeDepth"></param>
/// <param name="OneLess"></param>
/// <returns></returns>
private string GetTabsForIncludeScript(string includeLine, int includeDepth, bool OneLess = false)
{
string includeDepthTabs = GetTabsForIncludeDepth(includeDepth, OneLess);
string indentedIncludeTabs = GetTabsForIndentedInclude(includeLine, includeDepth, true);
string spacesForIndentedInclude = GetSpacesForIndentedInclude(includeLine, includeDepth, true);
return includeDepthTabs + indentedIncludeTabs + spacesForIndentedInclude;
}
/// <summary>
/// Returns the line of the match within a context
/// </summary>
/// <param name="context"></param>
/// <param name="m"></param>
/// <returns></returns>
private string GetLineOfMatch(string context, Match m)
{
string contentAfterMatchValue = context.Substring(m.Index + m.Value.Length);
int indexOfNewLine = contentAfterMatchValue.IndexOf('\n') + m.Index + m.Value.Length + 1; // Index of the first occurence of \n after this match
return context.Substring(m.Index, indexOfNewLine - m.Index); // Get full line
}
/// <summary>
/// Inserts an included script and writes the expanded script for export.
/// </summary>
/// <param name="pathOfInclude"></param>
/// <param name="sb"></param>
/// <param name="line"></param>
/// <returns></returns>
private StringBuilder WriteExportScript(string pathOfInclude, StringBuilder sb, string includeLine)
{
string script = GetTabsForIndentedInclude(includeLine, includeDepth) + EMPTY_SCRIPT;
using (StreamReader sr = new StreamReader(pathOfInclude))
{
this.implementedIncludes.Add(Path.GetFullPath(pathOfInclude));
string scriptRaw = sr.ReadToEnd();
scriptRaw = GetTabsForIndentedInclude(includeLine, includeDepth) + scriptRaw.Replace("\n", "\n" + GetTabsForIndentedInclude(includeLine, includeDepth));
// If there are includes in the included script
if (Regex.IsMatch(scriptRaw, INCLUDE_REGEX))
{
// Then import these scripts too
script = ImportScripts(scriptRaw, pathOfInclude, false) + "\n";
}
else if (!Regex.IsMatch(scriptRaw, EMPTY_OR_WHITESPACE_REGEX))
{
script = scriptRaw + "\n";
}
}
this.WriteAfterLine(sb, script, includeLine);
string ctx = sb.ToString();
return new StringBuilder(ctx.Remove(ctx.IndexOf(includeLine.TrimStart('\n')), includeLine.TrimStart('\n').Length)); // Deletes the include statement
}
/// <summary>
/// Inserts an included script and writes it to the expanded script for debug.
/// </summary>
/// <param name="pathOfInclude"></param>
/// <param name="sb"></param>
/// <param name="line"></param>
/// <returns></returns>
private StringBuilder WriteDebugScript(string pathOfInclude, StringBuilder sb, string includeLine)
{
sb = this.WriteAfterLine(sb, GetTabsForIncludeScript(includeLine, includeDepth, true) + BEGIN, includeLine);
// Insert included script
string script = GetTabsForIncludeScript(includeLine, includeDepth) + EMPTY_SCRIPT;
using (StreamReader sr = new StreamReader(pathOfInclude))
{
this.implementedIncludes.Add(Path.GetFullPath(pathOfInclude));
string scriptRaw = sr.ReadToEnd();
scriptRaw = GetTabsForIncludeScript(includeLine, includeDepth) + scriptRaw.Replace("\n", "\n" + GetTabsForIncludeScript(includeLine, includeDepth));
// If there are includes in the included script
if (Regex.IsMatch(scriptRaw, INCLUDE_REGEX))
{
// Then import these scripts too
script = "\n" + ImportScripts(scriptRaw, pathOfInclude) + "\n";
}
else if (!Regex.IsMatch(scriptRaw, EMPTY_OR_WHITESPACE_REGEX))// Check if its not empty or whitespace
{
script = scriptRaw + "\n";
}
}
this.WriteAfterLine(sb, script, BEGIN + "\n");
this.WriteAfterLine(sb, GetTabsForIncludeScript(includeLine, includeDepth, true) + END, script);
return sb;
}
/// <summary>
/// Imports scripts from //#include statements
/// </summary>
/// <param name="strC">Sourcecode</param>
/// <param name="pathOfScript">Path of the source code of the script</param>
/// <returns>Sourcecode with imported scripts</returns>
private string ImportScripts(string strC, string pathOfScript, bool ShowBeginEnd = true)
{
if(!LSLIPathHelper.IsLSLI(pathOfScript))
{
// If it's not an LSLI script, it can't import a script
return strC;
}
StringBuilder sb = new StringBuilder(strC);
MatchCollection mIncludes = Regex.Matches(strC, INCLUDE_REGEX); // Find includes
foreach (Match m in mIncludes)
{
if (this.includeDepth == 0)
{
this.implementedIncludes = new List<string>();
}
includeDepth++;
string line = GetLineOfMatch(strC, m);
int lineNumber = strC.Take(m.Index + line.Length - 1).Count(c => c == '\n') + 1;
string pathOfIncludeOriginal = Regex.Match(line, PATH_OF_INCLUDE_REGEX).Value.Trim('"');
string pathOfInclude = pathOfIncludeOriginal;
string ext = Path.GetExtension(pathOfInclude).ToLower();
if ((validExtensions.Contains(ext) || ext == "") && IsDifferentScript(pathOfInclude, pathOfScript))
{
pathOfInclude = GetFilePath(pathOfInclude, pathOfScript);
if (pathOfInclude != "" && !this.implementedIncludes.Contains(Path.GetFullPath(pathOfInclude)))
{
if (!ShowBeginEnd)
{
sb = WriteExportScript(pathOfInclude, sb, line);
}
else
{
sb = WriteDebugScript(pathOfInclude, sb, line);
}
}
else if (pathOfInclude != "" && this.implementedIncludes.Contains(Path.GetFullPath(pathOfInclude)))
{
string message = "Error: Recursive include loop detected: \"" + Path.GetFullPath(pathOfInclude) +
"\". In script \""
+ Path.GetFileName(pathOfScript) + "\". Line " + lineNumber + ".";
ShowError(message);
} else
{
string relativeToPathOfScript = LSLIPathHelper.GetRelativePath(pathOfScript, Environment.CurrentDirectory);
string correctPath = Path.GetFullPath(relativeToPathOfScript) + pathOfIncludeOriginal;
string message = "Error: Unable to find file \"" + correctPath +
"\". In script \"" + Path.GetFileName(pathOfScript) + "\". Line " + lineNumber + ".";
ShowError(message);
}
}
includeDepth--;
if(this.implementedIncludes.Count > 0)
{
this.implementedIncludes.Remove(this.implementedIncludes.Last());
}
}
return sb.ToString();
}
/// <summary>
/// Removes included scripts
/// </summary>
/// <param name="strC">Sourcecode</param>
/// <returns>Sourcecode without imported scripts</returns>
private static string RemoveScripts(string strC)
{
StringBuilder sb = new StringBuilder(strC);
int indexOfFirstBeginStatement = -1;
uint depth = 0;
int readIndex = 0;
using (StringReader sr = new StringReader(strC))
{
int amountOfLines = strC.Split('\n').Length;
for (int i = 1; i < amountOfLines; i++)
{
string line = sr.ReadLine();
if (Regex.IsMatch(line, BEGIN_REGEX))
{
if (depth == 0)
{
indexOfFirstBeginStatement = readIndex;
}
depth++;
}
readIndex += line.Length + 1;
if (Regex.IsMatch(line, END_REGEX))
{
depth--;
if (depth == 0)
{
sb.Remove(indexOfFirstBeginStatement, (readIndex - indexOfFirstBeginStatement));
readIndex -= readIndex - indexOfFirstBeginStatement;
indexOfFirstBeginStatement = -1;
}
}
}
}
return sb.ToString();
}
/// <summary>
/// Call this to collapse LSL to LSLI
/// </summary>
/// <param name="editform"></param>
/// <returns>LSLI</returns>
public static string CollapseToLSLI(string source)
{
string sourceCode = RemoveScripts(source);
return sourceCode;
}
/// <summary>
/// Call this to collapse LSL to LSLI
/// </summary>
/// <param name="editform"></param>
/// <returns>LSLI</returns>
public string CollapseToLSLIFromEditform(EditForm editform)
{
this.editForm = editform;
return CollapseToLSLI(editform.SourceCode);
}
/// <summary>
/// Call this to collapse LSL to LSLI
/// </summary>
/// <param name="editform"></param>
/// <returns>LSLI</returns>
public static string CollapseToLSLIFromPath(string path)
{
string sourceCode = "";
using(StreamReader sr = new StreamReader(path))
{
sourceCode = sr.ReadToEnd();
}
return CollapseToLSLI(sourceCode);
}
/// <summary>
/// Call this to expand LSLI to LSL
/// </summary>
/// <param name="editForm"></param>
/// <returns>LSL</returns>
public string ExpandToLSL(EditForm editForm, bool ShowBeginEnd = true)
{
editForm.verboseQueue = new List<string>();
this.editForm = editForm;
string strC = editForm.SourceCode;
string fullPathName = editForm.FullPathName;
if (LSLIPathHelper.IsExpandedLSL(editForm.ScriptName))
{
// Collapse first, to ensure it is expanded showing or not showing begin/end.
strC = CollapseToLSLI(strC);
// Mimic LSLI file
fullPathName = LSLIPathHelper.CreateCollapsedPathAndScriptName(fullPathName);
}
string sourceCode = ImportScripts(strC, fullPathName, ShowBeginEnd);
return sourceCode;
}
}
}

View file

@ -1,270 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
// This class is used to help with paths and LSLI files.
// Created by Jasper Wiggerink
// 13-11-2017
// </summary>
using System;
using System.IO;
namespace LSLEditor.Helpers
{
static class LSLIPathHelper
{
public const string READONLY_TAB_EXTENSION = " (Read Only)";
public const string EXPANDED_TAB_EXTENSION = " (Expanded LSL)";
/// <summary>
/// Checks if a filename is LSLI
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
public static bool IsLSLI(string filename)
{
filename = TrimStarsAndWhiteSpace(filename);
return Path.GetExtension(filename).ToLower() == LSLIConverter.LSLI_EXT;
}
/// <summary>
/// Checks if a filename is an expanded LSL file
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
public static bool IsExpandedLSL(string filename)
{
filename = TrimStarsAndWhiteSpace(filename);
return filename.EndsWith(LSLIConverter.EXPANDED_SUBEXT + LSLIConverter.LSL_EXT);
}
/// <summary>
/// Creates a LSLI scriptname from a filename.
/// </summary>
/// <returns></returns>
public static string CreateCollapsedScriptName(string filename)
{
string nameCollapsed = RemoveDotInFrontOfFilename(Path.GetFileNameWithoutExtension(RemoveExpandedSubExtension(filename)) + LSLIConverter.LSLI_EXT);
return nameCollapsed;
}
/// <summary>
/// Removes only the last extension
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
private static string RemoveExtension(string filename)
{
filename = TrimStarsAndWhiteSpace(filename.Remove(filename.LastIndexOf(Path.GetExtension(filename))));
return filename;
}
/// <summary>
/// Removes the .expanded in a filename
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
public static string RemoveExpandedSubExtension(string filename)
{
if (filename.Contains(LSLIConverter.EXPANDED_SUBEXT))
{
return filename.Replace(LSLIConverter.EXPANDED_SUBEXT, "");
}
return filename;
}
/// <summary>
/// Creates a new path and name from the given filename.
/// E.g. turns path/to/file.expanded.lsl into path/to/file.lsli
/// </summary>
/// <returns></returns>
public static string CreateCollapsedPathAndScriptName(string filename)
{
return RemoveDotInFrontOfFilename(RemoveExtension(RemoveExpandedSubExtension(filename)) + LSLIConverter.LSLI_EXT);
}
/// <summary>
/// Creates a new path and name from the original path and name based on the editForm.
/// E.g. turns path/to/file.lsli into path/to/.file.expanded.lsl
/// </summary>
/// <returns></returns>
public static string CreateExpandedPathAndScriptName(string path)
{
if(path.Contains(LSLIConverter.EXPANDED_SUBEXT))
{
return PutDotInFrontOfFilename(RemoveExtension(path) + LSLIConverter.LSL_EXT);
} else
{
return PutDotInFrontOfFilename(RemoveExtension(path) + LSLIConverter.EXPANDED_SUBEXT + LSLIConverter.LSL_EXT);
}
}
/// <summary>
/// Creates an expanded scriptname out of the given filename.
/// </summary>
/// <returns></returns>
public static string CreateExpandedScriptName(string filename)
{
string nameExpanded = "";
if (filename != null)
{
nameExpanded = Path.GetFileNameWithoutExtension(filename) + LSLIConverter.EXPANDED_SUBEXT + LSLIConverter.LSL_EXT;
}
return PutDotInFrontOfFilename(TrimStarsAndWhiteSpace(nameExpanded));
}
/// <summary>
/// Puts dot in front of a filename, e.g. "path/file.lsl" to "path/.file.lsl"
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
private static string PutDotInFrontOfFilename(string filename)
{
int afterLastIndexOfSeperator = (filename.LastIndexOf('\\') > filename.LastIndexOf('/') ? filename.LastIndexOf('\\') : filename.LastIndexOf('/')) + 1;
if (filename.Substring(afterLastIndexOfSeperator, 1) == ".")
{
return filename;
}
filename = filename.Insert(afterLastIndexOfSeperator, ".");
return filename;
}
/// <summary>
/// If found, removes the dot in front of a filename.
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
public static string RemoveDotInFrontOfFilename(string filename)
{
int afterLastIndexOfSeperator = (filename.LastIndexOf('\\') > filename.LastIndexOf('/') ? filename.LastIndexOf('\\') : filename.LastIndexOf('/')) + 1;
if (filename.Substring(afterLastIndexOfSeperator, 1) != ".")
{
return filename;
}
filename = filename.Remove(afterLastIndexOfSeperator, 1);
return filename;
}
/// <summary>
/// "Hides" the file in the folder by setting it's attributes to "Hidden"
/// </summary>
/// <param name="path"></param>
public static void HideFile(string path)
{
File.SetAttributes(path, File.GetAttributes(path) | FileAttributes.Hidden);
}
/// <summary>
/// First checks if the file exists, then deletes it
/// </summary>
/// <param name="path"></param>
public static void DeleteFile(string path)
{
if (File.Exists(path))
{
File.Delete(path);
}
}
/// <summary>
/// Trims the "dirty" stars and whitespace in a string. E.g. "file*.lsl " to "file.lsl"
/// </summary>
/// <param name="str"></param>
/// <returns></returns>
public static string TrimStarsAndWhiteSpace(string str)
{
return str.Trim(' ').TrimEnd('*');
}
/// <summary>
/// Turns an expanded script name into a string to be displayed as the tab name
/// </summary>
/// <param name="path"></param>
/// <returns></returns>
public static string GetExpandedTabName(string path)
{
if (path == null) return "";
return RemoveDotInFrontOfFilename(Path.GetFileNameWithoutExtension(RemoveExpandedSubExtension(path)) + LSLIConverter.LSLI_EXT + EXPANDED_TAB_EXTENSION);
}
/// <summary>
/// Turns a LSLI readonly script name into a string to be displayed as the tab name
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
public static string GetReadOnlyTabName(string filename)
{
if (filename == null) return "";
return CreateCollapsedPathAndScriptName(filename) + READONLY_TAB_EXTENSION;
}
/// <summary>
/// Creates a relative path between two paths
/// </summary>
/// <param name="filespec">The file or folder to create a relative path towards</param>
/// <param name="folder">The base folder</param>
/// <returns></returns>
public static string GetRelativePath(string filespec, string folder)
{
filespec = Path.GetFullPath(filespec).ToLower();
if (LSLIConverter.validExtensions.Contains(filespec.Substring(filespec.LastIndexOf("."))))
{
int lastIndexOfSeperator = filespec.LastIndexOf('\\') > filespec.LastIndexOf('/') ? filespec.LastIndexOf('\\') : filespec.LastIndexOf('/');
filespec = filespec.Remove(lastIndexOfSeperator);
}
Uri pathUri = new Uri(filespec);
if (!folder.EndsWith(Path.DirectorySeparatorChar.ToString()))
{
folder += Path.DirectorySeparatorChar;
}
Uri folderUri = new Uri(folder);
string relativePath = Uri.UnescapeDataString(folderUri.MakeRelativeUri(pathUri).ToString().Replace('/', Path.DirectorySeparatorChar));
if (relativePath.Substring(relativePath.Length - 3) != Path.DirectorySeparatorChar.ToString())
{
relativePath += Path.DirectorySeparatorChar;
}
return relativePath;
}
}
}

View file

@ -1,66 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
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);
}
}
}

View file

@ -1,65 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
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");
//TODO: there was something here for removing the path (is it needed?)
//Properties.Settings.Default.OopsRemove = @"C:\Documents and Settings\Alphons\Visual Studio 2005\Projects";
//strInput = strInput.Replace(Properties.Settings.Default.OopsRemove, "");
return strInput;
}
}
}

View file

@ -1,56 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
using System.Collections.Generic;
using System.Text;
namespace LSLEditor.Helpers
{
class OutlineHelper
{
public KeyWordInfo info;
public int line;
public OutlineHelper(KeyWordInfo i, int l)
{
this.info = i;
this.line = l;
}
}
}

View file

@ -1,26 +0,0 @@
using System;
using System.CodeDom;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LSLEditor.Helpers
{
internal static class StringCollectionExtension
{
internal static string[] ToArray(this StringCollection strings)
{
string[] ret = new string[strings.Count];
strings.CopyTo(ret, 0);
return ret;
}
internal static void set(this StringCollection strings, List<string> newList)
{
strings.Clear();
strings.AddRange(newList.ToArray());
}
}
}

View file

@ -1,213 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace LSLEditor.Images {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Images {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Images() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LSLEditor.Images.Images", typeof(Images).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Class {
get {
object obj = ResourceManager.GetObject("Class", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap CloseActive {
get {
object obj = ResourceManager.GetObject("CloseActive", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap CloseDisabled {
get {
object obj = ResourceManager.GetObject("CloseDisabled", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap CloseInactive {
get {
object obj = ResourceManager.GetObject("CloseInactive", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Constants {
get {
object obj = ResourceManager.GetObject("Constants", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Enum {
get {
object obj = ResourceManager.GetObject("Enum", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Events {
get {
object obj = ResourceManager.GetObject("Events", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Functions {
get {
object obj = ResourceManager.GetObject("Functions", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap logo {
get {
object obj = ResourceManager.GetObject("logo", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Namespace {
get {
object obj = ResourceManager.GetObject("Namespace", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Properties {
get {
object obj = ResourceManager.GetObject("Properties", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap SealedClass {
get {
object obj = ResourceManager.GetObject("SealedClass", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap States {
get {
object obj = ResourceManager.GetObject("States", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Unknown {
get {
object obj = ResourceManager.GetObject("Unknown", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Vars {
get {
object obj = ResourceManager.GetObject("Vars", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View file

@ -1,166 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="Class" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>class.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CloseActive" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>close-active.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CloseDisabled" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>close-disabled.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CloseInactive" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>close-inactive.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Constants" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>constants.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Enum" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>enum.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Events" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>events.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Functions" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>functions.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="logo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>logo.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Namespace" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>namespace.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Properties" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>properties.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SealedClass" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>sealedclass.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="States" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>states.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Unknown" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>unknown.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Vars" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>vars.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -1,35 +0,0 @@
using LSLEditor.Solution;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LSLEditor.Images
{
public static class ImagesHelper
{
public enum ImageType
{
Class,
CloseActive,
CloseDisabled,
CloseInactive,
Constants,
Enum,
Events,
Functions,
logo,
Namespace,
Properties,
SealedClass,
States,
Unknown,
Vars
}
public static Bitmap getImageByType(this ImageType type)
{
return (Bitmap)typeof(Images).GetProperty(type.ToString()).GetValue(new Images());
}
}
}

View file

@ -1,17 +0,0 @@
using LSLEditor.Solution;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LSLEditor.ImagesSolutionExplorer
{
public static class ImagesHelper
{
public static Bitmap getImageByType(this SolutionExplorer.TypeSL type)
{
return (Bitmap)typeof(SolutionImages).GetProperty(type.ToString()).GetValue(new SolutionImages());
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

View file

@ -1,517 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace LSLEditor.ImagesSolutionExplorer {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class SolutionImages {
public static readonly object lck = new object();
private static SolutionImages _def;
public static SolutionImages Default { get
{
if(_def == null)
{
lock (lck)
{
_def = new SolutionImages();
return _def;
}
}return _def;
}
}
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal SolutionImages() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LSLEditor.ImagesSolutionExplorer.SolutionImages", typeof(SolutionImages).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Animation {
get {
object obj = ResourceManager.GetObject("Animation", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Animations {
get {
object obj = ResourceManager.GetObject("Animations", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Body_Parts {
get {
object obj = ResourceManager.GetObject("Body_Parts", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Calling_Cards {
get {
object obj = ResourceManager.GetObject("Calling_Cards", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Clothes {
get {
object obj = ResourceManager.GetObject("Clothes", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Eyes {
get {
object obj = ResourceManager.GetObject("Eyes", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Folder {
get {
object obj = ResourceManager.GetObject("Folder", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Gesture {
get {
object obj = ResourceManager.GetObject("Gesture", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Gestures {
get {
object obj = ResourceManager.GetObject("Gestures", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Gloves {
get {
object obj = ResourceManager.GetObject("Gloves", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Hair {
get {
object obj = ResourceManager.GetObject("Hair", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Inventory {
get {
object obj = ResourceManager.GetObject("Inventory", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Jacket {
get {
object obj = ResourceManager.GetObject("Jacket", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Landmark {
get {
object obj = ResourceManager.GetObject("Landmark", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Landmarks {
get {
object obj = ResourceManager.GetObject("Landmarks", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Lost_And_Found {
get {
object obj = ResourceManager.GetObject("Lost_And_Found", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap LSLIScript {
get {
object obj = ResourceManager.GetObject("LSLIScript", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Notecard {
get {
object obj = ResourceManager.GetObject("Notecard", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Notecards {
get {
object obj = ResourceManager.GetObject("Notecards", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Object {
get {
object obj = ResourceManager.GetObject("Object", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Objects {
get {
object obj = ResourceManager.GetObject("Objects", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Pants {
get {
object obj = ResourceManager.GetObject("Pants", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Photo_Album {
get {
object obj = ResourceManager.GetObject("Photo_Album", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Prim {
get {
object obj = ResourceManager.GetObject("Prim", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Project {
get {
object obj = ResourceManager.GetObject("Project", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap question {
get {
object obj = ResourceManager.GetObject("question", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Script {
get {
object obj = ResourceManager.GetObject("Script", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Scripts {
get {
object obj = ResourceManager.GetObject("Scripts", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Shape {
get {
object obj = ResourceManager.GetObject("Shape", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Shirt {
get {
object obj = ResourceManager.GetObject("Shirt", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Shoes {
get {
object obj = ResourceManager.GetObject("Shoes", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Skin {
get {
object obj = ResourceManager.GetObject("Skin", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Skirt {
get {
object obj = ResourceManager.GetObject("Skirt", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Snapshot {
get {
object obj = ResourceManager.GetObject("Snapshot", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Socks {
get {
object obj = ResourceManager.GetObject("Socks", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Solution {
get {
object obj = ResourceManager.GetObject("Solution", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Sound {
get {
object obj = ResourceManager.GetObject("Sound", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Sounds {
get {
object obj = ResourceManager.GetObject("Sounds", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Texture {
get {
object obj = ResourceManager.GetObject("Texture", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Textures {
get {
object obj = ResourceManager.GetObject("Textures", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Trash {
get {
object obj = ResourceManager.GetObject("Trash", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Underpants {
get {
object obj = ResourceManager.GetObject("Underpants", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Undershirt {
get {
object obj = ResourceManager.GetObject("Undershirt", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Unknown {
get {
object obj = ResourceManager.GetObject("Unknown", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View file

@ -1,253 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="Animation" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>animation.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Animations" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>animations.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Body_Parts" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>body parts.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Calling_Cards" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>calling cards.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Clothes" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>clothes.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Eyes" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>eyes.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Folder" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>folder.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Gesture" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>gesture.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Gestures" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>gestures.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Gloves" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>gloves.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Hair" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>hair.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Inventory" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>inventory.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Jacket" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>jacket.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Landmark" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>landmark.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Landmarks" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>landmarks.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Lost_And_Found" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>lost and found.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="LSLIScript" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>lsliscript.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Notecard" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>notecard.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Notecards" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>notecards.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Object" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>object.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Objects" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>objects.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Pants" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>pants.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Photo_Album" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>photo album.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Prim" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>prim.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Project" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>project.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="question" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>question.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Script" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>script.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Scripts" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>scripts.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Shape" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>shape.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Shirt" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>shirt.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Shoes" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>shoes.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Skin" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>skin.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Skirt" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>skirt.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Snapshot" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>snapshot.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Socks" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>socks.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Solution" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>solution.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Sound" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>sound.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Sounds" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>sounds.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Texture" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>texture.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Textures" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>textures.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Trash" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>trash.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Underpants" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>underpants.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Undershirt" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>undershirt.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Unknown" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>unknown.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,115 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace LSLEditor
{
public partial class PermissionsForm : Form
{
private SecondLifeHost host;
private SecondLife.String ObjectName;
private SecondLife.String OwnerName;
private SecondLife.key id;
private SecondLife.key agent;
private SecondLife.integer intPermissions;
public PermissionsForm(SecondLifeHost host, string strObjectName, SecondLife.key id, string strOwner, SecondLife.key agent, int intPermissions)
{
InitializeComponent();
this.host = host;
this.OwnerName = strOwner;
this.ObjectName = strObjectName;
this.agent = agent;
this.id = id;
this.intPermissions = intPermissions;
StringBuilder sb = new StringBuilder();
if ((intPermissions & SecondLife.PERMISSION_DEBIT) == SecondLife.PERMISSION_DEBIT) {
sb.AppendLine("Take Linden dollars (L$) from you");
}
if ((intPermissions & SecondLife.PERMISSION_TAKE_CONTROLS) == SecondLife.PERMISSION_TAKE_CONTROLS) {
sb.AppendLine("Act on your control inputs");
}
if ((intPermissions & SecondLife.PERMISSION_TRIGGER_ANIMATION) == SecondLife.PERMISSION_TRIGGER_ANIMATION) {
sb.AppendLine("Animate your avatar");
}
if ((intPermissions & SecondLife.PERMISSION_ATTACH) == SecondLife.PERMISSION_ATTACH) {
sb.AppendLine("Attach to your avatar");
}
if ((intPermissions & SecondLife.PERMISSION_CHANGE_LINKS) == SecondLife.PERMISSION_CHANGE_LINKS) {
sb.AppendLine("Link and delink from other objects");
}
if ((intPermissions & SecondLife.PERMISSION_TRACK_CAMERA) == SecondLife.PERMISSION_TRACK_CAMERA) {
sb.AppendLine("Track your camera");
}
if ((intPermissions & SecondLife.PERMISSION_CONTROL_CAMERA) == SecondLife.PERMISSION_CONTROL_CAMERA) {
sb.AppendLine("Control your camera");
}
this.label1.Text = "'" + strObjectName + "', an object owned by '" + strOwner + "',\nwould like to:";
this.label2.Text = sb.ToString();
}
private void button2_Click(object sender, EventArgs e)
{
this.host.SetPermissions(new SecondLife.integer(0));
this.Close();
}
private void button1_Click(object sender, EventArgs e)
{
this.host.SetPermissions(this.intPermissions);
this.Close();
}
}
}

View file

@ -1,106 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
using System.IO;
using System.Windows.Forms;
using System.Reflection;
using LSLEditor.Docking;
namespace LSLEditor.Plugins
{
class Generic
{
private delegate void RunDelegate(string strFilePath, RichTextBox tb);
public Generic(LSLEditorForm parent, string strPluginName)
{
EditForm editForm = parent.ActiveMdiForm as EditForm;
if (editForm == null)
return;
string strFilePath = editForm.FullPathName;
RichTextBox tb = editForm.TextBox as RichTextBox;
string strDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string strPluginsDirectory = Path.Combine(strDirectory, "Plugins");
string strProgram = Path.Combine(strPluginsDirectory, strPluginName + ".exe");
Assembly assembly = null;
try
{
assembly = Assembly.LoadFrom(strProgram);
}
catch
{
MessageBox.Show("Not a valid plugin, see http://www.lsleditor.org/help/Plugins.aspx", "Plugins", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
if (assembly == null)
return;
object[] args = new object[] { strFilePath, tb };
foreach (Type t in assembly.GetTypes())
{
if (t.BaseType.Name == "DockContent")
{
DockContent form = assembly.CreateInstance(t.FullName, false,
BindingFlags.Public|BindingFlags.Instance|BindingFlags.CreateInstance,
null, args, null, null) as DockContent;
if (form != null)
{
parent.AddForm(form);
return;
}
}
MethodInfo info = t.GetMethod("Run",
BindingFlags.Public |
BindingFlags.NonPublic |
BindingFlags.Static);
if (info == null)
continue;
info.Invoke(null, args);
}
}
}
}

View file

@ -1,71 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
using System.IO;
using System.Windows.Forms;
using System.Reflection;
namespace LSLEditor.Plugins
{
class Particles
{
public Particles(LSLEditorForm parent)
{
string strPluginName = "Particles";
string strDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string strPluginsDirectory = Path.Combine(strDirectory, "Plugins");
string strProgram = Path.Combine(strPluginsDirectory, strPluginName + ".exe");
Assembly assembly = Assembly.LoadFrom(strProgram);
Form frmMain = assembly.CreateInstance("Particles.frmMain") as Form;
/* if (parent.IsMdiContainer)
{
parent.AddForm(frmMain);
}
else
{*/
//MessageBox.Show("This plugin does not run in tabbed mode", "Particles plugin", MessageBoxButtons.OK, MessageBoxIcon.Error);
frmMain.Show();
//}
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

View file

@ -1,421 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
using System.IO;
using System.Xml;
using System.Text;
using System.Drawing;
using System.Reflection;
using System.Windows.Forms;
using System.Threading;
using LSLEditor.Helpers;
namespace LSLEditor
{
public partial class RuntimeConsole : UserControl
{
private LSLEditorForm mainForm;
public RuntimeConsole(LSLEditorForm mainForm)
{
InitializeComponent();
this.mainForm = mainForm;
this.Dock = DockStyle.Fill;
}
private Thread ResetScriptWatcher;
private AutoResetEvent ResetScriptEvent;
public SecondLifeHost SecondLifeHost;
private string CSharpCode;
private EditForm editForm;
private bool GetNewHost()
{
bool blnResult = false;
Assembly assembly = null;
assembly = CompilerHelper.CompileCSharp(editForm, CSharpCode);
if (assembly != null) {
if (SecondLifeHost != null) {
SecondLifeHost.Dispose();
}
SecondLifeHost = null;
SecondLifeHost = new SecondLifeHost(this.mainForm, assembly, editForm.FullPathName, editForm.guid);
SecondLifeHost.OnChat += editForm.ChatHandler;
SecondLifeHost.OnMessageLinked += editForm.MessageLinkedHandler;
SecondLifeHost.OnDie += new EventHandler(host_OnDie);
SecondLifeHost.OnReset += new EventHandler(SecondLifeHost_OnReset);
SecondLifeHost.OnListenChannelsChanged += new EventHandler(SecondLifeHost_OnListenChannelsChanged);
SecondLifeHost.OnVerboseMessage += new SecondLifeHost.SecondLifeHostMessageHandler(host_OnVerboseMessage);
SecondLifeHost.OnStateChange += new SecondLifeHost.SecondLifeHostMessageHandler(host_OnStateChange);
SecondLifeHost.State("default", true);
blnResult = true;
}
return blnResult;
}
/// <summary>
/// Converts this script (when it's LSLI) to expanded lsl and writes it.
/// </summary>
/// <returns></returns>
private string ConvertLSLI()
{
LSLIConverter lsliConverter = new LSLIConverter();
string lsl = lsliConverter.ExpandToLSL(editForm);
string nameExpanded = LSLIPathHelper.CreateExpandedScriptName(editForm.FullPathName);
string path = LSLIPathHelper.CreateExpandedPathAndScriptName(editForm.FullPathName);
LSLIPathHelper.DeleteFile(path);
using (StreamWriter sw = new StreamWriter(path))
{
sw.Write(lsl);
}
LSLIPathHelper.HideFile(path);
return lsl;
}
public bool Compile(EditForm editForm)
{
this.editForm = editForm;
ResetScriptEvent = new AutoResetEvent(false);
ResetScriptWatcher = new Thread(new ThreadStart(ResetScriptWatch));
ResetScriptWatcher.Name = "ResetScriptWatch";
ResetScriptWatcher.IsBackground = true;
ResetScriptWatcher.Start();
string lsl = editForm.SourceCode;
// If not hidden and not readonly
if (!editForm.IsHidden && !this.mainForm.IsReadOnly(editForm))
{
if (LSLIPathHelper.IsLSLI(editForm.ScriptName)) // Expand LSLI to LSL
{
lsl = ConvertLSLI();
}
} else
{
this.editForm.StopCompiler();
return false;
}
CSharpCode = MakeSharp(editForm.ConfLSL, lsl);
return GetNewHost();
}
private void SecondLifeHost_OnReset(object sender, EventArgs e)
{
this.ResetScriptEvent.Set();
}
private void ResetScriptWatch()
{
while (true) {
this.ResetScriptEvent.WaitOne();
SecondLifeHost.Dispose();
GetNewHost();
}
}
private delegate void AddListenChannelsDelegate(ComboBox comboBox, string[] channels);
private void AddListenChannelsToComboxBox(ComboBox comboBox, string[] channels)
{
if (comboBox.InvokeRequired) {
comboBox.Invoke(new AddListenChannelsDelegate(AddListenChannelsToComboxBox),
new object[] { comboBox, channels });
} else {
comboBox.Items.Clear();
comboBox.Items.AddRange(channels);
comboBox.SelectedIndex = 0;
}
}
private void SecondLifeHost_OnListenChannelsChanged(object sender, EventArgs e)
{
foreach (Control control in this.panel4.Controls) {
GroupboxEvent gbe = control as GroupboxEvent;
if (gbe == null) {
continue;
}
foreach (Control control1 in gbe.Controls) {
GroupBox gb = control1 as GroupBox;
if (gb == null) {
continue;
}
if (gb.Name != "listen_0") {
continue;
}
ComboBox comboBox = gb.Controls[0] as ComboBox;
AddListenChannelsToComboxBox(comboBox, SecondLifeHost.GetListenChannels());
}
}
}
void host_OnDie(object sender, EventArgs e)
{
if (this.panel1.InvokeRequired) {
// using Evenhandler definition as a delegate
this.panel1.Invoke(new EventHandler(host_OnDie));
} else {
this.panel1.Enabled = false;
}
}
private void host_OnStateChange(object sender, SecondLifeHostEventArgs e)
{
ShowLifeEvents();
SetStateCombobox(e.Message);
}
private delegate void SetStateComboboxDelegate(string strName);
public void SetStateCombobox(string strName)
{
if (this.comboBox1.InvokeRequired) {
this.comboBox1.Invoke(new SetStateComboboxDelegate(SetStateCombobox), new object[] { strName });
} else {
for (int intI = 0; intI < this.comboBox1.Items.Count; intI++) {
if (this.comboBox1.Items[intI].ToString() == strName) {
this.comboBox1.SelectedIndex = intI;
break;
}
}
}
}
private void comboBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
if (SecondLifeHost != null) {
string strStateName = (string)this.comboBox1.Items[this.comboBox1.SelectedIndex];
if (strStateName != "") {
if (SecondLifeHost.CurrentStateName != strStateName) {
SecondLifeHost.State(strStateName, true);
}
}
}
}
private void host_OnVerboseMessage(object sender, SecondLifeHostEventArgs e)
{
VerboseConsole(e.Message);
}
private string MakeSharp(XmlDocument xml, string strC)
{
this.comboBox1.Items.Clear();
this.comboBox1.Items.Add("");
this.comboBox1.SelectedIndex = 0;
// xml is needed for making events buttons
LSL2CSharp translator = new LSL2CSharp(xml);
strC = translator.Parse(strC);
foreach (string strState in translator.States) {
this.comboBox1.Items.Add(strState);
}
return strC;
}
private delegate void ShowLifeEventsDelegate();
private void ShowLifeEvents()
{
if (this.panel4.InvokeRequired) {
this.panel4.Invoke(new ShowLifeEventsDelegate(ShowLifeEvents), null);
} else {
int intX = 8;
int intY = 0;
this.panel4.Controls.Clear();
foreach (string strEventName in SecondLifeHost.GetEvents()) {
string strArgs = SecondLifeHost.GetArgumentsFromMethod(strEventName);
GroupboxEvent ge = new GroupboxEvent(new Point(intX, intY), strEventName, strArgs, new System.EventHandler(this.buttonEvent_Click));
this.panel4.Controls.Add(ge);
intY += ge.Height;
}
}
}
private delegate void AppendTextDelegate(string strLine);
// Verbose
public void VerboseConsole(string strLine)
{
if (!this.textBox2.IsDisposed) {
if (this.textBox2.InvokeRequired) {
this.textBox2.Invoke(new AppendTextDelegate(VerboseConsole), new object[] { strLine });
} else {
this.textBox2.AppendText(strLine.Replace("\n", "\r\n") + "\r\n");
}
}
}
private string GetArgumentValue(string strName)
{
foreach (Control parent in this.panel4.Controls) {
if (parent.Name == "GroupboxTextbox") {
foreach (Control c in parent.Controls) {
if (c.Name == strName) {
return c.Controls[0].Text;
}
}
}
}
return "";
}
private object[] GetArguments(string strName, string strArgs)
{
object[] objResult = new object[0];
if (strArgs != "") {
try {
string[] args = strArgs.Trim().Split(new char[] { ',' });
object[] argobjects = new object[args.Length];
for (int intI = 0; intI < argobjects.Length; intI++) {
string[] argument = args[intI].Trim().Split(new char[] { ' ' });
if (argument.Length == 2) {
string[] arArgs;
string strArgumentValue = GetArgumentValue(strName + "_" + intI);
string strArgumentName = argument[1];
string strArgumentType = argument[0];
switch (strArgumentType) {
case "System.String":
argobjects[intI] = strArgumentValue;
break;
case "System.Int32":
argobjects[intI] = int.Parse(strArgumentValue);
break;
case "LSLEditor.SecondLife+Float":
argobjects[intI] = new SecondLife.Float(strArgumentValue);
break;
case "LSLEditor.SecondLife+integer":
argobjects[intI] = new SecondLife.integer(int.Parse(strArgumentValue));
break;
case "LSLEditor.SecondLife+String":
argobjects[intI] = new SecondLife.String(strArgumentValue);
break;
case "LSLEditor.SecondLife+key":
argobjects[intI] = new SecondLife.key(strArgumentValue);
break;
case "LSLEditor.SecondLife+list":
argobjects[intI] = new SecondLife.list(new string[] { strArgumentValue });
break;
case "LSLEditor.SecondLife+rotation":
arArgs = strArgumentValue.Replace("<", "").Replace(">", "").Replace(" ", "").Split(new char[] { ',' });
argobjects[intI] = new SecondLife.rotation(double.Parse(arArgs[0]), double.Parse(arArgs[1]), double.Parse(arArgs[2]), double.Parse(arArgs[3]));
break;
case "LSLEditor.SecondLife+vector":
arArgs = strArgumentValue.Replace("<", "").Replace(">", "").Replace(" ", "").Split(new char[] { ',' });
argobjects[intI] = new SecondLife.vector(double.Parse(arArgs[0]), double.Parse(arArgs[1]), double.Parse(arArgs[2]));
break;
default:
MessageBox.Show("Compiler->GetArguments->[" + strArgumentType + "][" + strArgumentName + "]");
argobjects[intI] = null;
break;
}
} else {
MessageBox.Show("Argument must be 'type name' [" + args[intI] + "]");
break;
}
}
objResult = argobjects;
} catch { }
}
return objResult;
}
private void buttonEvent_Click(object sender, System.EventArgs e)
{
Button button = (Button)sender;
string strName = button.Text;
string strArgs = SecondLifeHost.GetArgumentsFromMethod(strName);
object[] args = GetArguments(strName, strArgs);
//SecondLifeHost.VerboseEvent(strName, args);
SecondLifeHost.ExecuteSecondLife(strName, args);
}
private void Die()
{
if (this.SecondLifeHost != null) {
this.SecondLifeHost.Die();
}
}
// Die
private void button1_Click(object sender, EventArgs e)
{
Die();
}
private void textBox2_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control && e.KeyCode == Keys.A) {
this.textBox2.SelectAll();
}
}
private void selectAllToolStripMenuItem_Click(object sender, EventArgs e)
{
this.textBox2.Focus();
this.textBox2.SelectAll();
}
private void copyToolStripMenuItem_Click(object sender, EventArgs e)
{
this.textBox2.Focus();
this.textBox2.Copy();
}
private void clearToolStripMenuItem_Click(object sender, EventArgs e)
{
this.textBox2.Focus();
this.textBox2.Clear();
}
}
}

View file

@ -1,413 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
// Float.cs
//
// </summary>
using System;
using System.Diagnostics.CodeAnalysis;
using System.Text.RegularExpressions;
namespace LSLEditor
{
/// <summary>
/// This part of the SecondLife class defines the Float struct.
/// </summary>
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1642:ConstructorSummaryDocumentationMustBeginWithStandardText", Justification = "Reviewed.")]
public partial class SecondLife
{
/// <summary>
/// A struct for Float objects.
/// </summary>
public struct Float
{
/// <summary>
/// Stores the Float value.
/// </summary>
private object objValue;
/// <summary>
/// Gets or sets the value of the Float.
/// </summary>
/// <value>Gets or sets the objValue data member.</value>
private Double value
{
get
{
if (objValue == null) {
objValue = (Double)0;
}
return (Double)objValue;
}
set
{
objValue = value;
}
}
/// <summary>
/// Initialises a new instance of the <see cref="Float"/> struct.
/// </summary>
/// <param name="a"></param>
public Float(Double a)
{
this.objValue = a;
}
#region public Float(string s)
/// <summary>
/// Initialises a new instance of the <see cref="Float"/> struct.
/// </summary>
/// <param name="s"></param>
public Float(string s)
{
Regex r = new Regex(
@"\A[ ]*(?<sign>[+-]?)
(?:
(?:
0x
(?:
(?:
(?<int>[0-9a-f]*)
(?:
(?:\.
(?<frac>[0-9a-f]*)
)
|
)
)
(?:
(?:p
(?<exp>[-+]?[\d]*)
)
|
)
)
)
|
(?<dec>
[\d]*[.]?[\d]*
(?:
(?:
e[+-]?[\d]*
)
|
)
)
)",
RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
Match m = r.Match(s);
Double mantissa = 0.0;
if (r.Match(s).Groups["dec"].Value.Length > 0) {
mantissa = Convert.ToDouble(r.Match(s).Groups["dec"].Value);
}
if (m.Groups["int"].Success) {
if (m.Groups["int"].Value.Length > 0) {
////System.Console.WriteLine("i:\t" + m.Groups["int"].Value);
mantissa = Convert.ToInt64(m.Groups["int"].Value, 16);
}
if (m.Groups["frac"].Value.Length > 0) {
////System.Console.WriteLine("f:\t"+m.Groups["frac"].Value);
mantissa += Convert.ToInt64(m.Groups["frac"].Value, 16) / Math.Pow(16.0, m.Groups["frac"].Value.Length);
}
if (m.Groups["exp"].Value.Length > 0) {
////System.Console.WriteLine("e:\t" + m.Groups["exp"].Value);
mantissa *= Math.Pow(2.0, Convert.ToInt64(m.Groups["exp"].Value, 10));
}
}
if (m.Groups["sign"].Value == "-") {
this.objValue = -mantissa;
} else {
this.objValue = mantissa;
}
}
#endregion
/// <summary>
/// No idea of the intention here ;-).
/// </summary>
/// <returns>The Float value as a 32 bit number.</returns>
public override int GetHashCode()
{
return (int)this.value % System.Int32.MaxValue;
}
/// <summary>
/// Converts the Float to a string representation.
/// </summary>
/// <returns>String representation of the Float.</returns>
public override string ToString()
{
return string.Format("{0:0.000000}", this.value);
}
/// <summary>
/// Converts the Float to a string representation.
/// </summary>
/// <param name="x"></param>
/// <returns>String representation of the Float.</returns>
public static explicit operator String(Float x)
{
return x.ToString();
}
/// <summary>
/// Converts the Float to a string representation.
/// </summary>
/// <param name="x"></param>
/// <returns>String representation of the Float.</returns>
public static implicit operator Double(Float x)
{
return x.value;
}
////public static implicit operator integer(Float x)
////{
//// return (int)x.value;
////}
/// <summary>
/// Creates a new instance of a Float from a string.
/// </summary>
/// <param name="s"></param>
/// <returns>A new Float instance.</returns>
public static explicit operator Float(string s)
{
return new Float(s);
}
/// <summary>
/// Creates a new instance of a Float from a String.
/// </summary>
/// <param name="s"></param>
/// <returns>A new Float instance.</returns>
public static explicit operator Float(String s)
{
return new Float(s.ToString());
}
/// <summary>
/// Creates a new instance of a Float from an Int32 .
/// </summary>
/// <param name="x"></param>
/// <returns>A new Float instance.</returns>
public static implicit operator Float(Int32 x)
{
return new Float((Double)x);
}
/// <summary>
/// Creates a new instance of a Float from a long.
/// </summary>
/// <param name="x"></param>
/// <returns>A new Float instance.</returns>
public static implicit operator Float(long x)
{
return new Float((int)(uint)x); // 6 jan 2008 , does this work????
}
/// <summary>
/// Creates a new instance of a Float from a Double.
/// </summary>
/// <param name="x"></param>
/// <returns>A new Float instance.</returns>
public static implicit operator Float(Double x)
{
return new Float(x);
}
/// <summary>
/// Creates a new instance of a Float from an integer type.
/// </summary>
/// <param name="x"></param>
/// <returns>A new Float instance.</returns>
public static implicit operator Float(integer x)
{
return new Float((Double)x);
}
/// <summary>
/// Calculates the result of multiplying a and b.
/// </summary>
/// <param name="a"></param>
/// <param name="b"></param>
/// <returns>The product of a and b.</returns>
public static Float operator *(Float a, Float b)
{
return new Float(a.value * b.value);
}
/// <summary>
/// Calculates the result of dividing a by b.
/// </summary>
/// <param name="a"></param>
/// <param name="b"></param>
/// <returns>The result of dividing a by b.</returns>
public static Float operator /(Float a, Float b)
{
return new Float(a.value / b.value);
}
/// <summary>
/// Calculates the result of incrementing the Float's value.
/// </summary>
/// <param name="a"></param>
/// <returns>The result of incrementing the Float's value.</returns>
public static Float operator ++(Float a)
{
return new Float(a.value + 1.0);
}
/// <summary>
/// Calculates the result of decrementing the Float's value.
/// </summary>
/// <param name="a"></param>
/// <returns>The result of decrementing the Float's value.</returns>
public static Float operator --(Float a)
{
return new Float(a.value - 1.0);
}
/// <summary>
/// Calculates the result of adding a to b.
/// </summary>
/// <param name="a"></param>
/// <param name="b"></param>
/// <returns>The result of adding a to b.</returns>
public static Float operator +(Float a, Float b)
{
return new Float(a.value + b.value);
}
/// <summary>
/// Calculates the result of subtracting a from b.
/// </summary>
/// <param name="a"></param>
/// <param name="b"></param>
/// <returns>The result of subtracting a from b.</returns>
public static Float operator -(Float a, Float b)
{
return new Float(a.value - b.value);
}
/// <summary>
/// Casts the Float to a boolean.
/// </summary>
/// <param name="a"></param>
/// <returns>A boolean value.</returns>
public static explicit operator bool(Float a)
{
return Math.Abs(a.value) >= Double.Epsilon;
}
/// <summary>
/// Defines a boolean true value.
/// </summary>
/// <param name="a"></param>
/// <returns>A boolean indicating whether the value is considered true.</returns>
public static bool operator true(Float a)
{
return Math.Abs(a.value) >= Double.Epsilon;
}
/// <summary>
/// Defines a boolean false value.
/// </summary>
/// <param name="a"></param>
/// <returns>A boolean indicating whether the value is considered false.</returns>
public static bool operator false(Float a)
{
return Math.Abs(a.value) < Double.Epsilon;
}
/// <summary>
/// Defines the equality operator.
/// </summary>
/// <param name="x">First operand.</param>
/// <param name="y">Second operand.</param>
/// <returns>A boolean value indicating equality.</returns>
public static bool operator ==(Float x, Float y)
{
return Math.Abs(x.value - y.value) < Double.Epsilon;
}
/// <summary>
/// Defines the inequality operator.
/// </summary>
/// <param name="x">First operand.</param>
/// <param name="y">Second operand.</param>
/// <returns>A boolean value indicating inequality.</returns>
public static bool operator !=(Float x, Float y)
{
return !(x == y);
}
/// <summary>
/// Compares two Floats.
/// </summary>
/// <param name="a">First operand.</param>
/// <param name="b">Second operand.</param>
/// <returns>An integer (-1, 0, or 1), indicating whether the first item is less than, same as, or greater than the second.</returns>
public static int Compare(Float a, Float b)
{
int intResult = 0;
if (a.value < b.value) {
intResult = -1;
} else if (a.value > b.value) {
intResult = 1;
}
return intResult;
}
/// <summary>
/// Defines the Equals operator.
/// </summary>
/// <param name="o"></param>
/// <returns>A boolean value indicating equality.</returns>
public override bool Equals(object o)
{
bool blnResult;
try {
blnResult = (bool)(this == (Float)o);
} catch {
blnResult = false;
}
return blnResult;
}
}
}
}

View file

@ -1,765 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
// LSL_Constants.cs
//
// </summary>
using System;
using System.Diagnostics.CodeAnalysis;
namespace LSLEditor
{
/// <summary>
/// This part of the SecondLife class initialises the constants for LSL.
/// </summary>
[SuppressMessage("StyleCop.CSharp.NamingRules", "SA1310:FieldNamesMustNotContainUnderscore", Justification = "Reviewed.")]
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:ElementsMustBeDocumented", Justification = "Reviewed.")]
public partial class SecondLife
{
public const int TRUE = 1;
public const int FALSE = 0;
public const int DENSITY = 1;
public const int FRICTION = 2;
public const int GRAVITY_MULTIPLIER = 8;
public const int RESTITUTION = 4;
public const int AGENT = 1;
public const int ACTIVE = 2;
public const int PASSIVE = 4;
public const int SCRIPTED = 8;
public const int ANIM_ON = 1;
public const int LOOP = 2;
public const int REVERSE = 4;
public const int PING_PONG = 8;
public const int SMOOTH = 16;
public const int ROTATE = 32;
public const int SCALE = 64;
public const int ALL_SIDES = -1;
public const int DEBUG_CHANNEL = 2147483647;
public const string EOF = "\n\n\n";
public const int AGENT_FLYING = 1;
public const int AGENT_ATTACHMENTS = 2;
public const int AGENT_SCRIPTED = 4;
public const int AGENT_MOUSELOOK = 8;
public const int AGENT_SITTING = 16;
public const int AGENT_ON_OBJECT = 32;
public const int AGENT_AWAY = 64;
public const int AGENT_WALKING = 128;
public const int AGENT_IN_AIR = 256;
public const int AGENT_TYPING = 512;
public const int AGENT_CROUCHING = 1024;
public const int AGENT_BUSY = 2048;
public const int AGENT_ALWAYS_RUN = 4096;
public const int AGENT_AUTOPILOT = 0x2000;
public const int AGENT_BY_LEGACY_NAME = 0x1;
public const int AGENT_BY_USERNAME = 0x10;
public const int AGENT_LIST_PARCEL = 0x01;
public const int AGENT_LIST_PARCEL_OWNER = 0x02;
public const int AGENT_LIST_REGION = 0x04;
public const int ATTACH_AVATAR_CENTER = 40;
public const int ATTACH_BACK = 9;
public const int ATTACH_CHEST = 1;
public const int ATTACH_CHIN = 12;
public const int ATTACH_HEAD = 2;
public const int ATTACH_LSHOULDER = 3;
public const int ATTACH_RSHOULDER = 4;
public const int ATTACH_LHAND = 5;
public const int ATTACH_RHAND = 6;
public const int ATTACH_LFOOT = 7;
public const int ATTACH_RFOOT = 8;
public const int ATTACH_PELVIS = 10;
public const int ATTACH_MOUTH = 11;
public const int ATTACH_NECK = 39;
public const int ATTACH_LEAR = 13;
public const int ATTACH_LEFT_PEC = 29;
public const int ATTACH_REAR = 14;
public const int ATTACH_LEYE = 15;
public const int ATTACH_REYE = 16;
public const int ATTACH_NOSE = 17;
public const int ATTACH_RUARM = 18;
public const int ATTACH_RLARM = 19;
public const int ATTACH_LUARM = 20;
public const int ATTACH_LLARM = 21;
public const int ATTACH_RHIP = 22;
public const int ATTACH_RIGHT_PEC = 30;
public const int ATTACH_RULEG = 23;
public const int ATTACH_RLLEG = 24;
public const int ATTACH_LHIP = 25;
public const int ATTACH_LULEG = 26;
public const int ATTACH_LLLEG = 27;
public const int ATTACH_BELLY = 28;
public const int ATTACH_RPEC = 29;
public const int ATTACH_LPEC = 30;
public const int ATTACH_HUD_CENTER_2 = 31;
public const int ATTACH_HUD_TOP_RIGHT = 32;
public const int ATTACH_HUD_TOP_CENTER = 33;
public const int ATTACH_HUD_TOP_LEFT = 34;
public const int ATTACH_HUD_CENTER_1 = 35;
public const int ATTACH_HUD_BOTTOM_LEFT = 36;
public const int ATTACH_HUD_BOTTOM = 37;
public const int ATTACH_HUD_BOTTOM_RIGHT = 38;
public const int AVOID_NONE = 0;
public const int AVOID_CHARACTERS = 1;
public const int AVOID_DYNAMIC_OBSTACLES = 2;
public const int CAMERA_PITCH = 0;
public const int CAMERA_FOCUS_OFFSET = 1;
public const int CAMERA_POSITION_LAG = 5;
public const int CAMERA_FOCUS_LAG = 6;
public const int CAMERA_DISTANCE = 7;
public const int CAMERA_BEHINDNESS_ANGLE = 8;
public const int CAMERA_BEHINDNESS_LAG = 9;
public const int CAMERA_POSITION_THRESHOLD = 10;
public const int CAMERA_FOCUS_THRESHOLD = 11;
public const int CAMERA_ACTIVE = 12;
public const int CAMERA_POSITION = 13;
public const int CAMERA_FOCUS = 17;
public const int CAMERA_FOCUS_LOCKED = 22;
public const int CAMERA_POSITION_LOCKED = 21;
public const int CHANGED_INVENTORY = 1;
public const int CHANGED_COLOR = 2;
public const int CHANGED_SHAPE = 4;
public const int CHANGED_SCALE = 8;
public const int CHANGED_TEXTURE = 16;
public const int CHANGED_LINK = 32;
public const int CHANGED_ALLOWED_DROP = 64;
public const int CHANGED_OWNER = 128;
public const int CHANGED_REGION = 256;
public const int CHANGED_TELEPORT = 512;
public const int CHANGED_REGION_START = 1024;
public const int CHANGED_MEDIA = 2048;
public const int CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES = 14;
public const int CHARACTER_AVOIDANCE_MODE = 5;
public const int CHARACTER_CMD_JUMP = 0x01;
public const int CHARACTER_CMD_STOP = 0x00;
public const int CHARACTER_DESIRED_SPEED = 1;
public const int CHARACTER_LENGTH = 3;
public const int CHARACTER_TYPE = 6;
public const int CHARACTER_MAX_ACCEL = 8;
public const int CHARACTER_MAX_DECEL = 9;
public const int CHARACTER_MAX_SPEED = 13;
public const int CHARACTER_MAX_TURN_RADIUS = 10;
public const int CHARACTER_ORIENTATION = 4;
public const int CHARACTER_RADIUS = 2;
public const int CHARACTER_STAY_WITHIN_PARCEL = 15;
public const int CHARACTER_TYPE_A = 0;
public const int CHARACTER_TYPE_B = 1;
public const int CHARACTER_TYPE_C = 2;
public const int CHARACTER_TYPE_D = 3;
public const int CHARACTER_TYPE_NONE = 4;
public const int CLICK_ACTION_NONE = 0;
public const int CLICK_ACTION_TOUCH = 0;
public const int CLICK_ACTION_SIT = 1;
public const int CLICK_ACTION_BUY = 2;
public const int CLICK_ACTION_PAY = 3;
public const int CLICK_ACTION_OPEN = 4;
public const int CLICK_ACTION_PLAY = 5;
public const int CLICK_ACTION_OPEN_MEDIA = 6;
public const string CONTENT_TYPE_ATOM = "application/atom+xml";
public const string CONTENT_TYPE_FORM = "application/x-www-form-urlencoded";
public const string CONTENT_TYPE_HTML = "text/html";
public const string CONTENT_TYPE_JSON = "application/json";
public const string CONTENT_TYPE_LLSD = "application/llsd+xml";
public const string CONTENT_TYPE_RSS = "application/rss+xml";
public const string CONTENT_TYPE_TEXT = "text/plain";
public const string CONTENT_TYPE_XHTML = "application/xhtml+xml";
public const string CONTENT_TYPE_XML = "application/xml";
public const int CONTROL_FWD = 1;
public const int CONTROL_BACK = 2;
public const int CONTROL_LEFT = 4;
public const int CONTROL_RIGHT = 8;
public const int CONTROL_ROT_LEFT = 256;
public const int CONTROL_ROT_RIGHT = 512;
public const int CONTROL_UP = 16;
public const int CONTROL_DOWN = 32;
public const int CONTROL_LBUTTON = 268435456;
public const int CONTROL_ML_LBUTTON = 1073741824;
public const int DATA_ONLINE = 1;
public const int DATA_NAME = 2;
public const int DATA_BORN = 3;
public const int DATA_RATING = 4;
public const int DATA_SIM_POS = 5;
public const int DATA_SIM_STATUS = 6;
public const int DATA_SIM_RATING = 7;
public const int DATA_PAYINFO = 8;
public const int ERR_GENERIC = -1;
public const int ERR_MALFORMED_PARAMS = -3;
public const int ERR_PARCEL_PERMISSIONS = -2;
public const int ERR_RUNTIME_PERMISSIONS = -4;
public const int ERR_THROTTLED = -5;
public const int ESTATE_ACCESS_ALLOWED_AGENT_ADD = 4;
public const int ESTATE_ACCESS_ALLOWED_AGENT_REMOVE = 8;
public const int ESTATE_ACCESS_ALLOWED_GROUP_ADD = 16;
public const int ESTATE_ACCESS_ALLOWED_GROUP_REMOVE = 32;
public const int ESTATE_ACCESS_BANNED_AGENT_ADD = 64;
public const int ESTATE_ACCESS_BANNED_AGENT_REMOVE = 128;
public const int FORCE_DIRECT_PATH = 1;
public const int HTTP_BODY_MAXLENGTH = 2;
public const int HTTP_BODY_TRUNCATED = 0;
public const int HTTP_METHOD = 0;
public const int HTTP_MIMETYPE = 1;
public const int HTTP_PRAGMA_NO_CACHE = 6;
public const int HTTP_VERBOSE_THROTTLE = 4;
public const int HTTP_VERIFY_CERT = 3;
public const int HORIZONTAL = 1;
public const int INVENTORY_ALL = -1;
public const int INVENTORY_NONE = -1;
public const int INVENTORY_TEXTURE = 0;
public const int INVENTORY_SOUND = 1;
public const int INVENTORY_LANDMARK = 3;
public const int INVENTORY_CLOTHING = 5;
public const int INVENTORY_OBJECT = 6;
public const int INVENTORY_NOTECARD = 7;
public const int INVENTORY_SCRIPT = 10;
public const int INVENTORY_BODYPART = 13;
public const int INVENTORY_ANIMATION = 20;
public const int INVENTORY_GESTURE = 21;
public const int JSON_APPEND = -1;
public const string JSON_ARRAY = "\uFDD2";
public const string JSON_DELETE = "\uFDD8";
public const string JSON_FALSE = "\uFDD7";
public const string JSON_INVALID = "\uFDD0";
public const string JSON_NULL = "\uFDD5";
public const string JSON_NUMBER = "\uFDD3";
public const string JSON_OBJECT = "\uFDD1";
public const string JSON_STRING = "\uFDD4";
public const string JSON_TRUE = "\uFDD6";
public const int KFM_CMD_PAUSE = 2;
public const int KFM_CMD_PLAY = 0;
public const int KFM_CMD_STOP = 1;
public const int KFM_COMMAND = 0;
public const int KFM_DATA = 2;
public const int KFM_FORWARD = 0;
public const int KFM_LOOP = 1;
public const int KFM_MODE = 1;
public const int KFM_PING_PONG = 2;
public const int KFM_REVERSE = 2;
public const int KFM_ROTATION = 1;
public const int KFM_TRANSLATION = 2;
public const int LAND_LEVEL = 0;
public const int LAND_RAISE = 1;
public const int LAND_LOWER = 2;
public const int LAND_SMOOTH = 3;
public const int LAND_NOISE = 4;
public const int LAND_REVERT = 5;
public const int LAND_LARGE_BRUSH = 3;
public const int LAND_MEDIUM_BRUSH = 2;
public const int LAND_SMALL_BRUSH = 1;
public const int LINK_ROOT = 1;
public const int LINK_SET = -1;
public const int LINK_ALL_OTHERS = -2;
public const int LINK_ALL_CHILDREN = -3;
public const int LINK_THIS = -4;
public const int LIST_STAT_RANGE = 0;
public const int LIST_STAT_MIN = 1;
public const int LIST_STAT_MAX = 2;
public const int LIST_STAT_MEAN = 3;
public const int LIST_STAT_MEDIAN = 4;
public const int LIST_STAT_STD_DEV = 5;
public const int LIST_STAT_SUM = 6;
public const int LIST_STAT_SUM_SQUARES = 7;
public const int LIST_STAT_NUM_COUNT = 8;
public const int LIST_STAT_GEOMETRIC_MEAN = 9;
public const int MASK_BASE = 0;
public const int MASK_EVERYONE = 3;
public const int MASK_GROUP = 2;
public const int MASK_NEXT = 4;
public const int MASK_OWNER = 1;
public const int OBJECT_ATTACHED_POINT = 19;
public const int OBJECT_CHARACTER_TIME = 17;
public const int OBJECT_NAME = 1;
public const int OBJECT_DESC = 2;
public const int OBJECT_POS = 3;
public const int OBJECT_ROOT = 18;
public const int OBJECT_ROT = 4;
public const int OBJECT_VELOCITY = 5;
public const int OBJECT_OWNER = 6;
public const int OBJECT_PATHFINDING_TYPE = 20;
public const int OBJECT_GROUP = 7;
public const int OBJECT_CREATOR = 8;
public const int OBJECT_PHYSICS = 21;
public const int OBJECT_PHANTOM = 22;
public const int OBJECT_TEMP_ON_REZ = 23;
public const int OBJECT_STREAMING_COST = 15;
public const int OBJECT_PHYSICS_COST = 16;
public const int OBJECT_SERVER_COST = 14;
public const int OBJECT_PRIM_EQUIVALENCE = 13;
public const int OBJECT_RUNNING_SCRIPT_COUNT = 9;
public const int OBJECT_SCRIPT_MEMORY = 11;
public const int OBJECT_SCRIPT_TIME = 12;
public const int OBJECT_TOTAL_SCRIPT_COUNT = 10;
public const int OBJECT_UNKNOWN_DETAIL = -1;
public const int OPT_AVATAR = 1;
public const int OPT_CHARACTER = 2;
public const int OPT_EXCLUSION_VOLUME = 6;
public const int OPT_LEGACY_LINKSET = 0;
public const int OPT_MATERIAL_VOLUME = 5;
public const int OPT_OTHER = -1;
public const int OPT_STATIC_OBSTACLE = 4;
public const int OPT_WALKABLE = 3;
public const int OBJECT_RETURN_PARCEL = 1;
public const int OBJECT_RETURN_PARCEL_OWNER = 2;
public const int OBJECT_RETURN_REGION = 4;
public const int PARCEL_COUNT_TOTAL = 0;
public const int PARCEL_COUNT_OWNER = 1;
public const int PARCEL_COUNT_GROUP = 2;
public const int PARCEL_COUNT_OTHER = 3;
public const int PARCEL_COUNT_SELECTED = 4;
public const int PARCEL_COUNT_TEMP = 5;
public const int PARCEL_DETAILS_AREA = 4;
public const int PARCEL_DETAILS_DESC = 1;
public const int PARCEL_DETAILS_GROUP = 3;
public const int PARCEL_DETAILS_ID = 5;
public const int PARCEL_DETAILS_NAME = 0;
public const int PARCEL_DETAILS_OWNER = 2;
public const int PARCEL_DETAILS_SEE_AVATARS = 6;
public const int PARCEL_FLAG_ALLOW_FLY = 0x0000001;
public const int PARCEL_FLAG_ALLOW_SCRIPTS = 0x0000002;
public const int PARCEL_FLAG_ALLOW_LANDMARK = 0x0000008;
public const int PARCEL_FLAG_ALLOW_TERRAFORM = 0x0000010;
public const int PARCEL_FLAG_ALLOW_DAMAGE = 0x0000020;
public const int PARCEL_FLAG_ALLOW_CREATE_OBJECTS = 0x0000040;
public const int PARCEL_FLAG_USE_ACCESS_GROUP = 0x0000100;
public const int PARCEL_FLAG_USE_ACCESS_LIST = 0x0000200;
public const int PARCEL_FLAG_USE_BAN_LIST = 0x0000400;
public const int PARCEL_FLAG_USE_LAND_PASS_LIST = 0x0000800;
public const int PARCEL_FLAG_LOCAL_SOUND_ONLY = 0x0008000;
public const int PARCEL_FLAG_RESTRICT_PUSHOBJECT = 0x0200000;
public const int PARCEL_FLAG_ALLOW_GROUP_SCRIPTS = 0x2000000;
public const int PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS = 0x4000000;
public const int PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY = 0x8000000;
public const int PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY = 0x10000000;
public const int PARCEL_MEDIA_COMMAND_STOP = 0;
public const int PARCEL_MEDIA_COMMAND_PAUSE = 1;
public const int PARCEL_MEDIA_COMMAND_PLAY = 2;
public const int PARCEL_MEDIA_COMMAND_LOOP = 3;
public const int PARCEL_MEDIA_COMMAND_TEXTURE = 4;
public const int PARCEL_MEDIA_COMMAND_URL = 5;
public const int PARCEL_MEDIA_COMMAND_TIME = 6;
public const int PARCEL_MEDIA_COMMAND_AGENT = 7;
public const int PARCEL_MEDIA_COMMAND_UNLOAD = 8;
public const int PARCEL_MEDIA_COMMAND_AUTO_ALIGN = 9;
public const int PARCEL_MEDIA_COMMAND_TYPE = 10;
public const int PARCEL_MEDIA_COMMAND_SIZE = 11;
public const int PARCEL_MEDIA_COMMAND_DESC = 12;
public const int PARCEL_MEDIA_COMMAND_LOOP_SET = 13;
public const int PAY_DEFAULT = -2;
public const int PAY_HIDE = -1;
public const int PAYMENT_INFO_ON_FILE = 1;
public const int PAYMENT_INFO_USED = 2;
public const int PERM_ALL = 2147483647;
public const int PERM_COPY = 32768;
public const int PERM_MODIFY = 16384;
public const int PERM_MOVE = 524288;
public const int PERM_TRANSFER = 8192;
public const int PERMISSION_DEBIT = 2;
public const int PERMISSION_TAKE_CONTROLS = 4;
public const int PERMISSION_REMAP_CONTROLS = 8;
public const int PERMISSION_TRIGGER_ANIMATION = 16;
public const int PERMISSION_ATTACH = 32;
public const int PERMISSION_RELEASE_OWNERSHIP = 64;
public const int PERMISSION_CHANGE_LINKS = 128;
public const int PERMISSION_CHANGE_JOINTS = 256;
public const int PERMISSION_CHANGE_PERMISSIONS = 512;
public const int PERMISSION_CONTROL_CAMERA = 2048;
public const int PERMISSION_OVERRIDE_ANIMATIONS = 0x8000;
public const int PERMISSION_TRACK_CAMERA = 1024;
public const int PERMISSION_RETURN_OBJECTS = 65536;
public const int PRIM_BUMP_BARK = 4;
public const int PRIM_BUMP_BLOBS = 12;
public const int PRIM_BUMP_BRICKS = 5;
public const int PRIM_BUMP_BRIGHT = 1;
public const int PRIM_BUMP_CHECKER = 6;
public const int PRIM_BUMP_CONCRETE = 7;
public const int PRIM_BUMP_DARK = 2;
public const int PRIM_BUMP_DISKS = 10;
public const int PRIM_BUMP_GRAVEL = 11;
public const int PRIM_BUMP_LARGETILE = 14;
public const int PRIM_BUMP_NONE = 0;
public const int PRIM_BUMP_SHINY = 19;
public const int PRIM_BUMP_SIDING = 13;
public const int PRIM_BUMP_STONE = 9;
public const int PRIM_BUMP_STUCCO = 15;
public const int PRIM_BUMP_SUCTION = 16;
public const int PRIM_BUMP_TILE = 8;
public const int PRIM_BUMP_WEAVE = 17;
public const int PRIM_BUMP_WOOD = 3;
public const int PRIM_CAST_SHADOWS = 24;
public const int PRIM_COLOR = 18;
public const int PRIM_DESC = 28;
public const int PRIM_FLEXIBLE = 21;
public const int PRIM_FULLBRIGHT = 20;
public const int PRIM_HOLE_CIRCLE = 16;
public const int PRIM_HOLE_DEFAULT = 0;
public const int PRIM_HOLE_SQUARE = 32;
public const int PRIM_HOLE_TRIANGLE = 48;
public const int PRIM_LINK_TARGET = 34;
public const int PRIM_MATERIAL = 2;
public const int PRIM_MATERIAL_FLESH = 4;
public const int PRIM_MATERIAL_GLASS = 2;
public const int PRIM_MATERIAL_LIGHT = 7;
public const int PRIM_MATERIAL_METAL = 1;
public const int PRIM_MATERIAL_PLASTIC = 5;
public const int PRIM_MATERIAL_RUBBER = 6;
public const int PRIM_MATERIAL_STONE = 0;
public const int PRIM_MATERIAL_WOOD = 3;
public const int PRIM_MEDIA_ALT_IMAGE_ENABLE = 0;
public const int PRIM_MEDIA_AUTO_LOOP = 4;
public const int PRIM_MEDIA_AUTO_PLAY = 5;
public const int PRIM_MEDIA_AUTO_SCALE = 6;
public const int PRIM_MEDIA_AUTO_ZOOM = 7;
public const int PRIM_MEDIA_CONTROLS = 1;
public const int PRIM_MEDIA_CONTROLS_MINI = 1;
public const int PRIM_MEDIA_CONTROLS_STANDARD = 0;
public const int PRIM_MEDIA_CURRENT_URL = 2;
public const int PRIM_MEDIA_FIRST_CLICK_INTERACT = 8;
public const int PRIM_MEDIA_HEIGHT_PIXELS = 10;
public const int PRIM_MEDIA_HOME_URL = 3;
public const int PRIM_MEDIA_PERM_ANYONE = 4;
public const int PRIM_MEDIA_PERM_GROUP = 2;
public const int PRIM_MEDIA_PERM_NONE = 0;
public const int PRIM_MEDIA_PERM_OWNER = 1;
public const int PRIM_MEDIA_PERMS_CONTROL = 14;
public const int PRIM_MEDIA_PERMS_INTERACT = 13;
public const int PRIM_MEDIA_WHITELIST = 12;
public const int PRIM_MEDIA_WHITELIST_ENABLE = 11;
public const int PRIM_MEDIA_WIDTH_PIXELS = 9;
public const int PRIM_NAME = 27;
public const int PRIM_OMEGA = 32;
public const int PRIM_PHANTOM = 5;
public const int PRIM_PHYSICS = 3;
public const int PRIM_PHYSICS_MATERIAL = 31;
public const int PRIM_PHYSICS_SHAPE_CONVEX = 2;
public const int PRIM_PHYSICS_SHAPE_NONE = 1;
public const int PRIM_PHYSICS_SHAPE_PRIM = 0;
public const int PRIM_PHYSICS_SHAPE_TYPE = 30;
public const int PRIM_POINT_LIGHT = 23;
public const int PRIM_POSITION = 6;
public const int PRIM_POS_LOCAL = 33;
public const int PRIM_ROTATION = 8;
public const int PRIM_ROT_LOCAL = 29;
public const int PRIM_SCULPT_FLAG_INVERT = 64;
public const int PRIM_SCULPT_FLAG_MIRROR = 128;
public const int PRIM_SHINY_HIGH = 3;
public const int PRIM_SHINY_LOW = 1;
public const int PRIM_SHINY_MEDIUM = 2;
public const int PRIM_SHINY_NONE = 0;
public const int PRIM_SIZE = 7;
public const int PRIM_SLICE = 35;
public const int PRIM_TEMP_ON_REZ = 4;
public const int PRIM_TEXGEN = 22;
public const int PRIM_TEXGEN_DEFAULT = 0;
public const int PRIM_TEXGEN_PLANAR = 1;
public const int PRIM_TEXT = 26;
public const int PRIM_TEXTURE = 17;
public const int PRIM_TYPE = 9;
public const int PRIM_TYPE_BOX = 0;
public const int PRIM_TYPE_CYLINDER = 1;
public const int PRIM_TYPE_PRISM = 2;
public const int PRIM_TYPE_SPHERE = 3;
public const int PRIM_TYPE_TORUS = 4;
public const int PRIM_TYPE_TUBE = 5;
public const int PRIM_TYPE_RING = 6;
public const int PRIM_TYPE_SCULPT = 7;
public const int PRIM_GLOW = 25;
public const int PRIM_SCULPT_TYPE_MASK = 7;
public const int PRIM_SCULPT_TYPE_SPHERE = 1;
public const int PRIM_SCULPT_TYPE_TORUS = 2;
public const int PRIM_SCULPT_TYPE_PLANE = 3;
public const int PRIM_SCULPT_TYPE_CYLINDER = 4;
public const int PROFILE_NONE = 0;
public const int PROFILE_SCRIPT_MEMORY = 1;
public const int PSYS_PART_FLAGS = 0;
public const int PSYS_PART_INTERP_COLOR_MASK = 1;
public const int PSYS_PART_INTERP_SCALE_MASK = 2;
public const int PSYS_PART_BOUNCE_MASK = 4;
public const int PSYS_PART_WIND_MASK = 8;
public const int PSYS_PART_FOLLOW_SRC_MASK = 16;
public const int PSYS_PART_FOLLOW_VELOCITY_MASK = 32;
public const int PSYS_PART_TARGET_POS_MASK = 64;
public const int PSYS_PART_TARGET_LINEAR_MASK = 128;
public const int PSYS_PART_EMISSIVE_MASK = 256;
public const int PSYS_PART_SRC_PATTERN_ANGLE = 0x04;
public const int PSYS_PART_SRC_PATTERN_ANGLE_CONE = 0x08;
public const int PSYS_PART_SRC_PATTERN_DROP = 0x01;
public const int PSYS_PART_SRC_PATTERN_EXPLODE = 0x02;
public const int PSYS_PART_START_COLOR = 1;
public const int PSYS_PART_START_ALPHA = 2;
public const int PSYS_PART_END_COLOR = 3;
public const int PSYS_PART_END_ALPHA = 4;
public const int PSYS_PART_START_SCALE = 5;
public const int PSYS_PART_END_SCALE = 6;
public const int PSYS_PART_MAX_AGE = 7;
public const int PSYS_SRC_ACCEL = 8;
public const int PSYS_SRC_PATTERN = 9;
public const int PSYS_SRC_INNERANGLE = 10;
public const int PSYS_SRC_OUTERANGLE = 11;
public const int PSYS_SRC_TEXTURE = 12;
public const int PSYS_SRC_BURST_RATE = 13;
public const int PSYS_SRC_BURST_PART_COUNT = 15;
public const int PSYS_SRC_BURST_RADIUS = 16;
public const int PSYS_SRC_BURST_SPEED_MIN = 17;
public const int PSYS_SRC_BURST_SPEED_MAX = 18;
public const int PSYS_SRC_MAX_AGE = 19;
public const int PSYS_SRC_TARGET_KEY = 20;
public const int PSYS_SRC_OMEGA = 21;
public const int PSYS_SRC_ANGLE_BEGIN = 22;
public const int PSYS_SRC_ANGLE_END = 23;
public const int PSYS_SRC_PATTERN_DROP = 1;
public const int PSYS_SRC_PATTERN_EXPLODE = 2;
public const int PSYS_SRC_PATTERN_ANGLE = 4;
public const int PSYS_SRC_PATTERN_ANGLE_CONE = 8;
public const int PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY = 16;
public const int PU_EVADE_HIDDEN = 0x07;
public const int PU_EVADE_SPOTTED = 0x08;
public const int PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED = 10;
public const int PU_FAILURE_PARCEL_UNREACHABLE = 11;
public const int PU_FAILURE_INVALID_GOAL = 0x03;
public const int PU_FAILURE_INVALID_START = 0x02;
public const int PU_FAILURE_NO_VALID_DESTINATION = 0x06;
public const int PU_FAILURE_OTHER = 1000000;
public const int PU_FAILURE_TARGET_GONE = 0x05;
public const int PU_FAILURE_UNREACHABLE = 0x04;
public const int PU_GOAL_REACHED = 0x01;
public const int PU_SLOWDOWN_DISTANCE_REACHED = 0x00;
public const int PUBLIC_CHANNEL = 0;
public const int PURSUIT_FUZZ_FACTOR = 3;
public const int PURSUIT_INTERCEPT = 4;
public const int PURSUIT_OFFSET = 1;
public const int RC_DATA_FLAGS = 2;
public const int RC_DETECT_PHANTOM = 1;
public const int RC_GET_LINK_NUM = 4;
public const int RC_GET_NORMAL = 1;
public const int RC_GET_ROOT_KEY = 2;
public const int RC_MAX_HITS = 3;
public const int RC_REJECT_AGENTS = 1;
public const int RC_REJECT_LAND = 8;
public const int RC_REJECT_NONPHYSICAL = 4;
public const int RC_REJECT_PHYSICAL = 2;
public const int RC_REJECT_TYPES = 2;
public const int RCERR_CAST_TIME_EXCEEDED = -3;
public const int RCERR_SIM_PERF_LOW = -2;
public const int RCERR_UNKNOWN = -1;
public const int REGION_FLAG_ALLOW_DAMAGE = 1;
public const int REGION_FLAG_FIXED_SUN = 16;
public const int REGION_FLAG_BLOCK_TERRAFORM = 64;
public const int REGION_FLAG_SANDBOX = 256;
public const int REGION_FLAG_DISABLE_COLLISIONS = 4096;
public const int REGION_FLAG_DISABLE_PHYSICS = 16384;
public const int REGION_FLAG_BLOCK_FLY = 524288;
public const int REGION_FLAG_ALLOW_DIRECT_TELEPORT = 1048576;
public const int REGION_FLAG_RESTRICT_PUSHOBJECT = 4194304;
public const int REMOTE_DATA_CHANNEL = 1;
public const int REMOTE_DATA_REQUEST = 2;
public const int REMOTE_DATA_REPLY = 3;
public const int REQUIRE_LINE_OF_SIGHT = 2;
public const int SIM_STAT_PCT_CHARS_STEPPED = 0;
public const int STATUS_PHYSICS = 1;
public const int STATUS_ROTATE_X = 2;
public const int STATUS_ROTATE_Y = 4;
public const int STATUS_ROTATE_Z = 8;
public const int STATUS_PHANTOM = 16;
public const int STATUS_SANDBOX = 32;
public const int STATUS_BLOCK_GRAB = 64;
public const int STATUS_BLOCK_GRAB_OBJECT = 1024;
public const int STATUS_DIE_AT_EDGE = 128;
public const int STATUS_RETURN_AT_EDGE = 256;
public const int STATUS_CAST_SHADOWS = 512;
public const int STATUS_BOUNDS_ERROR = 1002;
public const int STATUS_INTERNAL_ERROR = 1999;
public const int STATUS_MALFORMED_PARAMS = 1000;
public const int STATUS_NOT_FOUND = 1003;
public const int STATUS_NOT_SUPPORTED = 1004;
public const int STATUS_OK = 0;
public const int STATUS_TYPE_MISMATCH = 1001;
public const int STATUS_WHITELIST_FAILED = 2001;
public const int STRING_TRIM_HEAD = 1;
public const int STRING_TRIM_TAIL = 2;
public const int STRING_TRIM = 3;
public const string TEXTURE_BLANK = "5748decc-f629-461c-9a36-a35a221fe21f";
public const string TEXTURE_DEFAULT = "89556747-24cb-43ed-920b-47caed15465f";
public const string TEXTURE_PLYWOOD = "89556747-24cb-43ed-920b-47caed15465f";
public const string TEXTURE_TRANSPARENT = "8dcd4a48-2d37-4909-9f78-f7a9eb4ef903";
public const string TEXTURE_MEDIA = "8b5fec65-8d8d-9dc5-cda8-8fdf2716e361";
public const int TOUCH_INVALID_FACE = -1;
public const int TRAVERSAL_TYPE = 7;
public const int TRAVERSAL_TYPE_FAST = 1;
public const int TRAVERSAL_TYPE_NONE = 2;
public const int TRAVERSAL_TYPE_SLOW = 0;
public const int TYPE_INTEGER = 1;
public const int TYPE_FLOAT = 2;
public const int TYPE_STRING = 3;
public const int TYPE_KEY = 4;
public const int TYPE_VECTOR = 5;
public const int TYPE_ROTATION = 6;
public const int TYPE_INVALID = 0;
public const string URL_REQUEST_GRANTED = "URL_REQUEST_GRANTED";
public const string URL_REQUEST_DENIED = "URL_REQUEST_DENIED";
public const int VEHICLE_TYPE_NONE = 0;
public const int VEHICLE_LINEAR_FRICTION_TIMESCALE = 16;
public const int VEHICLE_ANGULAR_FRICTION_TIMESCALE = 17;
public const int VEHICLE_LINEAR_MOTOR_DIRECTION = 18;
public const int VEHICLE_ANGULAR_MOTOR_DIRECTION = 19;
public const int VEHICLE_LINEAR_MOTOR_OFFSET = 20;
public const int VEHICLE_HOVER_HEIGHT = 24;
public const int VEHICLE_HOVER_EFFICIENCY = 25;
public const int VEHICLE_HOVER_TIMESCALE = 26;
public const int VEHICLE_BUOYANCY = 27;
public const int VEHICLE_LINEAR_DEFLECTION_EFFICIENCY = 28;
public const int VEHICLE_LINEAR_DEFLECTION_TIMESCALE = 29;
public const int VEHICLE_LINEAR_MOTOR_TIMESCALE = 30;
public const int VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE = 31;
public const int VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY = 32;
public const int VEHICLE_ANGULAR_DEFLECTION_TIMESCALE = 33;
public const int VEHICLE_ANGULAR_MOTOR_TIMESCALE = 34;
public const int VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE = 35;
public const int VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY = 36;
public const int VEHICLE_VERTICAL_ATTRACTION_TIMESCALE = 37;
public const int VEHICLE_BANKING_EFFICIENCY = 38;
public const int VEHICLE_BANKING_MIX = 39;
public const int VEHICLE_BANKING_TIMESCALE = 40;
public const int VEHICLE_REFERENCE_FRAME = 44;
public const int VEHICLE_FLAG_NO_FLY_UP = 1;
public const int VEHICLE_FLAG_NO_DEFLECTION_UP = 1;
public const int VEHICLE_FLAG_LIMIT_ROLL_ONLY = 2;
public const int VEHICLE_FLAG_HOVER_WATER_ONLY = 4;
public const int VEHICLE_FLAG_HOVER_TERRAIN_ONLY = 8;
public const int VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT = 16;
public const int VEHICLE_FLAG_HOVER_UP_ONLY = 32;
public const int VEHICLE_FLAG_LIMIT_MOTOR_UP = 64;
public const int VEHICLE_FLAG_MOUSELOOK_STEER = 128;
public const int VEHICLE_FLAG_MOUSELOOK_BANK = 256;
public const int VEHICLE_FLAG_CAMERA_DECOUPLED = 512;
public const int VEHICLE_TYPE_SLED = 1;
public const int VEHICLE_TYPE_CAR = 2;
public const int VEHICLE_TYPE_BOAT = 3;
public const int VEHICLE_TYPE_AIRPLANE = 4;
public const int VEHICLE_TYPE_BALLOON = 5;
public const int VERTICAL = 0;
public static readonly Float PI = 3.1415926535897932384626;
public static readonly Float TWO_PI = 2.0 * PI;
public static readonly Float PI_BY_TWO = 1.570796;
public static readonly Float DEG_TO_RAD = 0.017453;
public static readonly Float RAD_TO_DEG = 57.295780;
public static readonly Float SQRT2 = 1.414214;
public static readonly key NULL_KEY = key.NULL_KEY;
public static readonly vector TOUCH_INVALID_TEXCOORD = new vector(-1.0, -1.0, 0.0);
public static readonly vector TOUCH_INVALID_VECTOR = new vector(0.0, 0.0, 0.0);
public static readonly rotation ZERO_ROTATION = rotation.ZERO_ROTATION;
public static readonly vector ZERO_VECTOR = vector.ZERO_VECTOR;
}
}

View file

@ -1,128 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
// LSL_Events.cs
//
// </summary>
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Text;
namespace LSLEditor
{
/// <summary>
/// This part of the SecondLife class contains the Event definitions.
/// </summary>
[SuppressMessage("StyleCop.CSharp.LayoutRules", "SA1502:ElementMustNotBeOnSingleLine", Justification = "Reviewed.")]
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:ElementsMustBeDocumented", Justification = "These are all LSL functions, the documentation is in the LSL Wiki.")]
public partial class SecondLife
{
#region events as virtuals, if one is used, use override
public virtual void at_rot_target(integer iHandle, rotation rTargetRotation, rotation rCurrentRotation) { }
public virtual void at_target(integer iHandle, vector vTargetPosition, vector vCurrrentPosition) { }
public virtual void attach(key kAttached) { }
public virtual void changed(integer iChangedFlags) { }
public virtual void collision(integer iCollisionCount) { }
public virtual void collision_end(integer iCollisionCount) { }
public virtual void collision_start(integer iCollisionCount) { }
public virtual void control(key kID, integer iLevels, integer iEdges) { }
public virtual void dataserver(key kRequestID, String sData) { }
public virtual void email(String sTime, String sAddress, String sSubject, String sBody, integer iRemaining) { }
public virtual void http_response(key kRequestID, integer iStatus, list lMetadata, String sBody) { }
public virtual void http_request(key kRequestID, String sMethod, String sBody) { }
public virtual void land_collision(vector vPosition) { }
public virtual void land_collision_end(vector vPosition) { }
public virtual void land_collision_start(vector vPosition) { }
public virtual void link_message(integer iSenderLinkIndex, integer iNumber, String sText, key kID) { }
public virtual void listen(integer iChannel, String sName, key kID, String sText) { }
public virtual void money(key kPayerID, integer iAmount) { }
public virtual void moving_end() { }
public virtual void moving_start() { }
public virtual void no_sensor() { }
public virtual void not_at_rot_target() { }
public virtual void not_at_target() { }
public virtual void object_rez(key kID) { }
public virtual void on_rez(integer iStartParameter) { }
public virtual void path_update(integer iType, list lReserved) { }
public virtual void remote_data(integer iEventType, key kChannelID, key kMessageID, String sSender, integer iData, String sData) { }
public virtual void run_time_permissions(integer iPermissionsFlags) { }
public virtual void sensor(integer iSensedCount) { }
public virtual void state_entry() { }
public virtual void state_exit() { }
public virtual void timer() { }
public virtual void touch(integer iTouchesCount) { }
public virtual void touch_end(integer iTouchesCount) { }
public virtual void touch_start(integer iTouchesCount) { }
public virtual void transaction_result(key kID, integer iSuccess, String sMessage) { }
#endregion
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,713 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
// SecondLifeMain.cs
//
// </summary>
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Text;
using System.Text.RegularExpressions;
/*
// (C) 2006,2007 Alphons van der Heijden
// mail: alphons@heijden.com
*/
[module: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "Reviewed.")]
[module: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1642:ConstructorSummaryDocumentationMustBeginWithStandardText", Justification = "Reviewed.")]
namespace LSLEditor
{
/// <summary>
/// Enumeration of Communication Types that the host understands.
/// </summary>
public enum CommunicationType
{
/// <summary>
/// Indicates the message can be heard only within 5m.
/// </summary>
Whisper,
/// <summary>
/// Indicates the message can be heard only within 20m.
/// </summary>
Say,
/// <summary>
/// Indicates the message can be heard only within 100m.
/// </summary>
Shout,
/// <summary>
/// Indicates the message can be only heard by the owner any where within the same simulator.
/// </summary>
OwnerSay,
/// <summary>
/// Indicates the message can be heard any where within the same simulator.
/// </summary>
RegionSay,
/// <summary>
/// Indicates the message can be heard any where within the same simulator, by a specific object.
/// </summary>
RegionSayTo
}
/// <summary>
/// Partial definition of SecondLife class to handle running scripts.
/// </summary>
public partial class SecondLife
{
/// <summary>
/// Holds the host object.
/// </summary>
private SecondLifeHost slhHost;
#region members
/// <summary>
/// Random generator.
/// </summary>
private Random rdmRandom;
/// <summary>
/// Holds the time of the script starting execution.
/// </summary>
private DateTime dtDateTimeScriptStarted;
/// <summary>
/// Contains a boolean value indicating whether this object accepts other items to be dropped into it.
/// </summary>
private bool blnAllowDrop = false;
/// <summary>
/// Contains a list of keys of avatars that may enter a parcel.
/// </summary>
private Hashtable htLandPassList;
/// <summary>
/// Contains a list of keys of avatars that may NOT enter a parcel.
/// </summary>
private Hashtable htLandBanList;
/// <summary>
/// Volume of sound played by this prim.
/// </summary>
private Float fVolume;
/// <summary>
/// Name of the object/prim.
/// </summary>
private String sObjectName;
/// <summary>
/// URL for parcel's music stream.
/// </summary>
private String sParcelMusicURL;
/// <summary>
/// Position of object/prim placement in a simulator.
/// </summary>
private vector vPosition;
/// <summary>
/// Rotation of the object/prim's placement in the simulator.
/// </summary>
private rotation rRotation;
/// <summary>
/// Local rotation of the prim with respect to the object root.
/// </summary>
private rotation rRotationlocal;
/// <summary>
/// Scale of the object/prim.
/// </summary>
private vector vScale;
/// <summary>
/// Text for the "Sit" entry on object menu.
/// </summary>
private String sSitText;
/// <summary>
/// Radius that sound may be heard around the object/prim.
/// </summary>
private Float fSoundRadius;
/// <summary>
/// Region Coordinates of the simulator's bottom-left corner.
/// </summary>
private vector vRegionCorner;
/// <summary>
/// Parameter passed to the script on start up.
/// </summary>
private integer iStartParameter;
#endregion
#region Constructor
/// <summary>
/// Initialises a new instance of the <see cref="SecondLife"/> class.
/// </summary>
public SecondLife()
{
this.host = null;
rdmRandom = new Random();
dtDateTimeScriptStarted = DateTime.Now.ToUniversalTime();
htLandPassList = new Hashtable();
htLandBanList = new Hashtable();
fVolume = 0.0;
sObjectName = null;
vPosition = new vector(127, 128, 20);
rRotation = rotation.ZERO_ROTATION;
rRotationlocal = rotation.ZERO_ROTATION;
vScale = vector.ZERO_VECTOR;
sSitText = "sittext";
fSoundRadius = 1.0;
iStartParameter = 0;
vRegionCorner = vector.ZERO_VECTOR;
}
#endregion
#region Properties
/// <summary>
/// Gets the position of the object within the simulator.
/// </summary>
/// <value>Gets the vPosition data member.</value>
public vector GetLocalPos
{
// TODO change this to use a call to llGetLocalPos specifying NOT to be Verbose. After all functions have been changed to allow verbose/silent option.
get { return vPosition; }
}
/// <summary>
/// Gets or sets the SecondLifeHost object.
/// </summary>
/// <value>The host property gets/sets the slhHost data member.</value>
public SecondLifeHost host
{
get { return this.slhHost; }
set { this.slhHost = value; }
}
#endregion
#region internal routines
/// <summary>
/// Outputs messages during execution of the script.
/// </summary>
/// <param name="strLine">The text (with possible placeholders) to be output.</param>
/// <param name="parameters">Values to be put into corresponding placeholders.</param>
private void Verbose(string strLine, params object[] parameters)
{
if (parameters.Length == 0) {
host.VerboseMessage(strLine);
} else {
this.host.VerboseMessage(string.Format(strLine, parameters));
}
}
/// <summary>
/// Wrapper to call the SecondLifeHost.Chat method.
/// </summary>
/// <param name="iChannel">Channel for message to be sent on.</param>
/// <param name="sText">Text of message to send.</param>
/// <param name="ctHow">Type of communication (from CommunicationType enumerator).</param>
private void Chat(integer iChannel, string sText, CommunicationType ctHow)
{
this.host.Chat(this.host, iChannel, this.host.GetObjectName(), this.host.GetKey(), sText, ctHow);
}
/// <summary>
/// Method to trigger change in script state.
/// </summary>
/// <param name="strStateName">Name of state to switch to.</param>
public void state(string strStateName)
{
Verbose("state->" + strStateName);
host.State(strStateName, false);
System.Threading.Thread.Sleep(1000);
System.Windows.Forms.MessageBox.Show("If you see this, something is wrong", "Oops...");
}
#endregion
#region Helper Functions
#region List Functions
/// <summary>
/// Takes the possibly negative value list indexes and corrects them to be absolute indexes.
/// </summary>
/// <param name="intLength">Length of list.</param>
/// <param name="intStart">Start index.</param>
/// <param name="intEnd">End index.</param>
/// <returns>True, unless an error occurred, then false.</returns>
private bool CorrectIt(int intLength, ref int intStart, ref int intEnd)
{
bool bResult = true;
if (intStart < 0) {
intStart = intLength + intStart;
}
if (intEnd < 0) {
intEnd = intLength + intEnd;
}
if (intStart <= intEnd) {
if (intStart >= intLength) {
bResult = false;
}
if (intEnd < 0) {
bResult = false;
}
}
intStart = Math.Max(0, intStart);
intEnd = Math.Min(intLength - 1, intEnd);
return bResult;
}
/// <summary>
/// Randomly rearranges the list of items.
/// </summary>
/// <param name="alCollection">List to shuffle.</param>
/// <returns>The reordered list.</returns>
public ArrayList RandomShuffle(ArrayList alCollection)
{
/* We have to copy all items anyway, and there isn't a way to produce the items
on the fly that is linear. So copying to an array and shuffling it is as efficient as we can get.
*/
if (alCollection == null) {
throw new ArgumentNullException("collection");
}
int intCount = alCollection.Count;
for (int i = intCount - 1; i >= 1; --i) {
// Pick an random number 0 through i inclusive.
int j = rdmRandom.Next(i + 1);
// Swap array[i] and array[j]
object temp = alCollection[i];
alCollection[i] = alCollection[j];
alCollection[j] = temp;
}
return alCollection;
}
/// <summary>
/// Convert a list into an array of buckets containing Stride elements.
/// </summary>
/// <param name="lSource">List of items.</param>
/// <param name="intStride">Number of element for each bucket.</param>
/// <returns>The list separated into elements of Stride length.</returns>
private ArrayList List2Buckets(list lSource, int intStride)
{
ArrayList alBuckets = null;
if ((lSource.Count % intStride) == 0 && intStride <= lSource.Count) {
alBuckets = new ArrayList();
for (int intI = 0; intI < lSource.Count; intI += intStride) {
object[] bucket = new object[intStride];
for (int intJ = 0; intJ < intStride; intJ++) {
bucket[intJ] = lSource[intI + intJ];
}
alBuckets.Add(bucket);
}
}
return alBuckets;
}
/// <summary>
/// Converts buckets back into a list.
/// </summary>
/// <param name="alBuckets">Array of buckets.</param>
/// <param name="intStride">Stride value.</param>
/// <returns>The items recombined into a simple list.</returns>
private list Buckets2List(ArrayList alBuckets, int intStride)
{
object[] items = new object[alBuckets.Count * intStride];
for (int intI = 0; intI < alBuckets.Count; intI++) {
for (int intJ = 0; intJ < intStride; intJ++) {
items[(intI * intStride) + intJ] = ((object[])alBuckets[intI])[intJ];
}
}
return new list(items);
}
/// <summary>
/// Implements the Comparer Interface for our custom types (Float, Integer, and String).
/// </summary>
private class BucketComparer : IComparer
{
/// <summary>
/// True/false parameter indicating whether the comparison should be done in ascending or descending order.
/// </summary>
private integer iAscending;
/// <summary>
/// Initialises a new instance of the <see cref="BucketComparer"/> class.
/// </summary>
/// <param name="ascending"></param>
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1642:ConstructorSummaryDocumentationMustBeginWithStandardText", Justification = "Reviewed.")]
public BucketComparer(integer ascending)
{
this.iAscending = ascending;
}
/// <summary>
/// Perform the comparison between two objects.
/// </summary>
/// <param name="x">First object.</param>
/// <param name="y">Second object.</param>
/// <returns>An integer (-1, 0, or 1), indicating whether the first item is less than, same as, or greater than the second.</returns>
public int Compare(object x, object y)
{
int iResult = 0;
object objA, objB;
object[] xx = x as object[];
object[] yy = y as object[];
if (iAscending == TRUE) {
objA = xx[0];
objB = yy[0];
} else {
objB = xx[0];
objA = yy[0];
}
string strType = objA.GetType().ToString();
if (((objA is string) && (objB is string)) || ((objA is SecondLife.String) && (objB is SecondLife.String))) {
iResult = string.Compare(objA.ToString(), objB.ToString());
} else if ((objA is SecondLife.integer) && (objB is SecondLife.integer)) {
iResult = SecondLife.integer.Compare((SecondLife.integer)objA, (SecondLife.integer)objB);
} else if ((objA is SecondLife.Float) && (objB is SecondLife.Float)) {
iResult = SecondLife.Float.Compare((SecondLife.Float)objA, (SecondLife.Float)objB);
}
return iResult;
}
}
#endregion
#region String Functions
/// <summary>
/// Takes a string and splits it into a list based upon separators (which are not kept) and spacers (which are).
/// </summary>
/// <param name="sSource">The source text.</param>
/// <param name="lSeparators">Separators to split on.</param>
/// <param name="lSpacers">Spacers to split on.</param>
/// <param name="blnKeepNulls">True/false indicating whether nulls are kept in the resulting list.</param>
/// <returns>A new list of the split string.</returns>
private list ParseString(String sSource, list lSeparators, list lSpacers, bool blnKeepNulls)
{
list lResult = new list();
int intFrom = 0;
string s = sSource;
for (int intI = 0; intI < s.Length; intI++) {
string strTmp = s.Substring(intI);
bool blnFound = false;
for (int intJ = 0; intJ < lSeparators.Count; intJ++) {
string strSeparator = lSeparators[intJ].ToString();
if (strSeparator.Length == 0) {
continue; // check this
}
if (strTmp.IndexOf(strSeparator) == 0) {
string strBefore = s.Substring(intFrom, intI - intFrom);
if (strBefore != "" || blnKeepNulls) {
lResult.Add(strBefore);
}
intI += strSeparator.Length - 1;
intFrom = intI + 1;
blnFound = true;
break;
}
}
if (blnFound) {
continue;
}
for (int intJ = 0; intJ < lSpacers.Count; intJ++) {
string strSpacer = lSpacers[intJ].ToString();
if (strSpacer.Length == 0) {
continue; // check this
}
if (strTmp.IndexOf(strSpacer) == 0) {
string strBefore = s.Substring(intFrom, intI - intFrom);
if (strBefore != "" || blnKeepNulls) {
lResult.Add(strBefore);
}
lResult.Add(strSpacer);
intI += strSpacer.Length - 1;
intFrom = intI + 1;
break;
}
}
}
string strLast = s.Substring(intFrom);
if (strLast != "" || blnKeepNulls) {
lResult.Add(strLast);
}
return lResult;
}
/// <summary>
/// Convert string to Base64 representation.
/// </summary>
/// <param name="strText">Source string.</param>
/// <returns>Base64 encoding of the source string.</returns>
private string StringToBase64(string strText)
{
byte[] data = Encoding.UTF8.GetBytes(strText);
return Convert.ToBase64String(data);
}
/// <summary>
/// Converts Base64 encoded string back to UTF-8.
/// </summary>
/// <param name="strText">Base64 encoded string.</param>
/// <returns>UTF-8 string.</returns>
private string Base64ToString(string strText)
{
byte[] data = Convert.FromBase64String(strText);
int intLen = Array.IndexOf(data, (byte)0x00);
if (intLen < 0) {
intLen = data.Length;
}
return Encoding.UTF8.GetString(data, 0, intLen);
}
/// <summary>
/// Performs the lookup.
/// </summary>
/// <param name="s">String source.</param>
/// <param name="intIndex">Byte within string.</param>
/// <returns>The Base64 value of the element.</returns>
private int LookupBase64(string s, int intIndex)
{
int intReturn = 0;
if (intIndex < s.Length) {
intReturn = FastLookupBase64[s[intIndex]];
if (intReturn == 0) {
if (s[intIndex] != 'A') {
throw new Exception();
}
}
} else {
intReturn = 0;
}
return intReturn;
}
/// <summary>
/// Pre-generated matrix for quicker lookup.
/// </summary>
////[SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1204:StaticElementsMustAppearBeforeInstanceElements", Justification = "Stays with other string functions.")]
private static readonly int[] FastLookupBase64 =
{ // 0 1 2 3 4 5 6 7 8 9 A B C D E F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 00
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 10
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, 63, // 20
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, 0, 0, // 30
0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, // 40
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 0, // 50
0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, // 60
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0, // 70
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 80
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 90
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // A0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // B0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // C0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // D0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // E0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // F0
#endregion
#region Math Functions
/// <summary>
/// Performs (iA ** iB) % iC.
/// </summary>
/// <param name="iA">Base value.</param>
/// <param name="iB">Exponent value .</param>
/// <param name="iC">Modulus value.</param>
/// <returns>The calculated result.</returns>
private integer ModPow1(integer iA, integer iB, integer iC)
{
return (int)Math.Pow((int)iA, (int)iB & (int)0xffff) % (int)iC;
}
/// <summary>
/// Performs the llModPow2() function.
/// </summary>
/// <param name="iValueX">Value one.</param>
/// <param name="iValueY">Value two.</param>
/// <param name="iModulus">The modulus value.</param>
/// <returns>The calculated result.</returns>
private integer ModPow2(integer iValueX, integer iValueY, integer iModulus)
{
integer iResult = 0;
if (iValueX != 0) {
integer k = 1 + (int)Math.Ceiling(Math.Log(Math.Abs(iValueX)) / 0.69314718055994530941723212145818); // ceil(log2(x))
integer w = 32;
integer p = w / k;
integer r = iValueY / p;
integer f = iValueY % p;
integer z = 1;
if (r) {
z = ModPow2(ModPow1(iValueX, p, iModulus), r, iModulus);
}
if (f) {
z = (z * ModPow1(iValueX, f, iModulus)) % iModulus;
}
iResult = z;
}
return iResult;
}
#endregion Math Functions
/// <summary>
/// Used by llListStatistics in generating the statistics.
/// </summary>
/// <param name="lInput">List of numbers (mixed types possible) to use.</param>
/// <returns>The numbers added together as a Float type.</returns>
private List<double> GetListOfNumbers(list lInput)
{
List<double> lResult = new List<double>();
for (int intI = 0; intI < lInput.Count; intI++) {
object objI = lInput[intI];
string strType = objI.GetType().ToString().Replace("LSLEditor.SecondLife+", "");
switch (strType) {
case "Float":
lResult.Add(Convert.ToDouble((Float)objI));
break;
case "System.Int32":
lResult.Add(Convert.ToDouble((int)objI));
break;
case "System.Double":
lResult.Add(Convert.ToDouble((double)objI));
break;
case "integer":
lResult.Add(Convert.ToDouble((integer)objI));
break;
default:
break;
}
}
return lResult;
}
/// <summary>
/// Calculates the mean of the supplied numbers.
/// </summary>
/// <param name="data">Array of numbers.</param>
/// <returns>The mean of the supplied numbers as a double type.</returns>
private double GetAverage(double[] data)
{
try {
double dblDataTotal = 0;
for (int i = 0; i < data.Length; i++) {
dblDataTotal += data[i];
}
return SafeDivide(dblDataTotal, data.Length);
} catch (Exception) {
throw;
}
}
/// <summary>
/// Calculates standard deviation.
/// </summary>
/// <param name="dblNumbers">Array of numbers to work with.</param>
/// <returns>The standard deviation of the supplied numbers as a double type.</returns>
public double GetStandardDeviation(double[] dblNumbers)
{
double dblSum = 0.0, dblSumOfSqrs = 0.0;
for (int i = 0; i < dblNumbers.Length; i++) {
dblSum += dblNumbers[i];
dblSumOfSqrs += Math.Pow(dblNumbers[i], 2);
}
double dblTopSum = (dblNumbers.Length * dblSumOfSqrs) - Math.Pow(dblSum, 2);
double dblN = (double)dblNumbers.Length;
return Math.Sqrt(dblTopSum / (dblN * (dblN - 1)));
}
/// <summary>
/// Performs division, only if both values are non-zero.
/// </summary>
/// <param name="dblValue1">First number.</param>
/// <param name="dblValue2">Second number.</param>
/// <returns>The result of the division, or zero if not performed.</returns>
private double SafeDivide(double dblValue1, double dblValue2)
{
double dblResult = 0.0F;
try {
if ((dblValue1 != 0) && (dblValue2 != 0)) {
dblResult = dblValue1 / dblValue2;
}
} catch {
}
return dblResult;
}
/// <summary>
/// Takes a hexadecimal representation of a number and coverts it to an integer.
/// </summary>
/// <param name="b">Byte to convert.</param>
/// <returns>Integer value of the supplied byte.</returns>
private byte HexToInt(byte b)
{
byte bResult;
if (b >= '0' && b <= '9') {
bResult = (byte)(b - '0');
} else if ((b >= 'a' && b <= 'f') || (b >= 'A' && b <= 'F')) {
bResult = (byte)((b & 0x5f) - 0x37);
} else {
bResult = 0; // error
}
return bResult;
}
#endregion
}
}

View file

@ -1,128 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
namespace LSLEditor
{
public partial class SecondLife
{
public struct String
{
private string value;
public String(string s)
{
this.value = s;
}
public static implicit operator String(string s)
{
return new String(s);
}
// 3 oct 2007
public static explicit operator String(bool a)
{
return a ? "1" : "0";
}
// 24 augustus 2007
public static explicit operator String(int i)
{
return new String(i.ToString());
}
public static explicit operator String(long i)
{
return new String(((int)(uint)i).ToString());
}
public static explicit operator String(float i)
{
return new String(string.Format("{0:0.000000}", i));
}
public static implicit operator string(String s)
{
return s.ToString();
}
public static implicit operator bool(String s)
{
return (s.value == null) ? false : (s.value.Length != 0);
}
public static bool operator ==(String x, String y)
{
return (x.ToString() == y.ToString());
}
public static bool operator !=(String x, String y)
{
return !(x == y);
}
// Public overrides
public override bool Equals(object o)
{
try {
return (bool)(this.value == o.ToString());
} catch {
return false;
}
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override string ToString()
{
if (this.value == null) {
this.value = "";
}
return this.value;
}
}
}
}

View file

@ -1,152 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
namespace LSLEditor
{
public partial class SecondLife
{
public struct key
{
private string m_value;
public string guid
{
get
{
if (m_value == null)
m_value = "";
return m_value;
}
set
{
m_value = value;
}
}
public key(Guid guid)
{
this.m_value = guid.ToString();
}
public key(string strGuid)
{
this.m_value = strGuid;
}
public static readonly key NULL_KEY;
static key()
{
NULL_KEY = new key("00000000-0000-0000-0000-000000000000");
}
// This is the one-and-only implicit typecasting in SecondLife
public static implicit operator key(string strGuid)
{
return strGuid == null ? new key("") : new key(strGuid);
}
public static implicit operator key(String _strGuid)
{
string strGuid = _strGuid;
return strGuid == null ? new key("") : new key(strGuid);
}
public override string ToString()
{
if (this.guid == null) this.guid = "";
return this.guid.ToString();
}
//public static explicit operator String(key k)
//{
// return k.ToString();
//}
// Check this!!!!
public static implicit operator String(key k)
{
return k.ToString();
}
public static bool operator ==(key key1, key key2)
{
return (key1.guid == key2.guid);
}
public static bool operator !=(key key1, key key2)
{
return !(key1.guid == key2.guid);
}
public static bool operator true(key k)
{
bool bResult = true;
if ((object)k == null || k.guid == NULL_KEY || k.guid == "") {
bResult = false;
}
return bResult;
}
public static bool operator false(key k)
{
bool bResult = false;
if ((object)k == null || k.guid == NULL_KEY || k.guid == "") {
bResult = true;
}
return bResult;
}
public override bool Equals(object obj)
{
try {
return (this == (key)obj);
} catch {
return false;
}
}
public override int GetHashCode()
{
return base.GetHashCode();
}
}
}
}

View file

@ -1,327 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
using System.Text;
using System.Collections;
namespace LSLEditor
{
public partial class SecondLife
{
public struct list
{
private System.Collections.ArrayList value;
public list(object[] args)
{
this.value = new ArrayList();
foreach (object objA in args)
this.Add(objA);
}
public list(list a)
{
this.value = new ArrayList();
this.value.AddRange(a.ToArray());
}
public int Count
{
get
{
if (this.value == null) this.value = new ArrayList();
return this.value.Count;
}
}
public void AddRange(list c)
{
if (this.value == null) this.value = new ArrayList();
this.value.AddRange(c.ToArray());
}
public void Add(object value)
{
if (this.value == null) this.value = new ArrayList();
string strType = value.GetType().ToString();
if (value is string) {
this.value.Add((String)value.ToString());
} else if (value is int) {
this.value.Add(new integer((int)value));
} else if (value is uint) {
this.value.Add(new integer((int)(uint)value));
} else if (value is double) {
this.value.Add(new Float((double)value));
} else {
this.value.Add(value);
}
}
public object this[int index]
{
get
{
if (this.value == null) this.value = new ArrayList();
return this.value[index];
}
set
{
if (this.value == null) this.value = new ArrayList();
this.value[index] = value;
}
}
public void Insert(int index, object value)
{
if (this.value == null) this.value = new ArrayList();
if (this.value == null) this.value = new ArrayList();
string strType = value.GetType().ToString();
if (value is string) {
this.value.Insert(index, (String)value.ToString());
} else if (value is int) {
this.value.Insert(index, new integer((int)value));
} else if (value is uint) {
this.value.Insert(index, new integer((int)(uint)value));
} else if (value is double) {
this.value.Insert(index, new Float((double)value));
} else {
this.value.Insert(index, value);
}
}
public object[] ToArray()
{
if (this.value == null) this.value = new ArrayList();
return this.value.ToArray();
}
public static list operator +(list a, list b)
{
list l = new list();
if ((object)a != null) l.AddRange(a);
if ((object)b != null) l.AddRange(b);
return l;
}
public static list operator +(object b, list a)
{
list l = new list();
if ((object)a != null) l.AddRange(a);
l.Insert(0, b);
return l;
}
public static list operator +(list a, object b)
{
list l = new list();
if ((object)a != null) l.AddRange(a);
l.Add(b);
return l;
}
public static explicit operator list(string a)
{
list l = new list();
l.Add(a);
return l;
}
public static explicit operator list(String a)
{
list l = new list();
l.Add(a);
return l;
}
public static explicit operator list(integer a)
{
list l = new list();
l.Add(a);
return l;
}
public static explicit operator list(key a)
{
list l = new list();
l.Add(a);
return l;
}
public static explicit operator list(vector a)
{
list l = new list();
l.Add(a);
return l;
}
public static explicit operator list(rotation a)
{
list l = new list();
l.Add(a);
return l;
}
public static explicit operator list(uint a)
{
list l = new list();
l.Add(a);
return l;
}
public static explicit operator list(int a)
{
list l = new list();
l.Add(a);
return l;
}
public static explicit operator list(double a)
{
list l = new list();
l.Add(a);
return l;
}
public static integer operator ==(list l, list m)
{
int iResult = TRUE;
if (l.Count != m.Count) {
iResult = FALSE;
} else {
for (int intI = 0; intI < l.Count; intI++) {
if (!l[intI].Equals(m[intI])) {
iResult = FALSE;
break;
}
}
}
return iResult;
}
public static integer operator !=(list l, list m)
{
int intDifferent = 0;
if (m.Count == 0) {// shortcut
intDifferent = l.Count;
} else {
for (int intI = 0; intI < l.Count; intI++) {
bool blnFound = false;
for (int intJ = 0; intJ < m.Count; intJ++) {
if (l[intI].Equals(m[intJ])) {
blnFound = true;
break;
}
}
if (!blnFound) intDifferent++;
}
}
return intDifferent;
}
public static bool operator true(list x)
{
return (object)x == null ? false : (x.value.Count != 0);
}
// Definitely false operator. Returns true if the operand is
// ==0, false otherwise:
public static bool operator false(list x)
{
return (object)x == null ? true : (x.value.Count == 0);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object obj)
{
int intResult = (this == (list)obj);
return (intResult == 1);
}
public string ToVerboseString()
{
if (this.value == null) {
this.value = new ArrayList();
}
StringBuilder sb = new StringBuilder();
sb.Append('[');
for (int intI = 0; intI < this.value.Count; intI++) {
if (intI > 0) sb.Append(',');
if ((this.value[intI] is string) && Properties.Settings.Default.QuotesListVerbose) {
sb.Append("\"" + this.value[intI].ToString() + "\"");
} else {
sb.Append(this.value[intI].ToString());
}
}
sb.Append(']');
return sb.ToString();
}
public override string ToString()
{
if (this.value == null) this.value = new ArrayList();
StringBuilder sb = new StringBuilder();
for (int intI = 0; intI < this.value.Count; intI++) {
if (this.value[intI] is vector) {
vector v = (vector)this.value[intI];
sb.AppendFormat(new System.Globalization.CultureInfo("en-us"), "<{0:0.000000}, {1:0.000000}, {2:0.000000}>", (double)v.x, (double)v.y, (double)v.z);
} else if (this.value[intI] is rotation) {
rotation r = (rotation)this.value[intI];
sb.AppendFormat(new System.Globalization.CultureInfo("en-us"), "<{0:0.000000}, {1:0.000000}, {2:0.000000}, {3:0.000000}>", (double)r.x, (double)r.y, (double)r.z, (double)r.s);
} else {
sb.Append(this.value[intI].ToString());
}
}
return sb.ToString();
}
public static explicit operator String(list l)
{
return (object)l == null ? "" : l.ToString();
}
}
}
}

View file

@ -1,85 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace LSLEditor.Solution
{
public partial class GuidProperty : Form
{
private Solution.SolutionExplorer.RealTag realTag;
public Guid guid;
public GuidProperty(Solution.SolutionExplorer.RealTag realTag)
{
InitializeComponent();
this.DialogResult = DialogResult.Cancel;
this.Text += ": " + realTag.Name;
this.realTag = realTag;
this.textBox1.Text = realTag.Guid.ToString();
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
private void button1_Click(object sender, EventArgs e)
{
try
{
this.guid = new Guid(this.textBox1.Text);
this.DialogResult = DialogResult.OK;
}
catch
{
}
this.Close();
}
}
}

View file

@ -1,103 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace LSLEditor.Solution
{
public partial class SvnAguments : Form
{
public SvnAguments()
{
InitializeComponent();
this.DialogResult = DialogResult.Cancel;
}
public string Repository
{
get
{
return this.textBox1.Text.Trim();
}
set
{
this.textBox1.Text = value;
}
}
public string Comment
{
get
{
return this.textBox2.Text.Trim();
}
set
{
this.textBox2.Text = value;
}
}
public bool ReadOnly
{
set
{
this.textBox1.Enabled = !value;
}
}
private void button1_Click(object sender, EventArgs e)
{
//Import();
this.DialogResult = DialogResult.OK;
this.Close();
}
private void button2_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
}
}

View file

@ -1,58 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using LSLEditor.Docking;
namespace LSLEditor
{
public partial class ToolWindow : DockContent
{
public ToolWindow()
{
InitializeComponent();
}
}
}

View file

@ -1,61 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace LSLEditor.Tools
{
public partial class EnvironmentBrowser : UserControl, ICommit
{
public EnvironmentBrowser()
{
InitializeComponent();
this.checkBox1.Checked = Properties.Settings.Default.BrowserInWindow;
}
public void Commit()
{
Properties.Settings.Default.BrowserInWindow = this.checkBox1.Checked;
}
}
}

View file

@ -1,99 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace LSLEditor.Tools
{
public interface ICommit
{
void Commit();
}
public partial class EnvironmentGeneral : UserControl, ICommit
{
public EnvironmentGeneral()
{
InitializeComponent();
this.radioButton1.Checked = Properties.Settings.Default.TabbedDocument;
this.radioButton2.Checked = !Properties.Settings.Default.TabbedDocument;
this.textBox1.Text = Properties.Settings.Default.RecentFileMax.ToString();
this.textBox2.Text = Properties.Settings.Default.RecentProjectMax.ToString();
this.checkBox1.Checked = Properties.Settings.Default.CheckForUpdates;
this.checkBox2.Checked = Properties.Settings.Default.DeleteOldFiles;
this.radioButton3.Checked = Properties.Settings.Default.CheckEveryDay;
this.radioButton4.Checked = Properties.Settings.Default.CheckEveryWeek;
checkBox1_CheckedChanged(null, null);
}
public void Commit()
{
Properties.Settings.Default.TabbedDocument = this.radioButton1.Checked;
int intValue;
if (int.TryParse(this.textBox1.Text, out intValue))
Properties.Settings.Default.RecentFileMax = intValue;
if (int.TryParse(this.textBox2.Text, out intValue))
Properties.Settings.Default.RecentProjectMax = intValue;
Properties.Settings.Default.CheckForUpdates = this.checkBox1.Checked;
Properties.Settings.Default.CheckEveryDay = this.radioButton3.Checked;
Properties.Settings.Default.CheckEveryWeek = this.radioButton4.Checked;
Properties.Settings.Default.DeleteOldFiles = this.checkBox2.Checked;
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
this.radioButton3.Enabled = this.checkBox1.Checked;
this.radioButton4.Enabled = this.checkBox1.Checked;
this.groupBox4.Enabled = this.checkBox1.Checked;
}
}
}

View file

@ -1,74 +0,0 @@
namespace LSLEditor.Tools
{
partial class IncludeExportSettings
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.groupBoxIncludeExportSettings = new System.Windows.Forms.GroupBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.groupBoxIncludeExportSettings.SuspendLayout();
this.SuspendLayout();
//
// groupBoxIncludeExportSettings
//
this.groupBoxIncludeExportSettings.Controls.Add(this.checkBox1);
this.groupBoxIncludeExportSettings.Location = new System.Drawing.Point(3, 3);
this.groupBoxIncludeExportSettings.Name = "groupBoxIncludeExportSettings";
this.groupBoxIncludeExportSettings.Size = new System.Drawing.Size(380, 64);
this.groupBoxIncludeExportSettings.TabIndex = 0;
this.groupBoxIncludeExportSettings.TabStop = false;
this.groupBoxIncludeExportSettings.Text = "Include export settings";
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Location = new System.Drawing.Point(16, 28);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(184, 17);
this.checkBox1.TabIndex = 0;
this.checkBox1.Text = "Show include metadata on export";
this.checkBox1.UseVisualStyleBackColor = true;
//
// IncludeExportSettings
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.groupBoxIncludeExportSettings);
this.Name = "IncludeExportSettings";
this.Size = new System.Drawing.Size(386, 266);
this.groupBoxIncludeExportSettings.ResumeLayout(false);
this.groupBoxIncludeExportSettings.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBoxIncludeExportSettings;
private System.Windows.Forms.CheckBox checkBox1;
}
}

View file

@ -1,25 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace LSLEditor.Tools
{
public partial class IncludeExportSettings : UserControl, ICommit
{
public IncludeExportSettings()
{
InitializeComponent();
checkBox1.Checked = Properties.Settings.Default.ShowIncludeMetaData;
}
public void Commit()
{
Properties.Settings.Default.ShowIncludeMetaData = checkBox1.Checked;
}
}
}

View file

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -1,139 +0,0 @@
namespace LSLEditor.Tools
{
partial class ProjectIncludes
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.textBoxAddIncludeDir = new System.Windows.Forms.TextBox();
this.groupBoxIncludeDirs = new System.Windows.Forms.GroupBox();
this.buttonRemove = new System.Windows.Forms.Button();
this.buttonAddIncludeDir = new System.Windows.Forms.Button();
this.listBoxIncludeDirs = new System.Windows.Forms.ListBox();
this.buttonBrowseDirs = new System.Windows.Forms.Button();
this.labelIncludeDirs = new System.Windows.Forms.Label();
this.folderBrowserDialogSelectIncludeDir = new System.Windows.Forms.FolderBrowserDialog();
this.groupBoxIncludeDirs.SuspendLayout();
this.SuspendLayout();
//
// textBoxAddIncludeDir
//
this.textBoxAddIncludeDir.Location = new System.Drawing.Point(16, 40);
this.textBoxAddIncludeDir.Name = "textBoxAddIncludeDir";
this.textBoxAddIncludeDir.Size = new System.Drawing.Size(270, 20);
this.textBoxAddIncludeDir.TabIndex = 0;
this.textBoxAddIncludeDir.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBoxAddIncludeDir_KeyPress);
//
// groupBoxIncludeDirs
//
this.groupBoxIncludeDirs.Controls.Add(this.buttonRemove);
this.groupBoxIncludeDirs.Controls.Add(this.buttonAddIncludeDir);
this.groupBoxIncludeDirs.Controls.Add(this.listBoxIncludeDirs);
this.groupBoxIncludeDirs.Controls.Add(this.buttonBrowseDirs);
this.groupBoxIncludeDirs.Controls.Add(this.labelIncludeDirs);
this.groupBoxIncludeDirs.Location = new System.Drawing.Point(3, 3);
this.groupBoxIncludeDirs.Name = "groupBoxIncludeDirs";
this.groupBoxIncludeDirs.Size = new System.Drawing.Size(386, 266);
this.groupBoxIncludeDirs.TabIndex = 1;
this.groupBoxIncludeDirs.TabStop = false;
this.groupBoxIncludeDirs.Text = "Include directories";
//
// buttonRemove
//
this.buttonRemove.Location = new System.Drawing.Point(290, 229);
this.buttonRemove.Name = "buttonRemove";
this.buttonRemove.Size = new System.Drawing.Size(75, 23);
this.buttonRemove.TabIndex = 4;
this.buttonRemove.Text = "Remove";
this.buttonRemove.UseVisualStyleBackColor = true;
this.buttonRemove.Click += new System.EventHandler(this.buttonRemove_Click);
//
// buttonAddIncludeDir
//
this.buttonAddIncludeDir.Location = new System.Drawing.Point(331, 36);
this.buttonAddIncludeDir.Name = "buttonAddIncludeDir";
this.buttonAddIncludeDir.Size = new System.Drawing.Size(34, 23);
this.buttonAddIncludeDir.TabIndex = 3;
this.buttonAddIncludeDir.Text = "Add";
this.buttonAddIncludeDir.UseVisualStyleBackColor = true;
this.buttonAddIncludeDir.Click += new System.EventHandler(this.buttonAddIncludeDir_Click);
//
// listBoxIncludeDirs
//
this.listBoxIncludeDirs.FormattingEnabled = true;
this.listBoxIncludeDirs.HorizontalScrollbar = true;
this.listBoxIncludeDirs.Location = new System.Drawing.Point(13, 76);
this.listBoxIncludeDirs.Name = "listBoxIncludeDirs";
this.listBoxIncludeDirs.Size = new System.Drawing.Size(352, 147);
this.listBoxIncludeDirs.TabIndex = 2;
this.listBoxIncludeDirs.KeyUp += new System.Windows.Forms.KeyEventHandler(this.listBoxIncludeDirs_KeyUp);
//
// buttonBrowseDirs
//
this.buttonBrowseDirs.Location = new System.Drawing.Point(292, 36);
this.buttonBrowseDirs.Name = "buttonBrowseDirs";
this.buttonBrowseDirs.Size = new System.Drawing.Size(32, 23);
this.buttonBrowseDirs.TabIndex = 1;
this.buttonBrowseDirs.Text = "...";
this.buttonBrowseDirs.UseVisualStyleBackColor = true;
this.buttonBrowseDirs.Click += new System.EventHandler(this.buttonBrowseDirs_Click);
//
// labelIncludeDirs
//
this.labelIncludeDirs.AutoSize = true;
this.labelIncludeDirs.Location = new System.Drawing.Point(14, 20);
this.labelIncludeDirs.Name = "labelIncludeDirs";
this.labelIncludeDirs.Size = new System.Drawing.Size(109, 13);
this.labelIncludeDirs.TabIndex = 0;
this.labelIncludeDirs.Text = "Add include directory:";
//
// ProjectIncludes
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.textBoxAddIncludeDir);
this.Controls.Add(this.groupBoxIncludeDirs);
this.Name = "ProjectIncludes";
this.Size = new System.Drawing.Size(392, 272);
this.groupBoxIncludeDirs.ResumeLayout(false);
this.groupBoxIncludeDirs.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox textBoxAddIncludeDir;
private System.Windows.Forms.GroupBox groupBoxIncludeDirs;
private System.Windows.Forms.Label labelIncludeDirs;
private System.Windows.Forms.Button buttonBrowseDirs;
private System.Windows.Forms.ListBox listBoxIncludeDirs;
private System.Windows.Forms.Button buttonAddIncludeDir;
private System.Windows.Forms.Button buttonRemove;
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialogSelectIncludeDir;
}
}

View file

@ -1,108 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using LSLEditor.Helpers;
namespace LSLEditor.Tools
{
public partial class ProjectIncludes : UserControl, ICommit
{
public ProjectIncludes()
{
InitializeComponent();
listBoxIncludeDirs.Items.Clear();
listBoxIncludeDirs.Items.AddRange(Properties.Settings.Default.IncludeDirectories.ToArray());
}
private bool AddToIncludeDirs(string path)
{
// Check if it can find the directory
if(Directory.Exists(path))
{
// Put directory seperator after path
path = path.LastOrDefault() == '\\' || path.LastOrDefault() == '/' ? path : path + '\\';
// Check if it's already in the settings
if(!Properties.Settings.Default.IncludeDirectories.Contains(path))
{
// Add to listbox
listBoxIncludeDirs.Items.Add(path);
return true;
}
} else
{
MessageBox.Show("The given directory was not found. \n\"" + path + "\"", "Oops...", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
return false;
}
private bool RemoveFromIncludeDirs()
{
if(listBoxIncludeDirs.SelectedItem != null)
{
listBoxIncludeDirs.Items.Remove(listBoxIncludeDirs.SelectedItem);
return true;
}
return false;
}
public void Commit()
{
List<string> items = new List<string>();
// Add to settings
foreach(Object item in listBoxIncludeDirs.Items)
{
items.Add(item.ToString());
}
Properties.Settings.Default.IncludeDirectories.set(items);
}
private void buttonAddIncludeDir_Click(object sender, EventArgs e)
{
if(textBoxAddIncludeDir.Text != "")
{
AddToIncludeDirs(textBoxAddIncludeDir.Text);
}
}
private void textBoxAddIncludeDir_KeyPress(object sender, KeyPressEventArgs e)
{
if(e.KeyChar == (char)Keys.Enter)
{
if (textBoxAddIncludeDir.Text != "")
{
AddToIncludeDirs(textBoxAddIncludeDir.Text);
}
}
}
private void buttonBrowseDirs_Click(object sender, EventArgs e)
{
this.folderBrowserDialogSelectIncludeDir.RootFolder = Environment.SpecialFolder.MyComputer;
if (this.folderBrowserDialogSelectIncludeDir.ShowDialog(this) == DialogResult.OK)
{
AddToIncludeDirs(this.folderBrowserDialogSelectIncludeDir.SelectedPath);
}
}
private void buttonRemove_Click(object sender, EventArgs e)
{
RemoveFromIncludeDirs();
}
private void listBoxIncludeDirs_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Delete || e.KeyCode == Keys.Back)
{
RemoveFromIncludeDirs();
}
}
}
}

View file

@ -1,123 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="folderBrowserDialogSelectIncludeDir.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View file

@ -1,89 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
namespace LSLEditor.Tools
{
public partial class ProjectSettings : UserControl, ICommit
{
public ProjectSettings()
{
InitializeComponent();
this.textBox1.Text = Properties.Settings.Default.ProjectLocation;
this.checkBox4.Checked = Helpers.FileAssociator.IsAssociated(".sol");
}
public void Commit()
{
Properties.Settings.Default.ProjectLocation = this.textBox1.Text;
if (this.checkBox4.Checked)
{
if (!
Helpers.FileAssociator.Associate(".sol", "LSLEditorSolution", "Solution File for LSLEditor", Assembly.GetExecutingAssembly().Location, 0))
MessageBox.Show("File association can not be made (needs administrative access)", "Oops...", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
if (Helpers.FileAssociator.IsAssociated(".sol"))
{
if(!Helpers.FileAssociator.DeAssociate(".sol", "LSLEditorSolution"))
MessageBox.Show("File association can not be unmade (needs administrative access)", "Oops...", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
private void button1_Click(object sender, EventArgs e)
{
this.folderBrowserDialog1.RootFolder = Environment.SpecialFolder.MyComputer;
if (this.folderBrowserDialog1.ShowDialog(this) == DialogResult.OK)
{
if(Directory.Exists(this.folderBrowserDialog1.SelectedPath))
this.textBox1.Text = this.folderBrowserDialog1.SelectedPath;
}
}
}
}

View file

@ -1,67 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace LSLEditor.Tools
{
public partial class RuntimeExternal : UserControl, ICommit
{
public RuntimeExternal()
{
InitializeComponent();
this.ProxyServer.Text = Properties.Settings.Default.ProxyServer;
this.ProxyUserid.Text = Properties.Settings.Default.ProxyUserid;
this.ProxyPassword.Text = Properties.Settings.Default.ProxyPassword;
}
public void Commit()
{
Properties.Settings.Default.ProxyServer = this.ProxyServer.Text;
Properties.Settings.Default.ProxyUserid = this.ProxyUserid.Text;
Properties.Settings.Default.ProxyPassword = this.ProxyPassword.Text;
}
}
}

View file

@ -1,73 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
using System.Windows.Forms;
namespace LSLEditor.Tools
{
public partial class RuntimeGeneral : UserControl, ICommit
{
public RuntimeGeneral()
{
InitializeComponent();
this.checkBox1.Checked = Properties.Settings.Default.CommentCStyle;
this.checkBox2.Checked = Properties.Settings.Default.SkipWarnings;
this.checkBox3.Checked = Properties.Settings.Default.SingleQuote;
this.checkBox4.Checked = Properties.Settings.Default.QuotesListVerbose;
this.checkBox5.Checked = Properties.Settings.Default.AutoSaveOnDebug;
this.checkBox6.Checked = Properties.Settings.Default.llGetScriptName;
this.checkBox7.Checked = Properties.Settings.Default.StatesInGlobalFunctions;
}
public void Commit()
{
Properties.Settings.Default.CommentCStyle = this.checkBox1.Checked;
Properties.Settings.Default.SkipWarnings = this.checkBox2.Checked;
Properties.Settings.Default.SingleQuote = this.checkBox3.Checked;
Properties.Settings.Default.QuotesListVerbose = this.checkBox4.Checked;
Properties.Settings.Default.AutoSaveOnDebug = this.checkBox5.Checked;
Properties.Settings.Default.llGetScriptName = this.checkBox6.Checked;
Properties.Settings.Default.StatesInGlobalFunctions = this.checkBox7.Checked;
}
}
}

View file

@ -1,109 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace LSLEditor.Tools
{
public partial class RuntimeSmtp : UserControl, ICommit
{
public RuntimeSmtp()
{
InitializeComponent();
this.EmailServer.Text = Properties.Settings.Default.EmailServer;
this.EmailAddress.Text = Properties.Settings.Default.EmailAddress;
this.SmtpUserid.Text = Properties.Settings.Default.SmtpUserid;
this.SmtpPassword.Text = Properties.Settings.Default.SmtpPassword;
switch (Properties.Settings.Default.SmtpAuth)
{
case "PLAIN":
this.radioButton1.Checked = true;
break;
case "LOGIN":
this.radioButton2.Checked = true;
break;
case "CRAM-MD5":
this.radioButton3.Checked = true;
break;
case "DIGEST-MD5":
this.radioButton4.Checked = true;
break;
case "EXTERNAL":
this.radioButton5.Checked = true;
break;
case "ANONYMOUS":
this.radioButton6.Checked = true;
break;
default:
break;
}
}
public void Commit()
{
Properties.Settings.Default.EmailServer = this.EmailServer.Text;
Properties.Settings.Default.EmailAddress = this.EmailAddress.Text;
Properties.Settings.Default.SmtpUserid = this.SmtpUserid.Text;
Properties.Settings.Default.SmtpPassword = this.SmtpPassword.Text;
if (this.radioButton1.Checked)
Properties.Settings.Default.SmtpAuth = "PLAIN";
if (this.radioButton2.Checked)
Properties.Settings.Default.SmtpAuth = "LOGIN";
if (this.radioButton3.Checked)
Properties.Settings.Default.SmtpAuth = "CRAM-MD5";
if (this.radioButton4.Checked)
Properties.Settings.Default.SmtpAuth = "DIGEST-MD5";
if (this.radioButton5.Checked)
Properties.Settings.Default.SmtpAuth = "EXTERNAL";
if (this.radioButton6.Checked)
Properties.Settings.Default.SmtpAuth = "ANONYMOUS";
}
}
}

View file

@ -1,67 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
// TextEditorCodeCompletion.cs
// Code for getting/setting the Tool/Options/.../CodeCompletion dialogue options.
// </summary>
using System.Diagnostics.CodeAnalysis;
using System.Windows.Forms;
namespace LSLEditor.Tools
{
public partial class TextEditorCodeCompletion : UserControl, ICommit
{
public TextEditorCodeCompletion()
{
InitializeComponent();
this.checkBox1.Checked = Properties.Settings.Default.CodeCompletion;
this.checkBox2.Checked = Properties.Settings.Default.CodeCompletionUserVar;
this.checkBox3.Checked = Properties.Settings.Default.CodeCompletionArguments;
this.checkBox4.Checked = Properties.Settings.Default.CodeCompletionAnimation;
}
public void Commit()
{
Properties.Settings.Default.CodeCompletion = this.checkBox1.Checked;
Properties.Settings.Default.CodeCompletionUserVar = this.checkBox2.Checked;
Properties.Settings.Default.CodeCompletionArguments = this.checkBox3.Checked;
Properties.Settings.Default.CodeCompletionAnimation = this.checkBox4.Checked;
}
}
}

View file

@ -1,121 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace LSLEditor.Tools
{
public partial class TextEditorFontColors : UserControl, ICommit
{
private Font fontEditor;
private Font fontTooltips;
public TextEditorFontColors()
{
InitializeComponent();
this.checkBox1.Checked = Properties.Settings.Default.SLColorScheme;
fontEditor = Properties.Settings.Default.FontEditor;
fontTooltips = Properties.Settings.Default.FontTooltips;
ShowFonts();
}
private void ShowFonts()
{
this.label3.Text = string.Format("{0} / {1} / {2}",
fontEditor.Name,
fontEditor.Size,
fontEditor.Style);
this.label4.Text = string.Format("{0} / {1} / {2}",
fontTooltips.Name,
fontTooltips.Size,
fontTooltips.Style);
}
private void button3_Click(object sender, EventArgs e)
{
this.fontDialog1.FixedPitchOnly = true;
this.fontDialog1.ShowEffects = false;
this.fontDialog1.AllowScriptChange = false;
this.fontDialog1.Font = Properties.Settings.Default.FontEditor;
try
{
if (this.fontDialog1.ShowDialog(this) == DialogResult.OK)
{
fontEditor = this.fontDialog1.Font;
ShowFonts();
}
}
catch
{
}
}
private void button4_Click(object sender, EventArgs e)
{
this.fontDialog1.FixedPitchOnly = false;
this.fontDialog1.ShowEffects = false;
this.fontDialog1.AllowScriptChange = false;
this.fontDialog1.Font = Properties.Settings.Default.FontTooltips;
if (this.fontDialog1.ShowDialog(this) == DialogResult.OK)
{
fontTooltips = this.fontDialog1.Font;
ShowFonts();
}
}
public void Commit()
{
Properties.Settings.Default.SLColorScheme = this.checkBox1.Checked;
Properties.Settings.Default.FontEditor = fontEditor;
Properties.Settings.Default.FontTooltips = fontTooltips;
}
}
}

View file

@ -1,89 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
using System.IO;
using System.Windows.Forms;
namespace LSLEditor.Tools
{
public partial class VersionControlGeneral : UserControl, ICommit
{
public VersionControlGeneral()
{
InitializeComponent();
this.groupBox1.Enabled = true;//Properties.Settings.Default.VersionControl;
this.checkBox1.Checked = Properties.Settings.Default.VersionControlSVN;
this.checkBox1.CheckedChanged += new EventHandler(checkBox1_CheckedChanged);
checkBox1_CheckedChanged(null, null);
this.textBox1.Text = Properties.Settings.Default.SvnExe;
this.textBox2.Text = Properties.Settings.Default.SvnUserid;
this.textBox3.Text = Properties.Settings.Default.SvnPassword;
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
this.textBox1.Enabled = this.checkBox1.Checked;
}
public void Commit()
{
Properties.Settings.Default.SvnExe = this.textBox1.Text;
Properties.Settings.Default.SvnUserid = this.textBox2.Text;
Properties.Settings.Default.SvnPassword = this.textBox3.Text;
Properties.Settings.Default.VersionControlSVN = this.checkBox1.Checked;
}
private void button3_Click(object sender, EventArgs e)
{
this.openFileDialog1.FileName = "svn.exe";
this.openFileDialog1.Filter = "Executables (*.exe)|*.exe|All files (*.*)|*.*";
if (this.openFileDialog1.ShowDialog(this) == DialogResult.OK)
{
if (File.Exists(this.openFileDialog1.FileName))
this.textBox1.Text = this.openFileDialog1.FileName;
}
}
}
}

View file

@ -1,99 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace LSLEditor
{
public partial class llDialogForm : Form
{
private SecondLifeHost host;
private int Channel;
private string ObjectName;
private string OwnerName;
private SecondLife.key id;
public llDialogForm(SecondLifeHost host, SecondLife.String strObjectName, SecondLife.key id, SecondLife.String strOwner, SecondLife.String strMessage, SecondLife.list buttons, SecondLife.integer intChannel)
{
InitializeComponent();
this.host = host;
this.Channel = intChannel;
this.OwnerName = strOwner;
this.ObjectName = strObjectName;
this.id = id;
for (int intI = 1; intI <= 12; intI++) {
Button button = this.Controls["Button" + intI] as Button;
button.Visible = false;
}
this.label1.Text = strOwner + "'s '" + strObjectName + "'";
this.label2.Text = strMessage.ToString().Replace("&", "&&");
for (int intI = 1; intI <= buttons.Count; intI++) {
Button button = this.Controls["Button" + intI] as Button;
if (button == null)
continue;
button.Text = buttons[intI - 1].ToString().Replace("&", "&&");
button.Visible = true;
button.Click += new EventHandler(button_Click);
}
}
void button_Click(object sender, EventArgs e)
{
Button button = sender as Button;
if (button != null) {
host.Chat(this, this.Channel, this.OwnerName, this.id, button.Text.Replace("&&", "&"), CommunicationType.Say);
this.Close();
}
}
private void button13_Click(object sender, EventArgs e)
{
this.Close();
}
}
}

View file

@ -1,89 +0,0 @@
// <copyright file="gpl-2.0.txt">
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden.
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's 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 The LSLEditor Group.
// 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 copies or substantial portions of the
// Software.
// ********************************************************************************************************************
// </copyright>
//
// <summary>
//
//
// </summary>
/*
* @author MrSoundless
* @date 29 April 2011
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace LSLEditor
{
public partial class llTextBoxForm : Form
{
private SecondLifeHost host;
private int Channel;
private string ObjectName;
private string OwnerName;
private SecondLife.key id;
public llTextBoxForm(SecondLifeHost host, SecondLife.String strObjectName, SecondLife.key id, SecondLife.String strOwner, SecondLife.String strMessage, SecondLife.integer intChannel)
{
InitializeComponent();
this.host = host;
this.Channel = intChannel;
this.OwnerName = strOwner;
this.ObjectName = strObjectName;
this.id = id;
this.label1.Text = strMessage.ToString().Replace("&", "&&");
}
private void buttonIgnore_Click(object sender, EventArgs e)
{
this.Close();
}
private void buttonOK_Click(object sender, EventArgs e)
{
Button button = sender as Button;
if (button != null) {
host.Chat(this, this.Channel, this.OwnerName, this.id, textBox.Text.Replace("&&", "&"), CommunicationType.Say);
this.Close();
}
}
}
}

View file

@ -1,60 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Web References\org.lsleditor.www\Reference.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Web References\org.lsleditor.www\Reference.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
<ItemGroup>
<Compile Update="ImagesSolutionExplorer\SolutionImages.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>SolutionImages.resx</DependentUpon>
</Compile>
<Compile Update="Images\Images.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Images.resx</DependentUpon>
</Compile>
<Compile Update="Properties\Settings.Designer.cs">
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="ImagesSolutionExplorer\SolutionImages.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>SolutionImages.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Images\Images.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Images.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Update="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
</Project>

View file

@ -1,175 +1,145 @@
namespace LSLEditor namespace LSLEditor
{ {
/// <summary> partial class About
/// About dialogue box form. {
/// </summary> /// <summary>
public partial class About /// Required designer variable.
{ /// </summary>
/// <summary> private System.ComponentModel.IContainer components = null;
/// Required designer variable.
/// </summary> /// <summary>
private System.ComponentModel.IContainer components = null; /// Clean up any resources being used.
/// </summary>
/// <summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
/// Container for LSLife picture. protected override void Dispose(bool disposing)
/// </summary> {
private System.Windows.Forms.PictureBox pictureBox1; if (disposing && (components != null))
{
/// <summary> components.Dispose();
/// Container to hold all the elements. }
/// </summary> base.Dispose(disposing);
private System.Windows.Forms.GroupBox groupBox1; }
/// <summary> #region Windows Form Designer generated code
/// OK Button.
/// </summary> /// <summary>
private System.Windows.Forms.Button button1; /// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// <summary> /// </summary>
/// Web Browser. private void InitializeComponent()
/// </summary> {
private System.Windows.Forms.WebBrowser webBrowser1; this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
/// <summary> this.label2 = new System.Windows.Forms.Label();
/// Link label. this.label1 = new System.Windows.Forms.Label();
/// </summary> this.webBrowser1 = new System.Windows.Forms.WebBrowser();
private System.Windows.Forms.LinkLabel linkLabel1; this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.button1 = new System.Windows.Forms.Button();
/// <summary> ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
/// Version label. this.groupBox1.SuspendLayout();
/// </summary> this.SuspendLayout();
private System.Windows.Forms.Label label1; //
// pictureBox1
/// <summary> //
/// LSL Editor label. this.pictureBox1.Image = global::LSLEditor.Properties.Resources.logo;
/// </summary> this.pictureBox1.Location = new System.Drawing.Point(16, 16);
private System.Windows.Forms.Label label2; this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(184, 80);
/// <summary> this.pictureBox1.TabIndex = 0;
/// Clean up any resources being used. this.pictureBox1.TabStop = false;
/// </summary> //
/// <param name="disposing">True if managed resources should be disposed; otherwise, false.</param> // groupBox1
protected override void Dispose(bool disposing) //
{ this.groupBox1.Controls.Add(this.label2);
if (disposing && (this.components != null)) { this.groupBox1.Controls.Add(this.label1);
this.components.Dispose(); this.groupBox1.Controls.Add(this.webBrowser1);
} this.groupBox1.Controls.Add(this.linkLabel1);
this.groupBox1.Controls.Add(this.pictureBox1);
base.Dispose(disposing); this.groupBox1.Location = new System.Drawing.Point(16, 8);
} this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(320, 360);
#region Windows Form Designer generated code this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
/// <summary> this.groupBox1.Text = "LSL-Editor";
/// Required method for Designer support - do not modify //
/// the contents of this method with the code editor. // label2
/// </summary> //
private void InitializeComponent() this.label2.AutoSize = true;
{ this.label2.Location = new System.Drawing.Point(72, 112);
this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.label2.Name = "label2";
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.label2.Size = new System.Drawing.Size(16, 13);
this.label2 = new System.Windows.Forms.Label(); this.label2.TabIndex = 4;
this.label1 = new System.Windows.Forms.Label(); this.label2.Text = "...";
this.webBrowser1 = new System.Windows.Forms.WebBrowser(); //
this.linkLabel1 = new System.Windows.Forms.LinkLabel(); // label1
this.button1 = new System.Windows.Forms.Button(); //
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.label1.AutoSize = true;
this.groupBox1.SuspendLayout(); this.label1.Location = new System.Drawing.Point(16, 112);
this.SuspendLayout(); this.label1.Name = "label1";
// this.label1.Size = new System.Drawing.Size(45, 13);
// pictureBox1 this.label1.TabIndex = 3;
// this.label1.Text = "Version:";
this.pictureBox1.Image = global::LSLEditor.Properties.Resources.logo; //
this.pictureBox1.Location = new System.Drawing.Point(16, 16); // webBrowser1
this.pictureBox1.Name = "pictureBox1"; //
this.pictureBox1.Size = new System.Drawing.Size(184, 80); this.webBrowser1.Location = new System.Drawing.Point(8, 128);
this.pictureBox1.TabIndex = 0; this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
this.pictureBox1.TabStop = false; this.webBrowser1.Name = "webBrowser1";
// this.webBrowser1.Size = new System.Drawing.Size(304, 224);
// groupBox1 this.webBrowser1.TabIndex = 2;
// //
this.groupBox1.Controls.Add(this.label2); // linkLabel1
this.groupBox1.Controls.Add(this.label1); //
this.groupBox1.Controls.Add(this.webBrowser1); this.linkLabel1.AutoSize = true;
this.groupBox1.Controls.Add(this.linkLabel1); this.linkLabel1.Location = new System.Drawing.Point(16, 96);
this.groupBox1.Controls.Add(this.pictureBox1); this.linkLabel1.Name = "linkLabel1";
this.groupBox1.Location = new System.Drawing.Point(16, 8); this.linkLabel1.Size = new System.Drawing.Size(79, 13);
this.groupBox1.Name = "groupBox1"; this.linkLabel1.TabIndex = 1;
this.groupBox1.Size = new System.Drawing.Size(320, 360); this.linkLabel1.TabStop = true;
this.groupBox1.TabIndex = 1; this.linkLabel1.Text = "© 2006 — 2012";
this.groupBox1.TabStop = false; this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
this.groupBox1.Text = "LSL-Editor"; //
// // button1
// label2 //
// this.button1.Location = new System.Drawing.Point(240, 376);
this.label2.AutoSize = true; this.button1.Name = "button1";
this.label2.Location = new System.Drawing.Point(72, 112); this.button1.Size = new System.Drawing.Size(75, 23);
this.label2.Name = "label2"; this.button1.TabIndex = 2;
this.label2.Size = new System.Drawing.Size(16, 13); this.button1.Text = "Ok";
this.label2.TabIndex = 4; this.button1.UseVisualStyleBackColor = true;
this.label2.Text = "..."; this.button1.Click += new System.EventHandler(this.button1_Click);
// //
// label1 // About
// //
this.label1.AutoSize = true; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.label1.Location = new System.Drawing.Point(16, 112); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.label1.Name = "label1"; this.BackColor = System.Drawing.Color.White;
this.label1.Size = new System.Drawing.Size(45, 13); this.ClientSize = new System.Drawing.Size(352, 410);
this.label1.TabIndex = 3; this.Controls.Add(this.button1);
this.label1.Text = "Version:"; this.Controls.Add(this.groupBox1);
// this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
// webBrowser1 this.MaximizeBox = false;
// this.MinimizeBox = false;
this.webBrowser1.Location = new System.Drawing.Point(8, 128); this.Name = "About";
this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); this.ShowInTaskbar = false;
this.webBrowser1.Name = "webBrowser1"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.webBrowser1.Size = new System.Drawing.Size(304, 224); this.Text = "About";
this.webBrowser1.TabIndex = 2; this.Load += new System.EventHandler(this.About_Load);
// ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
// linkLabel1 this.groupBox1.ResumeLayout(false);
// this.groupBox1.PerformLayout();
this.linkLabel1.AutoSize = true; this.ResumeLayout(false);
this.linkLabel1.Location = new System.Drawing.Point(16, 96);
this.linkLabel1.Name = "linkLabel1"; }
this.linkLabel1.Size = new System.Drawing.Size(79, 13);
this.linkLabel1.TabIndex = 1; #endregion
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "© 2006 — 2012"; private System.Windows.Forms.PictureBox pictureBox1;
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); private System.Windows.Forms.GroupBox groupBox1;
// private System.Windows.Forms.Button button1;
// button1 private System.Windows.Forms.WebBrowser webBrowser1;
// private System.Windows.Forms.LinkLabel linkLabel1;
this.button1.Location = new System.Drawing.Point(240, 376); private System.Windows.Forms.Label label2;
this.button1.Name = "button1"; private System.Windows.Forms.Label label1;
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
}
}

80
trunk/About.cs Normal file
View file

@ -0,0 +1,80 @@
// /**
// ********
// *
// * ORIGINAL 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, who in turn License under the GPLv2.
// * In agreement with Alphons van der Heijden's 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 The LSLEditor Group. 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);
}
}
}

View file

@ -1,120 +1,120 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<root> <root>
<!-- <!--
Microsoft ResX Schema Microsoft ResX Schema
Version 2.0 Version 2.0
The primary goals of this format is to allow a simple XML format The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes various data types are done through the TypeConverter classes
associated with the data types. associated with the data types.
Example: Example:
... ado.net/XML headers & schema ... ... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader> <resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value> <value>[base64 mime encoded serialized .NET Framework object]</value>
</data> </data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment> <comment>This is a comment</comment>
</data> </data>
There are any number of "resheader" rows that contain simple There are any number of "resheader" rows that contain simple
name/value pairs. name/value pairs.
Each data row contains a name, and value. The row also contains a Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture. text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the Classes that don't support this are serialized and stored with the
mimetype set. mimetype set.
The mimetype is used for serialized objects, and tells the The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly: extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below. read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64 mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64 mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64 mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter : using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
--> -->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType> <xsd:complexType>
<xsd:choice maxOccurs="unbounded"> <xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata"> <xsd:element name="metadata">
<xsd:complexType> <xsd:complexType>
<xsd:sequence> <xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" /> <xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" /> <xsd:attribute ref="xml:space" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="assembly"> <xsd:element name="assembly">
<xsd:complexType> <xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" /> <xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" /> <xsd:attribute name="name" type="xsd:string" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="data"> <xsd:element name="data">
<xsd:complexType> <xsd:complexType>
<xsd:sequence> <xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" /> <xsd:attribute ref="xml:space" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="resheader"> <xsd:element name="resheader">
<xsd:complexType> <xsd:complexType>
<xsd:sequence> <xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" /> <xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
</xsd:choice> </xsd:choice>
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
</xsd:schema> </xsd:schema>
<resheader name="resmimetype"> <resheader name="resmimetype">
<value>text/microsoft-resx</value> <value>text/microsoft-resx</value>
</resheader> </resheader>
<resheader name="version"> <resheader name="version">
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
</root> </root>

View file

@ -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();
}
}
}
}
}
}

View file

@ -1,161 +1,122 @@
// <copyright file="gpl-2.0.txt"> namespace LSLEditor.BZip2Decompress
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden. {
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands &
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's wishes. /// <summary>
// /// Defines internal values for both compression and decompression
// The community would like to thank Alphons for all of his hard work, blood sweat and tears. Without his work /// </summary>
// the community would be stuck with crappy editors. public sealed class BZip2Constants
// {
// The source code in this file ("Source Code") is provided by The LSLEditor Group to you under the terms of the GNU /// <summary>
// General Public License, version 2.0 ("GPL"), unless you have obtained a separate licensing agreement ("Other /// Random numbers used to randomise repetitive blocks
// License"), formally executed by you and The LSLEditor Group. /// </summary>
// Terms of the GPL can be found in the gplv2.txt document. public readonly static int[] rNums = {
// 619, 720, 127, 481, 931, 816, 813, 233, 566, 247,
// GPLv2 Header 985, 724, 205, 454, 863, 491, 741, 242, 949, 214,
// ************ 733, 859, 335, 708, 621, 574, 73, 654, 730, 472,
// LSLEditor, a External editor for the LSL Language. 419, 436, 278, 496, 867, 210, 399, 680, 480, 51,
// Copyright (C) 2010 The LSLEditor Group. 878, 465, 811, 169, 869, 675, 611, 697, 867, 561,
// 862, 687, 507, 283, 482, 129, 807, 591, 733, 623,
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public 150, 238, 59, 379, 684, 877, 625, 169, 643, 105,
// License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any 170, 607, 520, 932, 727, 476, 693, 425, 174, 647,
// later version. 73, 122, 335, 530, 442, 853, 695, 249, 445, 515,
// 909, 545, 703, 919, 874, 474, 882, 500, 594, 612,
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 641, 801, 220, 162, 819, 984, 589, 513, 495, 799,
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 161, 604, 958, 533, 221, 400, 386, 867, 600, 782,
// details. 382, 596, 414, 171, 516, 375, 682, 485, 911, 276,
// 98, 553, 163, 354, 666, 933, 424, 341, 533, 870,
// You should have received a copy of the GNU General Public License along with this program; if not, write to the Free 227, 730, 475, 186, 263, 647, 537, 686, 600, 224,
// Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 469, 68, 770, 919, 190, 373, 294, 822, 808, 206,
// ******************************************************************************************************************** 184, 943, 795, 384, 383, 461, 404, 758, 839, 887,
// The above copyright notice and this permission notice shall be included in copies or substantial portions of the 715, 67, 618, 276, 204, 918, 873, 777, 604, 560,
// Software. 951, 160, 578, 722, 79, 804, 96, 409, 713, 940,
// ******************************************************************************************************************** 652, 934, 970, 447, 318, 353, 859, 672, 112, 785,
// </copyright> 645, 863, 803, 350, 139, 93, 354, 99, 820, 908,
// 609, 772, 154, 274, 580, 184, 79, 626, 630, 742,
// <summary> 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,
// </summary> 857, 956, 358, 619, 580, 124, 737, 594, 701, 612,
669, 112, 134, 694, 363, 992, 809, 743, 168, 974,
namespace LSLEditor.Decompressor 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,
/// <summary> 433, 837, 553, 268, 926, 240, 102, 654, 459, 51,
/// Defines internal values for both compression and decompression 686, 754, 806, 760, 493, 403, 415, 394, 687, 700,
/// </summary> 946, 670, 656, 610, 738, 392, 760, 799, 887, 653,
public sealed class BZip2Constants 978, 321, 576, 617, 626, 502, 894, 679, 243, 440,
{ 680, 879, 194, 572, 640, 724, 926, 56, 204, 700,
/// <summary> 707, 151, 457, 449, 797, 195, 791, 558, 945, 679,
/// Random numbers used to randomise repetitive blocks 297, 59, 87, 824, 713, 663, 412, 693, 342, 606,
/// </summary> 134, 108, 571, 364, 631, 212, 174, 643, 304, 329,
public readonly static int[] rNums = { 343, 97, 430, 751, 497, 314, 983, 374, 822, 928,
619, 720, 127, 481, 931, 816, 813, 233, 566, 247, 140, 206, 73, 263, 980, 736, 876, 478, 430, 305,
985, 724, 205, 454, 863, 491, 741, 242, 949, 214, 170, 514, 364, 692, 829, 82, 855, 953, 676, 246,
733, 859, 335, 708, 621, 574, 73, 654, 730, 472, 369, 970, 294, 750, 807, 827, 150, 790, 288, 923,
419, 436, 278, 496, 867, 210, 399, 680, 480, 51, 804, 378, 215, 828, 592, 281, 565, 555, 710, 82,
878, 465, 811, 169, 869, 675, 611, 697, 867, 561, 896, 831, 547, 261, 524, 462, 293, 465, 502, 56,
862, 687, 507, 283, 482, 129, 807, 591, 733, 623, 661, 821, 976, 991, 658, 869, 905, 758, 745, 193,
150, 238, 59, 379, 684, 877, 625, 169, 643, 105, 768, 550, 608, 933, 378, 286, 215, 979, 792, 961,
170, 607, 520, 932, 727, 476, 693, 425, 174, 647, 61, 688, 793, 644, 986, 403, 106, 366, 905, 644,
73, 122, 335, 530, 442, 853, 695, 249, 445, 515, 372, 567, 466, 434, 645, 210, 389, 550, 919, 135,
909, 545, 703, 919, 874, 474, 882, 500, 594, 612, 780, 773, 635, 389, 707, 100, 626, 958, 165, 504,
641, 801, 220, 162, 819, 984, 589, 513, 495, 799, 920, 176, 193, 713, 857, 265, 203, 50, 668, 108,
161, 604, 958, 533, 221, 400, 386, 867, 600, 782, 645, 990, 626, 197, 510, 357, 358, 850, 858, 364,
382, 596, 414, 171, 516, 375, 682, 485, 911, 276, 936, 638
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, /// <summary>
184, 943, 795, 384, 383, 461, 404, 758, 839, 887, /// When multiplied by compression parameter (1-9) gives the block size for compression
715, 67, 618, 276, 204, 918, 873, 777, 604, 560, /// 9 gives the best compresssion but uses the most memory.
951, 160, 578, 722, 79, 804, 96, 409, 713, 940, /// </summary>
652, 934, 970, 447, 318, 353, 859, 672, 112, 785, public const int baseBlockSize = 100000;
645, 863, 803, 350, 139, 93, 354, 99, 820, 908,
609, 772, 154, 274, 580, 184, 79, 626, 630, 742, /// <summary>
653, 282, 762, 623, 680, 81, 927, 626, 789, 125, /// Backend constant
411, 521, 938, 300, 821, 78, 343, 175, 128, 250, /// </summary>
170, 774, 972, 275, 999, 639, 495, 78, 352, 126, public const int MAX_ALPHA_SIZE = 258;
857, 956, 358, 619, 580, 124, 737, 594, 701, 612,
669, 112, 134, 694, 363, 992, 809, 743, 168, 974, /// <summary>
944, 375, 748, 52, 600, 747, 642, 182, 862, 81, /// Backend constant
344, 805, 988, 739, 511, 655, 814, 334, 249, 515, /// </summary>
897, 955, 664, 981, 649, 113, 974, 459, 893, 228, public const int MAX_CODE_LEN = 23;
433, 837, 553, 268, 926, 240, 102, 654, 459, 51,
686, 754, 806, 760, 493, 403, 415, 394, 687, 700, /// <summary>
946, 670, 656, 610, 738, 392, 760, 799, 887, 653, /// Backend constant
978, 321, 576, 617, 626, 502, 894, 679, 243, 440, /// </summary>
680, 879, 194, 572, 640, 724, 926, 56, 204, 700, public const int RUNA = 0;
707, 151, 457, 449, 797, 195, 791, 558, 945, 679,
297, 59, 87, 824, 713, 663, 412, 693, 342, 606, /// <summary>
134, 108, 571, 364, 631, 212, 174, 643, 304, 329, /// Backend constant
343, 97, 430, 751, 497, 314, 983, 374, 822, 928, /// </summary>
140, 206, 73, 263, 980, 736, 876, 478, 430, 305, public const int RUNB = 1;
170, 514, 364, 692, 829, 82, 855, 953, 676, 246,
369, 970, 294, 750, 807, 827, 150, 790, 288, 923, /// <summary>
804, 378, 215, 828, 592, 281, 565, 555, 710, 82, /// Backend constant
896, 831, 547, 261, 524, 462, 293, 465, 502, 56, /// </summary>
661, 821, 976, 991, 658, 869, 905, 758, 745, 193, public const int N_GROUPS = 6;
768, 550, 608, 933, 378, 286, 215, 979, 792, 961,
61, 688, 793, 644, 986, 403, 106, 366, 905, 644, /// <summary>
372, 567, 466, 434, 645, 210, 389, 550, 919, 135, /// Backend constant
780, 773, 635, 389, 707, 100, 626, 958, 165, 504, /// </summary>
920, 176, 193, 713, 857, 265, 203, 50, 668, 108, public const int G_SIZE = 50;
645, 990, 626, 197, 510, 357, 358, 850, 858, 364,
936, 638 /// <summary>
}; /// Backend constant
/// </summary>
/// <summary> public const int N_ITERS = 4;
/// When multiplied by compression parameter (1-9) gives the block size for compression
/// 9 gives the best compresssion but uses the most memory. /// <summary>
/// </summary> /// Backend constant
public const int baseBlockSize = 100000; /// </summary>
public const int MAX_SELECTORS = (2 + (900000 / G_SIZE));
/// <summary>
/// Backend constant /// <summary>
/// </summary> /// Backend constant
public const int MAX_ALPHA_SIZE = 258; /// </summary>
public const int NUM_OVERSHOOT_BYTES = 20;
/// <summary>
/// Backend constant private BZip2Constants()
/// </summary> {
public const int MAX_CODE_LEN = 23; }
}
/// <summary> }
/// Backend constant
/// </summary>
public const int RUNA = 0;
/// <summary>
/// Backend constant
/// </summary>
public const int RUNB = 1;
/// <summary>
/// Backend constant
/// </summary>
public const int N_GROUPS = 6;
/// <summary>
/// Backend constant
/// </summary>
public const int G_SIZE = 50;
/// <summary>
/// Backend constant
/// </summary>
public const int N_ITERS = 4;
/// <summary>
/// Backend constant
/// </summary>
public const int MAX_SELECTORS = (2 + (900000 / G_SIZE));
/// <summary>
/// Backend constant
/// </summary>
public const int NUM_OVERSHOOT_BYTES = 20;
private BZip2Constants()
{
}
}
}

View file

@ -1,93 +1,93 @@
// IChecksum.cs - Interface to compute a data checksum // IChecksum.cs - Interface to compute a data checksum
// Copyright (C) 2001 Mike Krueger // Copyright (C) 2001 Mike Krueger
// //
// This file was translated from java, it was part of the GNU Classpath // This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. // Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 // as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version. // of the License, or (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// //
// Linking this library statically or dynamically with other modules is // Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and // making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole // conditions of the GNU General Public License cover the whole
// combination. // combination.
// //
// As a special exception, the copyright holders of this library give you // As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an // permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent // executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under // modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked // terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that // independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from // 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 // 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 // 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 // obligated to do so. If you do not wish to do so, delete this
// exception statement from your version. // exception statement from your version.
namespace LSLEditor.Decompressor namespace LSLEditor.BZip2Decompress
{ {
/// <summary> /// <summary>
/// Interface to compute a data checksum used by checked input/output streams. /// 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 /// 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 /// update the value of the current checksum can be returned by calling
/// <code>getValue</code>. The complete checksum object can also be reset /// <code>getValue</code>. The complete checksum object can also be reset
/// so it can be used again with new data. /// so it can be used again with new data.
/// </summary> /// </summary>
public interface IChecksum public interface IChecksum
{ {
/// <summary> /// <summary>
/// Returns the data checksum computed so far. /// Returns the data checksum computed so far.
/// </summary> /// </summary>
long Value long Value
{ {
get; get;
} }
/// <summary> /// <summary>
/// Resets the data checksum as if no update was ever called. /// Resets the data checksum as if no update was ever called.
/// </summary> /// </summary>
void Reset(); void Reset();
/// <summary> /// <summary>
/// Adds one byte to the data checksum. /// Adds one byte to the data checksum.
/// </summary> /// </summary>
/// <param name = "value"> /// <param name = "value">
/// the data value to add. The high byte of the int is ignored. /// the data value to add. The high byte of the int is ignored.
/// </param> /// </param>
void Update(int value); void Update(int value);
/// <summary> /// <summary>
/// Updates the data checksum with the bytes taken from the array. /// Updates the data checksum with the bytes taken from the array.
/// </summary> /// </summary>
/// <param name="buffer"> /// <param name="buffer">
/// buffer an array of bytes /// buffer an array of bytes
/// </param> /// </param>
void Update(byte[] buffer); void Update(byte[] buffer);
/// <summary> /// <summary>
/// Adds the byte array to the data checksum. /// Adds the byte array to the data checksum.
/// </summary> /// </summary>
/// <param name = "buffer"> /// <param name = "buffer">
/// The buffer which contains the data /// The buffer which contains the data
/// </param> /// </param>
/// <param name = "offset"> /// <param name = "offset">
/// The offset in the buffer where the data starts /// The offset in the buffer where the data starts
/// </param> /// </param>
/// <param name = "count"> /// <param name = "count">
/// the number of data bytes to add. /// the number of data bytes to add.
/// </param> /// </param>
void Update(byte[] buffer, int offset, int count); void Update(byte[] buffer, int offset, int count);
} }
} }

View file

@ -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();
}
}
}

View file

@ -1,207 +1,207 @@
// StrangeCRC.cs - computes a crc used in the bziplib // StrangeCRC.cs - computes a crc used in the bziplib
// //
// Copyright (C) 2001 Mike Krueger // Copyright (C) 2001 Mike Krueger
// //
// This file was translated from java, it was part of the GNU Classpath // This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. // Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 // as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version. // of the License, or (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// //
// Linking this library statically or dynamically with other modules is // Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and // making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole // conditions of the GNU General Public License cover the whole
// combination. // combination.
// //
// As a special exception, the copyright holders of this library give you // As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an // permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent // executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under // modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked // terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that // independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from // 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 // 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 // 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 // obligated to do so. If you do not wish to do so, delete this
// exception statement from your version. // exception statement from your version.
using System; using System;
namespace LSLEditor.Decompressor namespace LSLEditor.BZip2Decompress
{ {
/// <summary> /// <summary>
/// Bzip2 checksum algorithm /// Bzip2 checksum algorithm
/// </summary> /// </summary>
public class StrangeCRC : IChecksum public class StrangeCRC : IChecksum
{ {
readonly static uint[] crc32Table = { readonly static uint[] crc32Table = {
0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9,
0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005, 0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005,
0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd,
0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9, 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9,
0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75, 0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75,
0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011, 0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011,
0x791d4014, 0x7ddc5da3, 0x709f7b7a, 0x745e66cd, 0x791d4014, 0x7ddc5da3, 0x709f7b7a, 0x745e66cd,
0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5,
0xbe2b5b58, 0xbaea46ef, 0xb7a96036, 0xb3687d81, 0xbe2b5b58, 0xbaea46ef, 0xb7a96036, 0xb3687d81,
0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d, 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d,
0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49, 0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49,
0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95, 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95,
0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1,
0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, 0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d,
0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae, 0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae,
0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072, 0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072,
0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16, 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16,
0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca, 0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca,
0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde, 0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde,
0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02, 0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02,
0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, 0x53dc6066, 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, 0x53dc6066,
0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba,
0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e,
0xbfa1b04b, 0xbb60adfc, 0xb6238b25, 0xb2e29692, 0xbfa1b04b, 0xbb60adfc, 0xb6238b25, 0xb2e29692,
0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6, 0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6,
0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a, 0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a,
0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e, 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e,
0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2,
0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686,
0xd5b88683, 0xd1799b34, 0xdc3abded, 0xd8fba05a, 0xd5b88683, 0xd1799b34, 0xdc3abded, 0xd8fba05a,
0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637, 0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637,
0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb, 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb,
0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f, 0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f,
0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53, 0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53,
0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47, 0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47,
0x36194d42, 0x32d850f5, 0x3f9b762c, 0x3b5a6b9b, 0x36194d42, 0x32d850f5, 0x3f9b762c, 0x3b5a6b9b,
0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff,
0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623,
0xf12f560e, 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7, 0xf12f560e, 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7,
0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b, 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b,
0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f, 0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f,
0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3, 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3,
0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7,
0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b,
0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f, 0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f,
0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3, 0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3,
0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640, 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640,
0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c, 0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c,
0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8, 0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8,
0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24, 0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24,
0x119b4be9, 0x155a565e, 0x18197087, 0x1cd86d30, 0x119b4be9, 0x155a565e, 0x18197087, 0x1cd86d30,
0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec,
0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088,
0x2497d08d, 0x2056cd3a, 0x2d15ebe3, 0x29d4f654, 0x2497d08d, 0x2056cd3a, 0x2d15ebe3, 0x29d4f654,
0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0, 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0,
0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c, 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c,
0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18, 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18,
0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4,
0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0,
0x9abc8bd5, 0x9e7d9662, 0x933eb0bb, 0x97ffad0c, 0x9abc8bd5, 0x9e7d9662, 0x933eb0bb, 0x97ffad0c,
0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668, 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668,
0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4
}; };
int globalCrc; int globalCrc;
/// <summary> /// <summary>
/// Initialise a default instance of <see cref="StrangeCRC"></see> /// Initialise a default instance of <see cref="StrangeCRC"></see>
/// </summary> /// </summary>
public StrangeCRC() public StrangeCRC()
{ {
Reset(); Reset();
} }
/// <summary> /// <summary>
/// Reset the state of Crc. /// Reset the state of Crc.
/// </summary> /// </summary>
public void Reset() public void Reset()
{ {
globalCrc = -1; globalCrc = -1;
} }
/// <summary> /// <summary>
/// Get the current Crc value. /// Get the current Crc value.
/// </summary> /// </summary>
public long Value { public long Value {
get { get {
return ~globalCrc; return ~globalCrc;
} }
} }
/// <summary> /// <summary>
/// Update the Crc value. /// Update the Crc value.
/// </summary> /// </summary>
/// <param name="value">data update is based on</param> /// <param name="value">data update is based on</param>
public void Update(int value) public void Update(int value)
{ {
int temp = (globalCrc >> 24) ^ value; int temp = (globalCrc >> 24) ^ value;
if (temp < 0) { if (temp < 0) {
temp = 256 + temp; temp = 256 + temp;
} }
globalCrc = unchecked((int)((globalCrc << 8) ^ crc32Table[temp])); globalCrc = unchecked((int)((globalCrc << 8) ^ crc32Table[temp]));
} }
/// <summary> /// <summary>
/// Update Crc based on a block of data /// Update Crc based on a block of data
/// </summary> /// </summary>
public void Update(byte[] buffer) public void Update(byte[] buffer)
{ {
if (buffer == null) { if (buffer == null) {
throw new ArgumentNullException("buffer"); throw new ArgumentNullException("buffer");
} }
Update(buffer, 0, buffer.Length); Update(buffer, 0, buffer.Length);
} }
/// <summary> /// <summary>
/// Update Crc based on a portion of a block of data /// Update Crc based on a portion of a block of data
/// </summary> /// </summary>
/// <param name="buffer">block of data</param> /// <param name="buffer">block of data</param>
/// <param name="offset">index of first byte to use</param> /// <param name="offset">index of first byte to use</param>
/// <param name="count">number of bytes to use</param> /// <param name="count">number of bytes to use</param>
public void Update(byte[] buffer, int offset, int count) public void Update(byte[] buffer, int offset, int count)
{ {
if (buffer == null) { if (buffer == null) {
throw new ArgumentNullException("buffer"); throw new ArgumentNullException("buffer");
} }
if ( offset < 0 ) if ( offset < 0 )
{ {
#if COMPACT_FRAMEWORK_V10 #if COMPACT_FRAMEWORK_V10
throw new ArgumentOutOfRangeException("offset"); throw new ArgumentOutOfRangeException("offset");
#else #else
throw new ArgumentOutOfRangeException("offset", "cannot be less than zero"); throw new ArgumentOutOfRangeException("offset", "cannot be less than zero");
#endif #endif
} }
if ( count < 0 ) if ( count < 0 )
{ {
#if COMPACT_FRAMEWORK_V10 #if COMPACT_FRAMEWORK_V10
throw new ArgumentOutOfRangeException("count"); throw new ArgumentOutOfRangeException("count");
#else #else
throw new ArgumentOutOfRangeException("count", "cannot be less than zero"); throw new ArgumentOutOfRangeException("count", "cannot be less than zero");
#endif #endif
} }
if ( offset + count > buffer.Length ) if ( offset + count > buffer.Length )
{ {
throw new ArgumentOutOfRangeException("count"); throw new ArgumentOutOfRangeException("count");
} }
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {
Update(buffer[offset++]); Update(buffer[offset++]);
} }
} }
} }
} }

View file

@ -1,81 +1,81 @@
namespace LSLEditor namespace LSLEditor
{ {
partial class Browser partial class Browser
{ {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// Clean up any resources being used. /// Clean up any resources being used.
/// </summary> /// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) protected override void Dispose(bool disposing)
{ {
if (disposing && (components != null)) if (disposing && (components != null))
{ {
components.Dispose(); components.Dispose();
} }
base.Dispose(disposing); base.Dispose(disposing);
} }
#region Windows Form Designer generated code #region Windows Form Designer generated code
/// <summary> /// <summary>
/// Required method for Designer support - do not modify /// Required method for Designer support - do not modify
/// the contents of this method with the code editor. /// the contents of this method with the code editor.
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tabControl1 = new System.Windows.Forms.TabControlExtended(this.components); this.tabControl1 = new System.Windows.Forms.TabControlExtended(this.components);
this.contextMenuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// contextMenuStrip1 // contextMenuStrip1
// //
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.closeToolStripMenuItem}); this.closeToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1"; this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(112, 26); this.contextMenuStrip1.Size = new System.Drawing.Size(112, 26);
// //
// closeToolStripMenuItem // closeToolStripMenuItem
// //
this.closeToolStripMenuItem.Name = "closeToolStripMenuItem"; this.closeToolStripMenuItem.Name = "closeToolStripMenuItem";
this.closeToolStripMenuItem.Size = new System.Drawing.Size(111, 22); this.closeToolStripMenuItem.Size = new System.Drawing.Size(111, 22);
this.closeToolStripMenuItem.Text = "Close"; this.closeToolStripMenuItem.Text = "Close";
this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click); this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);
// //
// tabControl1 // tabControl1
// //
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(0, 0); this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Name = "tabControl1"; this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0; this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(592, 366); this.tabControl1.Size = new System.Drawing.Size(592, 366);
this.tabControl1.TabIndex = 1; this.tabControl1.TabIndex = 1;
this.tabControl1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.tabControl1_MouseDown); this.tabControl1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.tabControl1_MouseDown);
// //
// Browser // Browser
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(592, 366); this.ClientSize = new System.Drawing.Size(592, 366);
this.Controls.Add(this.tabControl1); this.Controls.Add(this.tabControl1);
this.Name = "Browser"; this.Name = "Browser";
this.Text = "Browser"; this.Text = "Browser";
this.contextMenuStrip1.ResumeLayout(false); this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
#endregion #endregion
private System.Windows.Forms.TabControlExtended tabControl1; private System.Windows.Forms.TabControlExtended tabControl1;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;
} }
} }

176
trunk/Browser.cs Normal file
View file

@ -0,0 +1,176 @@
// /**
// ********
// *
// * ORIGINAL 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, who in turn License under the GPLv2.
// * In agreement with Alphons van der Heijden's 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 The LSLEditor Group. 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;
using LSLEditor.Docking;
namespace LSLEditor
{
public partial class Browser : DockContent
{
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));
}
}
}
}
}
}

View file

@ -1,123 +1,123 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<root> <root>
<!-- <!--
Microsoft ResX Schema Microsoft ResX Schema
Version 2.0 Version 2.0
The primary goals of this format is to allow a simple XML format The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes various data types are done through the TypeConverter classes
associated with the data types. associated with the data types.
Example: Example:
... ado.net/XML headers & schema ... ... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader> <resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value> <value>[base64 mime encoded serialized .NET Framework object]</value>
</data> </data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment> <comment>This is a comment</comment>
</data> </data>
There are any number of "resheader" rows that contain simple There are any number of "resheader" rows that contain simple
name/value pairs. name/value pairs.
Each data row contains a name, and value. The row also contains a Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture. text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the Classes that don't support this are serialized and stored with the
mimetype set. mimetype set.
The mimetype is used for serialized objects, and tells the The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly: extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below. read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64 mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64 mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64 mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter : using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
--> -->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType> <xsd:complexType>
<xsd:choice maxOccurs="unbounded"> <xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata"> <xsd:element name="metadata">
<xsd:complexType> <xsd:complexType>
<xsd:sequence> <xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" /> <xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" /> <xsd:attribute ref="xml:space" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="assembly"> <xsd:element name="assembly">
<xsd:complexType> <xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" /> <xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" /> <xsd:attribute name="name" type="xsd:string" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="data"> <xsd:element name="data">
<xsd:complexType> <xsd:complexType>
<xsd:sequence> <xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" /> <xsd:attribute ref="xml:space" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="resheader"> <xsd:element name="resheader">
<xsd:complexType> <xsd:complexType>
<xsd:sequence> <xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" /> <xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
</xsd:choice> </xsd:choice>
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
</xsd:schema> </xsd:schema>
<resheader name="resmimetype"> <resheader name="resmimetype">
<value>text/microsoft-resx</value> <value>text/microsoft-resx</value>
</resheader> </resheader>
<resheader name="version"> <resheader name="version">
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>127, 17</value> <value>127, 17</value>
</metadata> </metadata>
</root> </root>

View file

@ -1,437 +1,437 @@
namespace LSLEditor.BugReport namespace LSLEditor.BugReport
{ {
partial class BugReportForm partial class BugReportForm
{ {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// Clean up any resources being used. /// Clean up any resources being used.
/// </summary> /// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) protected override void Dispose(bool disposing)
{ {
if (disposing && (components != null)) if (disposing && (components != null))
{ {
components.Dispose(); components.Dispose();
} }
base.Dispose(disposing); base.Dispose(disposing);
} }
#region Windows Form Designer generated code #region Windows Form Designer generated code
/// <summary> /// <summary>
/// Required method for Designer support - do not modify /// Required method for Designer support - do not modify
/// the contents of this method with the code editor. /// the contents of this method with the code editor.
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.textBox3 = new System.Windows.Forms.TextBox(); this.textBox3 = new System.Windows.Forms.TextBox();
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.button4 = new System.Windows.Forms.Button(); this.button4 = new System.Windows.Forms.Button();
this.label6 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox(); this.textBox1 = new System.Windows.Forms.TextBox();
this.listView1 = new System.Windows.Forms.ListView(); this.listView1 = new System.Windows.Forms.ListView();
this.textBox2 = new System.Windows.Forms.TextBox(); this.textBox2 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.button3 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button();
this.progressBar1 = new System.Windows.Forms.ProgressBar(); this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.button2 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button();
this.tabPage2 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage();
this.textBox5 = new System.Windows.Forms.TextBox(); this.textBox5 = new System.Windows.Forms.TextBox();
this.splitter2 = new System.Windows.Forms.Splitter(); this.splitter2 = new System.Windows.Forms.Splitter();
this.textBox4 = new System.Windows.Forms.TextBox(); this.textBox4 = new System.Windows.Forms.TextBox();
this.splitter1 = new System.Windows.Forms.Splitter(); this.splitter1 = new System.Windows.Forms.Splitter();
this.listView2 = new System.Windows.Forms.ListView(); this.listView2 = new System.Windows.Forms.ListView();
this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.tabPage2.SuspendLayout(); this.tabPage2.SuspendLayout();
this.contextMenuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.textBox3); this.groupBox1.Controls.Add(this.textBox3);
this.groupBox1.Controls.Add(this.panel2); this.groupBox1.Controls.Add(this.panel2);
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox1.Location = new System.Drawing.Point(3, 3); this.groupBox1.Location = new System.Drawing.Point(3, 3);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(8); this.groupBox1.Padding = new System.Windows.Forms.Padding(8);
this.groupBox1.Size = new System.Drawing.Size(712, 330); this.groupBox1.Size = new System.Drawing.Size(712, 330);
this.groupBox1.TabIndex = 0; this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "report"; this.groupBox1.Text = "report";
// //
// textBox3 // textBox3
// //
this.textBox3.AcceptsReturn = true; this.textBox3.AcceptsReturn = true;
this.textBox3.AcceptsTab = true; this.textBox3.AcceptsTab = true;
this.textBox3.Dock = System.Windows.Forms.DockStyle.Fill; this.textBox3.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBox3.Location = new System.Drawing.Point(8, 160); this.textBox3.Location = new System.Drawing.Point(8, 160);
this.textBox3.Multiline = true; this.textBox3.Multiline = true;
this.textBox3.Name = "textBox3"; this.textBox3.Name = "textBox3";
this.textBox3.ScrollBars = System.Windows.Forms.ScrollBars.Both; this.textBox3.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.textBox3.Size = new System.Drawing.Size(696, 162); this.textBox3.Size = new System.Drawing.Size(696, 162);
this.textBox3.TabIndex = 4; this.textBox3.TabIndex = 4;
// //
// panel2 // panel2
// //
this.panel2.Controls.Add(this.button4); this.panel2.Controls.Add(this.button4);
this.panel2.Controls.Add(this.label6); this.panel2.Controls.Add(this.label6);
this.panel2.Controls.Add(this.label5); this.panel2.Controls.Add(this.label5);
this.panel2.Controls.Add(this.label4); this.panel2.Controls.Add(this.label4);
this.panel2.Controls.Add(this.label3); this.panel2.Controls.Add(this.label3);
this.panel2.Controls.Add(this.label1); this.panel2.Controls.Add(this.label1);
this.panel2.Controls.Add(this.textBox1); this.panel2.Controls.Add(this.textBox1);
this.panel2.Controls.Add(this.listView1); this.panel2.Controls.Add(this.listView1);
this.panel2.Controls.Add(this.textBox2); this.panel2.Controls.Add(this.textBox2);
this.panel2.Controls.Add(this.label2); this.panel2.Controls.Add(this.label2);
this.panel2.Dock = System.Windows.Forms.DockStyle.Top; this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(8, 21); this.panel2.Location = new System.Drawing.Point(8, 21);
this.panel2.Name = "panel2"; this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(696, 139); this.panel2.Size = new System.Drawing.Size(696, 139);
this.panel2.TabIndex = 6; this.panel2.TabIndex = 6;
// //
// button4 // button4
// //
this.button4.Location = new System.Drawing.Point(312, 112); this.button4.Location = new System.Drawing.Point(312, 112);
this.button4.Name = "button4"; this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(75, 24); this.button4.Size = new System.Drawing.Size(75, 24);
this.button4.TabIndex = 9; this.button4.TabIndex = 9;
this.button4.Text = "check all"; this.button4.Text = "check all";
this.button4.UseVisualStyleBackColor = true; this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.button4_Click); this.button4.Click += new System.EventHandler(this.button4_Click);
// //
// label6 // label6
// //
this.label6.AutoSize = true; this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(0, 80); this.label6.Location = new System.Drawing.Point(0, 80);
this.label6.Name = "label6"; this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(191, 13); this.label6.Size = new System.Drawing.Size(191, 13);
this.label6.TabIndex = 8; this.label6.TabIndex = 8;
this.label6.Text = "and will not be made public in any way!"; this.label6.Text = "and will not be made public in any way!";
// //
// label5 // label5
// //
this.label5.AutoSize = true; this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(0, 64); this.label5.Location = new System.Drawing.Point(0, 64);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(217, 13); this.label5.Size = new System.Drawing.Size(217, 13);
this.label5.TabIndex = 7; this.label5.TabIndex = 7;
this.label5.Text = "Uploaded files will only be used for bugfixing,"; this.label5.Text = "Uploaded files will only be used for bugfixing,";
// //
// label4 // label4
// //
this.label4.AutoSize = true; this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(208, 8); this.label4.Location = new System.Drawing.Point(208, 8);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(98, 13); this.label4.Size = new System.Drawing.Size(98, 13);
this.label4.TabIndex = 6; this.label4.TabIndex = 6;
this.label4.Text = "Files to be included"; this.label4.Text = "Files to be included";
// //
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(0, 104); this.label3.Location = new System.Drawing.Point(0, 104);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(130, 13); this.label3.Size = new System.Drawing.Size(130, 13);
this.label3.TabIndex = 5; this.label3.TabIndex = 5;
this.label3.Text = "Description of the problem"; this.label3.Text = "Description of the problem";
// //
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(0, 8); this.label1.Location = new System.Drawing.Point(0, 8);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(35, 13); this.label1.Size = new System.Drawing.Size(35, 13);
this.label1.TabIndex = 2; this.label1.TabIndex = 2;
this.label1.Text = "Name"; this.label1.Text = "Name";
// //
// textBox1 // textBox1
// //
this.textBox1.Location = new System.Drawing.Point(40, 8); this.textBox1.Location = new System.Drawing.Point(40, 8);
this.textBox1.Name = "textBox1"; this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(168, 20); this.textBox1.Size = new System.Drawing.Size(168, 20);
this.textBox1.TabIndex = 1; this.textBox1.TabIndex = 1;
// //
// listView1 // listView1
// //
this.listView1.CheckBoxes = true; this.listView1.CheckBoxes = true;
this.listView1.Location = new System.Drawing.Point(312, 8); this.listView1.Location = new System.Drawing.Point(312, 8);
this.listView1.Name = "listView1"; this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(248, 104); this.listView1.Size = new System.Drawing.Size(248, 104);
this.listView1.TabIndex = 3; this.listView1.TabIndex = 3;
this.listView1.UseCompatibleStateImageBehavior = false; this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.View = System.Windows.Forms.View.Details; this.listView1.View = System.Windows.Forms.View.Details;
// //
// textBox2 // textBox2
// //
this.textBox2.Location = new System.Drawing.Point(40, 40); this.textBox2.Location = new System.Drawing.Point(40, 40);
this.textBox2.Name = "textBox2"; this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(168, 20); this.textBox2.Size = new System.Drawing.Size(168, 20);
this.textBox2.TabIndex = 2; this.textBox2.TabIndex = 2;
// //
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(0, 40); this.label2.Location = new System.Drawing.Point(0, 40);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(32, 13); this.label2.Size = new System.Drawing.Size(32, 13);
this.label2.TabIndex = 3; this.label2.TabIndex = 3;
this.label2.Text = "Email"; this.label2.Text = "Email";
// //
// tabControl1 // tabControl1
// //
this.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2); this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(8, 8); this.tabControl1.Location = new System.Drawing.Point(8, 8);
this.tabControl1.Name = "tabControl1"; this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0; this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(726, 402); this.tabControl1.Size = new System.Drawing.Size(726, 402);
this.tabControl1.TabIndex = 0; this.tabControl1.TabIndex = 0;
// //
// tabPage1 // tabPage1
// //
this.tabPage1.Controls.Add(this.groupBox1); this.tabPage1.Controls.Add(this.groupBox1);
this.tabPage1.Controls.Add(this.panel1); this.tabPage1.Controls.Add(this.panel1);
this.tabPage1.Location = new System.Drawing.Point(4, 22); this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1"; this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3); this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(718, 376); this.tabPage1.Size = new System.Drawing.Size(718, 376);
this.tabPage1.TabIndex = 0; this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "New bug report"; this.tabPage1.Text = "New bug report";
this.tabPage1.UseVisualStyleBackColor = true; this.tabPage1.UseVisualStyleBackColor = true;
// //
// panel1 // panel1
// //
this.panel1.Controls.Add(this.button3); this.panel1.Controls.Add(this.button3);
this.panel1.Controls.Add(this.progressBar1); this.panel1.Controls.Add(this.progressBar1);
this.panel1.Controls.Add(this.button2); this.panel1.Controls.Add(this.button2);
this.panel1.Controls.Add(this.button1); this.panel1.Controls.Add(this.button1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(3, 333); this.panel1.Location = new System.Drawing.Point(3, 333);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(712, 40); this.panel1.Size = new System.Drawing.Size(712, 40);
this.panel1.TabIndex = 0; this.panel1.TabIndex = 0;
// //
// button3 // button3
// //
this.button3.Location = new System.Drawing.Point(504, 8); this.button3.Location = new System.Drawing.Point(504, 8);
this.button3.Name = "button3"; this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(75, 23); this.button3.Size = new System.Drawing.Size(75, 23);
this.button3.TabIndex = 7; this.button3.TabIndex = 7;
this.button3.Text = "Close"; this.button3.Text = "Close";
this.button3.UseVisualStyleBackColor = true; this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click); this.button3.Click += new System.EventHandler(this.button3_Click);
// //
// progressBar1 // progressBar1
// //
this.progressBar1.Location = new System.Drawing.Point(8, 8); this.progressBar1.Location = new System.Drawing.Point(8, 8);
this.progressBar1.Name = "progressBar1"; this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(280, 23); this.progressBar1.Size = new System.Drawing.Size(280, 23);
this.progressBar1.TabIndex = 0; this.progressBar1.TabIndex = 0;
// //
// button2 // button2
// //
this.button2.Enabled = false; this.button2.Enabled = false;
this.button2.Location = new System.Drawing.Point(416, 8); this.button2.Location = new System.Drawing.Point(416, 8);
this.button2.Name = "button2"; this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23); this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 6; this.button2.TabIndex = 6;
this.button2.Text = "Cancel"; this.button2.Text = "Cancel";
this.button2.UseVisualStyleBackColor = true; this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click); this.button2.Click += new System.EventHandler(this.button2_Click);
// //
// button1 // button1
// //
this.button1.Location = new System.Drawing.Point(296, 8); this.button1.Location = new System.Drawing.Point(296, 8);
this.button1.Name = "button1"; this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(112, 23); this.button1.Size = new System.Drawing.Size(112, 23);
this.button1.TabIndex = 5; this.button1.TabIndex = 5;
this.button1.Text = "Send bug report"; this.button1.Text = "Send bug report";
this.button1.UseVisualStyleBackColor = true; this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click); this.button1.Click += new System.EventHandler(this.button1_Click);
// //
// tabPage2 // tabPage2
// //
this.tabPage2.Controls.Add(this.textBox5); this.tabPage2.Controls.Add(this.textBox5);
this.tabPage2.Controls.Add(this.splitter2); this.tabPage2.Controls.Add(this.splitter2);
this.tabPage2.Controls.Add(this.textBox4); this.tabPage2.Controls.Add(this.textBox4);
this.tabPage2.Controls.Add(this.splitter1); this.tabPage2.Controls.Add(this.splitter1);
this.tabPage2.Controls.Add(this.listView2); this.tabPage2.Controls.Add(this.listView2);
this.tabPage2.Location = new System.Drawing.Point(4, 22); this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2"; this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3); this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(718, 376); this.tabPage2.Size = new System.Drawing.Size(718, 376);
this.tabPage2.TabIndex = 1; this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Bug tracker"; this.tabPage2.Text = "Bug tracker";
this.tabPage2.UseVisualStyleBackColor = true; this.tabPage2.UseVisualStyleBackColor = true;
// //
// textBox5 // textBox5
// //
this.textBox5.AcceptsReturn = true; this.textBox5.AcceptsReturn = true;
this.textBox5.AcceptsTab = true; this.textBox5.AcceptsTab = true;
this.textBox5.Dock = System.Windows.Forms.DockStyle.Fill; this.textBox5.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBox5.Location = new System.Drawing.Point(267, 131); this.textBox5.Location = new System.Drawing.Point(267, 131);
this.textBox5.Multiline = true; this.textBox5.Multiline = true;
this.textBox5.Name = "textBox5"; this.textBox5.Name = "textBox5";
this.textBox5.ReadOnly = true; this.textBox5.ReadOnly = true;
this.textBox5.ScrollBars = System.Windows.Forms.ScrollBars.Both; this.textBox5.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.textBox5.Size = new System.Drawing.Size(448, 242); this.textBox5.Size = new System.Drawing.Size(448, 242);
this.textBox5.TabIndex = 10; this.textBox5.TabIndex = 10;
// //
// splitter2 // splitter2
// //
this.splitter2.Dock = System.Windows.Forms.DockStyle.Top; this.splitter2.Dock = System.Windows.Forms.DockStyle.Top;
this.splitter2.Location = new System.Drawing.Point(267, 128); this.splitter2.Location = new System.Drawing.Point(267, 128);
this.splitter2.Name = "splitter2"; this.splitter2.Name = "splitter2";
this.splitter2.Size = new System.Drawing.Size(448, 3); this.splitter2.Size = new System.Drawing.Size(448, 3);
this.splitter2.TabIndex = 3; this.splitter2.TabIndex = 3;
this.splitter2.TabStop = false; this.splitter2.TabStop = false;
// //
// textBox4 // textBox4
// //
this.textBox4.AcceptsReturn = true; this.textBox4.AcceptsReturn = true;
this.textBox4.AcceptsTab = true; this.textBox4.AcceptsTab = true;
this.textBox4.Dock = System.Windows.Forms.DockStyle.Top; this.textBox4.Dock = System.Windows.Forms.DockStyle.Top;
this.textBox4.Location = new System.Drawing.Point(267, 3); this.textBox4.Location = new System.Drawing.Point(267, 3);
this.textBox4.Multiline = true; this.textBox4.Multiline = true;
this.textBox4.Name = "textBox4"; this.textBox4.Name = "textBox4";
this.textBox4.ReadOnly = true; this.textBox4.ReadOnly = true;
this.textBox4.ScrollBars = System.Windows.Forms.ScrollBars.Both; this.textBox4.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.textBox4.Size = new System.Drawing.Size(448, 125); this.textBox4.Size = new System.Drawing.Size(448, 125);
this.textBox4.TabIndex = 9; this.textBox4.TabIndex = 9;
// //
// splitter1 // splitter1
// //
this.splitter1.Location = new System.Drawing.Point(264, 3); this.splitter1.Location = new System.Drawing.Point(264, 3);
this.splitter1.Name = "splitter1"; this.splitter1.Name = "splitter1";
this.splitter1.Size = new System.Drawing.Size(3, 370); this.splitter1.Size = new System.Drawing.Size(3, 370);
this.splitter1.TabIndex = 1; this.splitter1.TabIndex = 1;
this.splitter1.TabStop = false; this.splitter1.TabStop = false;
// //
// listView2 // listView2
// //
this.listView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.listView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader1, this.columnHeader1,
this.columnHeader2}); this.columnHeader2});
this.listView2.ContextMenuStrip = this.contextMenuStrip1; this.listView2.ContextMenuStrip = this.contextMenuStrip1;
this.listView2.Dock = System.Windows.Forms.DockStyle.Left; this.listView2.Dock = System.Windows.Forms.DockStyle.Left;
this.listView2.FullRowSelect = true; this.listView2.FullRowSelect = true;
this.listView2.HideSelection = false; this.listView2.HideSelection = false;
this.listView2.Location = new System.Drawing.Point(3, 3); this.listView2.Location = new System.Drawing.Point(3, 3);
this.listView2.Name = "listView2"; this.listView2.Name = "listView2";
this.listView2.Size = new System.Drawing.Size(261, 370); this.listView2.Size = new System.Drawing.Size(261, 370);
this.listView2.TabIndex = 8; this.listView2.TabIndex = 8;
this.listView2.UseCompatibleStateImageBehavior = false; this.listView2.UseCompatibleStateImageBehavior = false;
this.listView2.View = System.Windows.Forms.View.Details; this.listView2.View = System.Windows.Forms.View.Details;
this.listView2.SelectedIndexChanged += new System.EventHandler(this.listView2_SelectedIndexChanged); this.listView2.SelectedIndexChanged += new System.EventHandler(this.listView2_SelectedIndexChanged);
// //
// columnHeader1 // columnHeader1
// //
this.columnHeader1.Text = "Number"; this.columnHeader1.Text = "Number";
this.columnHeader1.Width = 85; this.columnHeader1.Width = 85;
// //
// columnHeader2 // columnHeader2
// //
this.columnHeader2.Text = "Date/Time"; this.columnHeader2.Text = "Date/Time";
this.columnHeader2.Width = 145; this.columnHeader2.Width = 145;
// //
// contextMenuStrip1 // contextMenuStrip1
// //
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.deleteToolStripMenuItem}); this.deleteToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1"; this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(117, 26); this.contextMenuStrip1.Size = new System.Drawing.Size(117, 26);
// //
// deleteToolStripMenuItem // deleteToolStripMenuItem
// //
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem"; this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(116, 22); this.deleteToolStripMenuItem.Size = new System.Drawing.Size(116, 22);
this.deleteToolStripMenuItem.Text = "Delete"; this.deleteToolStripMenuItem.Text = "Delete";
this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click); this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click);
// //
// timer1 // timer1
// //
this.timer1.Tick += new System.EventHandler(this.timer1_Tick); this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
// //
// BugReportForm // BugReportForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(742, 418); this.ClientSize = new System.Drawing.Size(742, 418);
this.Controls.Add(this.tabControl1); this.Controls.Add(this.tabControl1);
this.Name = "BugReportForm"; this.Name = "BugReportForm";
this.Padding = new System.Windows.Forms.Padding(8); this.Padding = new System.Windows.Forms.Padding(8);
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "LSLEditor bug report"; this.Text = "LSLEditor bug report";
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout(); this.groupBox1.PerformLayout();
this.panel2.ResumeLayout(false); this.panel2.ResumeLayout(false);
this.panel2.PerformLayout(); this.panel2.PerformLayout();
this.tabControl1.ResumeLayout(false); this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false); this.tabPage1.ResumeLayout(false);
this.panel1.ResumeLayout(false); this.panel1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false); this.tabPage2.ResumeLayout(false);
this.tabPage2.PerformLayout(); this.tabPage2.PerformLayout();
this.contextMenuStrip1.ResumeLayout(false); this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
#endregion #endregion
private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.ListView listView1; private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox3; private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label6;
private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.ProgressBar progressBar1; private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.Button button2; private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button1;
private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TextBox textBox5; private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.Splitter splitter2; private System.Windows.Forms.Splitter splitter2;
private System.Windows.Forms.TextBox textBox4; private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Splitter splitter1; private System.Windows.Forms.Splitter splitter1;
private System.Windows.Forms.ListView listView2; private System.Windows.Forms.ListView listView2;
private System.Windows.Forms.ColumnHeader columnHeader1; private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.Timer timer1; private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem;
private System.Windows.Forms.Button button3; private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4; private System.Windows.Forms.Button button4;
private System.Windows.Forms.ColumnHeader columnHeader2; private System.Windows.Forms.ColumnHeader columnHeader2;
} }
} }

View file

@ -1,293 +1,298 @@
// <copyright file="gpl-2.0.txt"> // /**
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden. // ********
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands & // *
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's wishes. // * ORIGINAL 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
// The community would like to thank Alphons for all of his hard work, blood sweat and tears. Without his work // * To Brandon 'Dimentox Travanti' Husbands & Malcolm J. Kudra, who in turn License under the GPLv2.
// the community would be stuck with crappy editors. // * In agreement with Alphons van der Heijden's wishes.
// // *
// The source code in this file ("Source Code") is provided by The LSLEditor Group to you under the terms of the GNU // * The community would like to thank Alphons for all of his hard work, blood sweat and tears.
// General Public License, version 2.0 ("GPL"), unless you have obtained a separate licensing agreement ("Other // * Without his work the community would be stuck with crappy editors.
// License"), formally executed by you and The LSLEditor Group. // *
// Terms of the GPL can be found in the gplv2.txt document. // * 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
// GPLv2 Header // * ("GPL"), unless you have obtained a separate licensing agreement
// ************ // * ("Other License"), formally executed by you and The LSLEditor Group. Terms of
// LSLEditor, a External editor for the LSL Language. // * the GPL can be found in the gplv2.txt document.
// 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 // * GPLv2 Header
// License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any // ********
// later version. // * LSLEditor, a External editor for the LSL Language.
// // * Copyright (C) 2010 The LSLEditor Group.
// 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 // * This program is free software; you can redistribute it and/or
// details. // * modify it under the terms of the GNU General Public License
// // * as published by the Free Software Foundation; either version 2
// You should have received a copy of the GNU General Public License along with this program; if not, write to the Free // * of the License, or (at your option) any later version.
// Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // *
// ******************************************************************************************************************** // * This program is distributed in the hope that it will be useful,
// The above copyright notice and this permission notice shall be included in copies or substantial portions of the // * but WITHOUT ANY WARRANTY; without even the implied warranty of
// Software. // * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// ******************************************************************************************************************** // * GNU General Public License for more details.
// </copyright> // *
// // * You should have received a copy of the GNU General Public License
// <summary> // * along with this program; if not, write to the Free Software
// BugReportForm.cs // * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// // ********
// </summary> // *
// * The above copyright notice and this permission notice shall be included in all
using System; // * copies or substantial portions of the Software.
using System.Collections.Generic; // *
using System.ComponentModel; // ********
using System.Drawing; // */
using System.Text; using System;
using System.Windows.Forms; using System.Collections.Generic;
using System.Reflection; using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace LSLEditor.BugReport using System.Reflection;
{
public partial class BugReportForm : Form using LSLEditor.org.lsleditor.www;
{
private bool blnComplete;
private UploadBugReport ubr; namespace LSLEditor.BugReport
{
private LSLEditorForm parent; public partial class BugReportForm : Form
{
public BugReportForm(LSLEditorForm parent) private bool blnComplete;
{ private UploadBugReport ubr;
InitializeComponent();
this.parent = parent; private LSLEditorForm parent;
this.Icon = parent.Icon;
this.textBox1.Text = Properties.Settings.Default.AvatarName; public BugReportForm(LSLEditorForm parent)
this.textBox2.Text = Properties.Settings.Default.EmailAddress; {
this.listView1.Columns.Add("ScriptName",this.listView1.Width-30); InitializeComponent();
foreach (Form form in parent.Children) this.parent = parent;
{ this.Icon = parent.Icon;
EditForm editForm = form as EditForm; this.textBox1.Text = Properties.Settings.Default.AvatarName;
if (editForm == null || editForm.IsDisposed) this.textBox2.Text = Properties.Settings.Default.EmailAddress;
continue; this.listView1.Columns.Add("ScriptName",this.listView1.Width-30);
ListViewItem lvi = new ListViewItem(editForm.ScriptName); foreach (Form form in parent.Children)
lvi.Checked = false; {
this.listView1.Items.Add(lvi); EditForm editForm = form as EditForm;
} if (editForm == null || editForm.IsDisposed)
ShowBugReportsList(); continue;
} ListViewItem lvi = new ListViewItem(editForm.ScriptName);
lvi.Checked = false;
private void ShowBugReportsList() this.listView1.Items.Add(lvi);
{ }
if (Properties.Settings.Default.Bugreports == null) ShowBugReportsList();
return; }
this.listView2.Items.Clear();
foreach (string Handle in Properties.Settings.Default.Bugreports) private void ShowBugReportsList()
{ {
long result; if (Properties.Settings.Default.Bugreports == null)
if (!long.TryParse(Handle, out result)) return;
continue; this.listView2.Items.Clear();
result *= (long)1e7; foreach (string Handle in Properties.Settings.Default.Bugreports)
DateTime dateTime = new DateTime(result); {
ListViewItem lvi = new ListViewItem(Handle); long result;
lvi.SubItems.Add(dateTime.ToString()); if (!long.TryParse(Handle, out result))
lvi.Tag = Handle; continue;
this.listView2.Items.Add(lvi); result *= (long)1e7;
} DateTime dateTime = new DateTime(result);
} ListViewItem lvi = new ListViewItem(Handle);
lvi.SubItems.Add(dateTime.ToString());
//close lvi.Tag = Handle;
private void button3_Click(object sender, EventArgs e) this.listView2.Items.Add(lvi);
{ }
this.timer1.Stop(); }
if (ubr != null)
ubr.Stop(); //close
this.Close(); private void button3_Click(object sender, EventArgs e)
} {
this.timer1.Stop();
// cancel if (ubr != null)
private void button2_Click(object sender, EventArgs e) ubr.Stop();
{ this.Close();
this.button2.Enabled = false; }
this.timer1.Stop();
this.progressBar1.Value = 0; // cancel
if (ubr != null) private void button2_Click(object sender, EventArgs e)
ubr.Stop(); {
this.button1.Enabled = true; this.button2.Enabled = false;
} this.timer1.Stop();
this.progressBar1.Value = 0;
private void button1_Click(object sender, EventArgs e) if (ubr != null)
{ ubr.Stop();
string strMessage = this.textBox3.Text.Trim(); this.button1.Enabled = true;
if (strMessage == "") }
{
MessageBox.Show("The bug report is empty(?!), it is not send!", "Bug report", MessageBoxButtons.OK, MessageBoxIcon.Information); private void button1_Click(object sender, EventArgs e)
return; {
} string strMessage = this.textBox3.Text.Trim();
ubr = new UploadBugReport(); if (strMessage == "")
this.button1.Enabled = false; {
this.button2.Enabled = true; MessageBox.Show("The bug report is empty(?!), it is not send!", "Bug report", MessageBoxButtons.OK, MessageBoxIcon.Information);
this.blnComplete = false; return;
this.timer1.Start(); }
ubr.OnComplete += new UploadBugReport.UploadCompleteHandler(ubr_OnComplete); ubr = new UploadBugReport();
List<UploadBugReport.FileToUpload> list = new List<UploadBugReport.FileToUpload>(); this.button1.Enabled = false;
StringBuilder sb = new StringBuilder(); this.button2.Enabled = true;
this.blnComplete = false;
Properties.Settings.Default.AvatarName = this.textBox1.Text; this.timer1.Start();
Properties.Settings.Default.EmailAddress = this.textBox2.Text; ubr.OnComplete += new UploadBugReport.UploadCompleteHandler(ubr_OnComplete);
List<UploadBugReport.FileToUpload> list = new List<UploadBugReport.FileToUpload>();
sb.AppendFormat("Version: {0} {1}\r\n", StringBuilder sb = new StringBuilder();
this.parent.Text,
Assembly.GetExecutingAssembly().GetName().Version.ToString()); Properties.Settings.Default.AvatarName = this.textBox1.Text;
sb.AppendFormat("Name: {0}\r\n", this.textBox1.Text); Properties.Settings.Default.EmailAddress = this.textBox2.Text;
sb.AppendFormat("Email: {0}\r\n\r\n", this.textBox2.Text);
sb.Append(this.textBox3.Text); sb.AppendFormat("Version: {0} {1}\r\n",
list.Add(new UploadBugReport.FileToUpload("bugreport.txt", sb.ToString())); this.parent.Text,
foreach (ListViewItem lvi in this.listView1.Items) Assembly.GetExecutingAssembly().GetName().Version.ToString());
{ sb.AppendFormat("Name: {0}\r\n", this.textBox1.Text);
if (!lvi.Checked) sb.AppendFormat("Email: {0}\r\n\r\n", this.textBox2.Text);
continue; sb.Append(this.textBox3.Text);
string strScriptName = lvi.Text; list.Add(new UploadBugReport.FileToUpload("bugreport.txt", sb.ToString()));
string strBody = null; foreach (ListViewItem lvi in this.listView1.Items)
foreach (Form form in parent.Children) {
{ if (!lvi.Checked)
EditForm editForm = form as EditForm; continue;
if (editForm == null || editForm.IsDisposed) string strScriptName = lvi.Text;
continue; string strBody = null;
if (editForm.ScriptName == strScriptName) foreach (Form form in parent.Children)
strBody = editForm.SourceCode; {
} EditForm editForm = form as EditForm;
if(strBody != null) if (editForm == null || editForm.IsDisposed)
list.Add(new UploadBugReport.FileToUpload(strScriptName, strBody)); continue;
} if (editForm.ScriptName == strScriptName)
ubr.UploadAsync(list, this.progressBar1); strBody = editForm.SourceCode;
} }
if(strBody != null)
void ubr_OnComplete(object sender, UploadBugReport.UploadCompleteEventArgs e) list.Add(new UploadBugReport.FileToUpload(strScriptName, strBody));
{ }
if(e.TotalBytes == -1) ubr.UploadAsync(list, this.progressBar1);
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); void ubr_OnComplete(object sender, UploadBugReport.UploadCompleteEventArgs e)
this.blnComplete = true; {
} if(e.TotalBytes == -1)
MessageBox.Show("There is something wrong. Your bug report has not been sent!!", "Oops...", MessageBoxButtons.OK, MessageBoxIcon.Error);
private void timer1_Tick(object sender, EventArgs e) else
{ MessageBox.Show("Your bug report has been sent (" + e.TotalBytes + " bytes)", "Ready", MessageBoxButtons.OK, MessageBoxIcon.Information);
if (this.blnComplete) this.blnComplete = true;
{ }
this.timer1.Stop();
private void timer1_Tick(object sender, EventArgs e)
this.button1.Enabled = true; {
this.button2.Enabled = false; if (this.blnComplete)
{
this.progressBar1.Value = 0; this.timer1.Stop();
this.textBox3.Clear();
ShowBugReportsList(); this.button1.Enabled = true;
this.tabControl1.SelectedIndex = 1; this.button2.Enabled = false;
}
this.progressBar1.Value = 0;
if (ubr != null) this.textBox3.Clear();
{ ShowBugReportsList();
if (!ubr.blnRunning) this.tabControl1.SelectedIndex = 1;
{ }
this.button1.Enabled = true;
this.timer1.Stop(); 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(); private void listView2_SelectedIndexChanged(object sender, EventArgs e)
{
Service1 service1 = new Service1(); if (this.listView2.SelectedItems.Count == 0)
service1.GetStatusCompleted += new GetStatusCompletedEventHandler(service1_GetStatusCompleted); return;
service1.GetStatusAsync(Handle, Handle);*/ ListViewItem lvi = this.listView2.SelectedItems[0];
} string Handle = lvi.Tag.ToString();
/*
void service1_GetStatusCompleted(object sender, GetStatusCompletedEventArgs e) Service1 service1 = new Service1();
{ service1.GetStatusCompleted += new GetStatusCompletedEventHandler(service1_GetStatusCompleted);
/*this.textBox5.Clear(); service1.GetStatusAsync(Handle, Handle);
string Handle = e.UserState.ToString(); }
if (e.Error != null)
{ void service1_GetStatusCompleted(object sender, GetStatusCompletedEventArgs e)
this.textBox4.Text = "Bug report [" + Handle + "] not available (at this time)"; {
return; this.textBox5.Clear();
} string Handle = e.UserState.ToString();
if (e.Error != null)
string strResult = e.Result; {
if (strResult == null) this.textBox4.Text = "Bug report [" + Handle + "] not available (at this time)";
{ return;
this.textBox5.Text = "Bug report [" + Handle + "] does not exist (anymore)"; }
return;
} string strResult = e.Result;
if (strResult == null)
this.textBox5.Text = strResult.Replace("\n", "\r\n"); {
this.textBox5.Text = "Bug report [" + Handle + "] does not exist (anymore)";
Service1 service1 = new Service1(); return;
service1.GetBugReportCompleted += new GetBugReportCompletedEventHandler(service1_GetBugReportCompleted); }
service1.GetBugReportAsync(Handle, Handle);
} this.textBox5.Text = strResult.Replace("\n", "\r\n");
void service1_GetBugReportCompleted(object sender, GetBugReportCompletedEventArgs e) Service1 service1 = new Service1();
{ service1.GetBugReportCompleted += new GetBugReportCompletedEventHandler(service1_GetBugReportCompleted);
this.textBox4.Clear(); service1.GetBugReportAsync(Handle, Handle);
string Handle = e.UserState.ToString(); }
if (e.Error != null) void service1_GetBugReportCompleted(object sender, GetBugReportCompletedEventArgs e)
{ {
this.textBox4.Text = "Bug report [" + Handle + "] not available (at this time)"; this.textBox4.Clear();
return; string Handle = e.UserState.ToString();
}
if (e.Error != null)
string strResult = e.Result; {
if (strResult == null) this.textBox4.Text = "Bug report [" + Handle + "] not available (at this time)";
{ return;
this.textBox4.Text = "Bug report [" + Handle + "] does not extist (anymore)"; }
return;
} string strResult = e.Result;
if (strResult == null)
this.textBox4.Text = strResult.Replace("\n", "\r\n"); {
}*/ this.textBox4.Text = "Bug report [" + Handle + "] does not extist (anymore)";
return;
private void deleteToolStripMenuItem_Click(object sender, EventArgs e) }
{
if (this.listView2.SelectedItems.Count == 0) this.textBox4.Text = strResult.Replace("\n", "\r\n");
return; }
if (MessageBox.Show("Delete " + this.listView2.SelectedItems.Count + " bugreports?", "Delete Bugreports", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
{ {
for(int intI=0; intI<this.listView2.SelectedItems.Count;intI++) if (this.listView2.SelectedItems.Count == 0)
{ return;
ListViewItem lvi = this.listView2.SelectedItems[intI];
string Handle = lvi.Tag.ToString(); if (MessageBox.Show("Delete " + this.listView2.SelectedItems.Count + " bugreports?", "Delete Bugreports", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
Properties.Settings.Default.Bugreports.Remove(Handle); {
} for(int intI=0; intI<this.listView2.SelectedItems.Count;intI++)
this.textBox4.Clear(); {
this.textBox5.Clear(); ListViewItem lvi = this.listView2.SelectedItems[intI];
} string Handle = lvi.Tag.ToString();
ShowBugReportsList(); Properties.Settings.Default.Bugreports.Remove(Handle);
} }
this.textBox4.Clear();
private void button4_Click(object sender, EventArgs e) this.textBox5.Clear();
{ }
if (this.button4.Text.Contains("uncheck")) ShowBugReportsList();
{ }
foreach (ListViewItem lvi in this.listView1.Items)
lvi.Checked = false; private void button4_Click(object sender, EventArgs e)
this.button4.Text = "check all"; {
} if (this.button4.Text.Contains("uncheck"))
else {
{ foreach (ListViewItem lvi in this.listView1.Items)
foreach (ListViewItem lvi in this.listView1.Items) lvi.Checked = false;
lvi.Checked = true; this.button4.Text = "check all";
this.button4.Text = "uncheck all"; }
} else
} {
foreach (ListViewItem lvi in this.listView1.Items)
} lvi.Checked = true;
this.button4.Text = "uncheck all";
}
}
}
} }

View file

@ -1,129 +1,129 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<root> <root>
<!-- <!--
Microsoft ResX Schema Microsoft ResX Schema
Version 2.0 Version 2.0
The primary goals of this format is to allow a simple XML format The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes various data types are done through the TypeConverter classes
associated with the data types. associated with the data types.
Example: Example:
... ado.net/XML headers & schema ... ... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader> <resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value> <value>[base64 mime encoded serialized .NET Framework object]</value>
</data> </data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment> <comment>This is a comment</comment>
</data> </data>
There are any number of "resheader" rows that contain simple There are any number of "resheader" rows that contain simple
name/value pairs. name/value pairs.
Each data row contains a name, and value. The row also contains a Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture. text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the Classes that don't support this are serialized and stored with the
mimetype set. mimetype set.
The mimetype is used for serialized objects, and tells the The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly: extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below. read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64 mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64 mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64 mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter : using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
--> -->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType> <xsd:complexType>
<xsd:choice maxOccurs="unbounded"> <xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata"> <xsd:element name="metadata">
<xsd:complexType> <xsd:complexType>
<xsd:sequence> <xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" /> <xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" /> <xsd:attribute ref="xml:space" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="assembly"> <xsd:element name="assembly">
<xsd:complexType> <xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" /> <xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" /> <xsd:attribute name="name" type="xsd:string" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="data"> <xsd:element name="data">
<xsd:complexType> <xsd:complexType>
<xsd:sequence> <xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" /> <xsd:attribute ref="xml:space" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="resheader"> <xsd:element name="resheader">
<xsd:complexType> <xsd:complexType>
<xsd:sequence> <xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" /> <xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
</xsd:choice> </xsd:choice>
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
</xsd:schema> </xsd:schema>
<resheader name="resmimetype"> <resheader name="resmimetype">
<value>text/microsoft-resx</value> <value>text/microsoft-resx</value>
</resheader> </resheader>
<resheader name="version"> <resheader name="version">
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>100, 17</value> <value>100, 17</value>
</metadata> </metadata>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>42</value> <value>42</value>
</metadata> </metadata>
</root> </root>

View file

@ -1,219 +1,222 @@
// <copyright file="gpl-2.0.txt"> // /**
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden. // ********
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands & // *
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's wishes. // * ORIGINAL 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
// The community would like to thank Alphons for all of his hard work, blood sweat and tears. Without his work // * To Brandon 'Dimentox Travanti' Husbands & Malcolm J. Kudra, who in turn License under the GPLv2.
// the community would be stuck with crappy editors. // * In agreement with Alphons van der Heijden's wishes.
// // *
// The source code in this file ("Source Code") is provided by The LSLEditor Group to you under the terms of the GNU // * The community would like to thank Alphons for all of his hard work, blood sweat and tears.
// General Public License, version 2.0 ("GPL"), unless you have obtained a separate licensing agreement ("Other // * Without his work the community would be stuck with crappy editors.
// License"), formally executed by you and The LSLEditor Group. // *
// Terms of the GPL can be found in the gplv2.txt document. // * 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
// GPLv2 Header // * ("GPL"), unless you have obtained a separate licensing agreement
// ************ // * ("Other License"), formally executed by you and The LSLEditor Group. Terms of
// LSLEditor, a External editor for the LSL Language. // * the GPL can be found in the gplv2.txt document.
// 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 // * GPLv2 Header
// License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any // ********
// later version. // * LSLEditor, a External editor for the LSL Language.
// // * Copyright (C) 2010 The LSLEditor Group.
// 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 // * This program is free software; you can redistribute it and/or
// details. // * modify it under the terms of the GNU General Public License
// // * as published by the Free Software Foundation; either version 2
// You should have received a copy of the GNU General Public License along with this program; if not, write to the Free // * of the License, or (at your option) any later version.
// Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // *
// ******************************************************************************************************************** // * This program is distributed in the hope that it will be useful,
// The above copyright notice and this permission notice shall be included in copies or substantial portions of the // * but WITHOUT ANY WARRANTY; without even the implied warranty of
// Software. // * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// ******************************************************************************************************************** // * GNU General Public License for more details.
// </copyright> // *
// // * You should have received a copy of the GNU General Public License
// <summary> // * along with this program; if not, write to the Free Software
// // * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// // ********
// </summary> // *
// * The above copyright notice and this permission notice shall be included in all
using System; // * copies or substantial portions of the Software.
using System.IO; // *
using System.Text; // ********
using System.Drawing; // */
using System.Text.RegularExpressions; using System;
using System.Threading; using System.IO;
using System.Collections; using System.Text;
using System.Collections.Specialized; using System.Drawing;
using System.Collections.Generic; using System.Text.RegularExpressions;
using System.Windows.Forms; using System.Threading;
using System.Collections;
namespace LSLEditor.BugReport using System.Collections.Specialized;
{ using System.Collections.Generic;
class UploadBugReport using System.Windows.Forms;
{
public struct FileToUpload namespace LSLEditor.BugReport
{ {
public string FileName; class UploadBugReport
public string Body; {
public string Path; public struct FileToUpload
public FileToUpload(string FileName, string Body) {
{ public string FileName;
this.FileName = FileName; public string Body;
this.Body = Body; public string Path;
this.Path = null; public FileToUpload(string FileName, string Body)
} {
} this.FileName = FileName;
this.Body = Body;
public class UploadCompleteEventArgs : EventArgs this.Path = null;
{ }
public int TotalBytes; }
public UploadCompleteEventArgs(int intTotal)
{ public class UploadCompleteEventArgs : EventArgs
this.TotalBytes = intTotal; {
} public int TotalBytes;
} public UploadCompleteEventArgs(int intTotal)
{
public bool blnRunning; this.TotalBytes = intTotal;
}
public delegate void UploadCompleteHandler(object sender, UploadCompleteEventArgs e); }
public event UploadCompleteHandler OnComplete;
public bool blnRunning;
private Thread thread;
private ProgressBar progressbar; public delegate void UploadCompleteHandler(object sender, UploadCompleteEventArgs e);
private List<FileToUpload> list; public event UploadCompleteHandler OnComplete;
public void UploadAsync(List<FileToUpload> list, ProgressBar progressbar) private Thread thread;
{ private ProgressBar progressbar;
this.list = list; private List<FileToUpload> list;
this.progressbar = progressbar;
public void UploadAsync(List<FileToUpload> list, ProgressBar progressbar)
this.blnRunning = true; {
this.list = list;
thread = new Thread(new ThreadStart(Worker)); this.progressbar = progressbar;
thread.IsBackground = true;
thread.Name = "Worker"; this.blnRunning = true;
thread.Start();
} thread = new Thread(new ThreadStart(Worker));
thread.IsBackground = true;
public void Stop() thread.Name = "Worker";
{ thread.Start();
this.blnRunning = false; }
if (thread != null)
{ public void Stop()
thread.Join(1000); {
thread = null; this.blnRunning = false;
} if (thread != null)
} {
thread.Join(1000);
private void Worker() thread = null;
{ }
int intTotal = 0; }
try
{ private void Worker()
//org.lsleditor.www.Service1 webservice = new org.lsleditor.www.Service1(); {
/* int intTotal = 0;
string Handle = webservice.Open(); try
if (Handle == null) {
{ org.lsleditor.www.Service1 webservice = new org.lsleditor.www.Service1();
MessageBox.Show("Can't get an upload handle", "Oops...");
this.blnRunning = false; string Handle = webservice.Open();
return; if (Handle == null)
} {
MessageBox.Show("Can't get an upload handle", "Oops...");
if (Properties.Settings.Default.Bugreports == null) this.blnRunning = false;
Properties.Settings.Default.Bugreports = new StringCollection(); return;
Properties.Settings.Default.Bugreports.Add(Handle); }
// Properties.Settings.Default.Save(); if (Properties.Settings.Default.Bugreports == null)
Properties.Settings.Default.Bugreports = new StringCollection();
int intNumber = 0; Properties.Settings.Default.Bugreports.Add(Handle);
foreach (FileToUpload file in this.list)
{ // Properties.Settings.Default.Save();
string strFileName = string.Format("{0}-{1}", intNumber, file.FileName);
if (file.Path == null) int intNumber = 0;
{ foreach (FileToUpload file in this.list)
intTotal += Upload(Handle, strFileName, Encoding.ASCII.GetBytes(file.Body)); {
} string strFileName = string.Format("{0}-{1}", intNumber, file.FileName);
else if (file.Path == null)
{ {
intTotal += Upload(Handle, strFileName, file.Path); intTotal += Upload(Handle, strFileName, Encoding.ASCII.GetBytes(file.Body));
} }
intNumber++; else
}*/ {
} intTotal += Upload(Handle, strFileName, file.Path);
catch }
{ intNumber++;
intTotal = -1; }
} }
if (this.blnRunning) catch
if (OnComplete != null) {
OnComplete(this, new UploadCompleteEventArgs(intTotal)); intTotal = -1;
this.blnRunning = false; }
} if (this.blnRunning)
if (OnComplete != null)
private delegate void SetValueDelegate(int intValue); OnComplete(this, new UploadCompleteEventArgs(intTotal));
this.blnRunning = false;
private void SetMaximum(int intMaximum) }
{
if (this.progressbar.InvokeRequired) private delegate void SetValueDelegate(int intValue);
{
this.progressbar.Invoke(new SetValueDelegate(SetMaximum), new object[] { intMaximum }); private void SetMaximum(int intMaximum)
} {
else if (this.progressbar.InvokeRequired)
{ {
this.progressbar.Maximum = intMaximum; this.progressbar.Invoke(new SetValueDelegate(SetMaximum), new object[] { intMaximum });
} }
} else
{
private void SetValue(int intValue) this.progressbar.Maximum = intMaximum;
{ }
if (this.progressbar.InvokeRequired) }
{
this.progressbar.Invoke(new SetValueDelegate(SetValue), new object[] { intValue }); private void SetValue(int intValue)
} {
else if (this.progressbar.InvokeRequired)
{ {
this.progressbar.Value = intValue; this.progressbar.Invoke(new SetValueDelegate(SetValue), new object[] { intValue });
} }
} else
private int Upload(string Handle, string FileName, byte[] buffer) {
{ this.progressbar.Value = intValue;
/*org.lsleditor.www.Service1 webservice = new org.lsleditor.www.Service1(); }
if (Handle == null) }
return 0; private int Upload(string Handle, string FileName, byte[] buffer)
{
SetMaximum(buffer.Length); org.lsleditor.www.Service1 webservice = new org.lsleditor.www.Service1();
int intOffset = 0; if (Handle == null)
int intTotal = 0; return 0;
byte[] smallbuffer = new byte[1024];
while (this.blnRunning) SetMaximum(buffer.Length);
{ int intOffset = 0;
int intLength = Math.Min(smallbuffer.Length, buffer.Length - intOffset); int intTotal = 0;
if (intLength <= 0) byte[] smallbuffer = new byte[1024];
break; while (this.blnRunning)
Array.Copy(buffer, intOffset, smallbuffer, 0, intLength); {
intOffset += intLength; int intLength = Math.Min(smallbuffer.Length, buffer.Length - intOffset);
string strError = webservice.Write(Handle, FileName, smallbuffer, intLength); if (intLength <= 0)
if (strError != null) break;
{ Array.Copy(buffer, intOffset, smallbuffer, 0, intLength);
MessageBox.Show("Error:" + strError, "Oops...", MessageBoxButtons.OK, MessageBoxIcon.Error); intOffset += intLength;
break; string strError = webservice.Write(Handle, FileName, smallbuffer, intLength);
} if (strError != null)
intTotal += intLength; {
SetValue(intTotal); MessageBox.Show("Error:" + strError, "Oops...", MessageBoxButtons.OK, MessageBoxIcon.Error);
} break;
return intTotal;*/ }
return 0; intTotal += intLength;
} SetValue(intTotal);
}
private int Upload(string Handle, string FileName, string strPath) return intTotal;
{ }
FileStream fs = new FileStream(strPath, FileMode.Open, FileAccess.Read);
byte[] buffer = new byte[fs.Length]; private int Upload(string Handle, string FileName, string strPath)
fs.Read(buffer, 0, (int)fs.Length); {
fs.Close(); FileStream fs = new FileStream(strPath, FileMode.Open, FileAccess.Read);
return Upload(Handle, FileName, buffer); byte[] buffer = new byte[fs.Length];
} fs.Read(buffer, 0, (int)fs.Length);
} fs.Close();
} return Upload(Handle, FileName, buffer);
}
}
}

View file

@ -0,0 +1,97 @@
// /**
// ********
// *
// * ORIGINAL 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, who in turn License under the GPLv2.
// * In agreement with Alphons van der Heijden's 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 The LSLEditor Group. 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);
}
}
}
}

View file

@ -1,367 +1,371 @@
// <copyright file="gpl-2.0.txt"> // /**
// ORIGINAL CODE BASE IS Copyright (C) 2006-2010 by Alphons van der Heijden. // ********
// The code was donated on 2010-04-28 by Alphons van der Heijden to Brandon 'Dimentox Travanti' Husbands & // *
// Malcolm J. Kudra, who in turn License under the GPLv2 in agreement with Alphons van der Heijden's wishes. // * ORIGINAL 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
// The community would like to thank Alphons for all of his hard work, blood sweat and tears. Without his work // * To Brandon 'Dimentox Travanti' Husbands & Malcolm J. Kudra, who in turn License under the GPLv2.
// the community would be stuck with crappy editors. // * In agreement with Alphons van der Heijden's wishes.
// // *
// The source code in this file ("Source Code") is provided by The LSLEditor Group to you under the terms of the GNU // * The community would like to thank Alphons for all of his hard work, blood sweat and tears.
// General Public License, version 2.0 ("GPL"), unless you have obtained a separate licensing agreement ("Other // * Without his work the community would be stuck with crappy editors.
// License"), formally executed by you and The LSLEditor Group. // *
// Terms of the GPL can be found in the gplv2.txt document. // * 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
// GPLv2 Header // * ("GPL"), unless you have obtained a separate licensing agreement
// ************ // * ("Other License"), formally executed by you and The LSLEditor Group. Terms of
// LSLEditor, a External editor for the LSL Language. // * the GPL can be found in the gplv2.txt document.
// 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 // * GPLv2 Header
// License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any // ********
// later version. // * LSLEditor, a External editor for the LSL Language.
// // * Copyright (C) 2010 The LSLEditor Group.
// 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 // * This program is free software; you can redistribute it and/or
// details. // * modify it under the terms of the GNU General Public License
// // * as published by the Free Software Foundation; either version 2
// You should have received a copy of the GNU General Public License along with this program; if not, write to the Free // * of the License, or (at your option) any later version.
// Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // *
// ******************************************************************************************************************** // * This program is distributed in the hope that it will be useful,
// The above copyright notice and this permission notice shall be included in copies or substantial portions of the // * but WITHOUT ANY WARRANTY; without even the implied warranty of
// Software. // * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// ******************************************************************************************************************** // * GNU General Public License for more details.
// </copyright> // *
// // * You should have received a copy of the GNU General Public License
// <summary> // * along with this program; if not, write to the Free Software
// // * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// // ********
// </summary> // *
// * The above copyright notice and this permission notice shall be included in all
using System; // * copies or substantial portions of the Software.
// *
namespace LSLEditor.Decompressor // ********
{ // */
using System;
public class ZipEntry
{ namespace LSLEditor.Decompressor
{
private const int ZipEntrySignature = 0x04034b50;
private const int ZipEntryDataDescriptorSignature = 0x08074b50; public class ZipEntry
{
private DateTime _LastModified;
private const int ZipEntrySignature = 0x04034b50;
private string _FileName; private const int ZipEntryDataDescriptorSignature = 0x08074b50;
private Int16 _VersionNeeded; private DateTime _LastModified;
private Int16 _BitField; private string _FileName;
private Int16 _CompressionMethod; private Int16 _VersionNeeded;
private Int32 _CompressedSize; private Int16 _BitField;
private Int32 _UncompressedSize; private Int16 _CompressionMethod;
private Int32 _LastModDateTime; private Int32 _CompressedSize;
private Int32 _Crc32;
private byte[] _Extra; private Int32 _UncompressedSize;
private byte[] __filedata; private Int32 _LastModDateTime;
private byte[] _FileData private Int32 _Crc32;
{ private byte[] _Extra;
get
{ private byte[] __filedata;
if (__filedata == null) private byte[] _FileData
{ {
} get
return __filedata; {
} if (__filedata == null)
} {
}
private System.IO.MemoryStream _UnderlyingMemoryStream; return __filedata;
private System.IO.Compression.DeflateStream _CompressedStream; }
private System.IO.Compression.DeflateStream CompressedStream }
{
get private System.IO.MemoryStream _UnderlyingMemoryStream;
{ private System.IO.Compression.DeflateStream _CompressedStream;
if (_CompressedStream == null) private System.IO.Compression.DeflateStream CompressedStream
{ {
_UnderlyingMemoryStream = new System.IO.MemoryStream(); get
bool LeaveUnderlyingStreamOpen = true; {
_CompressedStream = new System.IO.Compression.DeflateStream(_UnderlyingMemoryStream, if (_CompressedStream == null)
System.IO.Compression.CompressionMode.Compress, {
LeaveUnderlyingStreamOpen); _UnderlyingMemoryStream = new System.IO.MemoryStream();
} bool LeaveUnderlyingStreamOpen = true;
return _CompressedStream; _CompressedStream = new System.IO.Compression.DeflateStream(_UnderlyingMemoryStream,
} System.IO.Compression.CompressionMode.Compress,
} LeaveUnderlyingStreamOpen);
}
private static bool ReadHeader(System.IO.Stream s, ZipEntry ze) return _CompressedStream;
{ }
int signature = Shared.ReadSignature(s); }
// return null if this is not a local file header signature private static bool ReadHeader(System.IO.Stream s, ZipEntry ze)
if (SignatureIsNotValid(signature)) {
{ int signature = Shared.ReadSignature(s);
s.Seek(-4, System.IO.SeekOrigin.Current);
return false; // return null if this is not a local file header signature
} if (SignatureIsNotValid(signature))
{
byte[] block = new byte[26]; s.Seek(-4, System.IO.SeekOrigin.Current);
int n = s.Read(block, 0, block.Length); return false;
if (n != block.Length) return false; }
int i = 0; byte[] block = new byte[26];
ze._VersionNeeded = (short)(block[i++] + block[i++] * 256); int n = s.Read(block, 0, block.Length);
ze._BitField = (short)(block[i++] + block[i++] * 256); if (n != block.Length) return false;
ze._CompressionMethod = (short)(block[i++] + block[i++] * 256);
ze._LastModDateTime = block[i++] + block[i++] * 256 + block[i++] * 256 * 256 + block[i++] * 256 * 256 * 256; int i = 0;
ze._VersionNeeded = (short)(block[i++] + block[i++] * 256);
// the PKZIP spec says that if bit 3 is set (0x0008), then the CRC, Compressed size, and uncompressed size ze._BitField = (short)(block[i++] + block[i++] * 256);
// come directly after the file data. The only way to find it is to scan the zip archive for the signature of ze._CompressionMethod = (short)(block[i++] + block[i++] * 256);
// the Data Descriptor, and presume that that signature does not appear in the (compressed) data of the compressed file. ze._LastModDateTime = block[i++] + block[i++] * 256 + block[i++] * 256 * 256 + block[i++] * 256 * 256 * 256;
if ((ze._BitField & 0x0008) != 0x0008) // 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
ze._Crc32 = block[i++] + block[i++] * 256 + block[i++] * 256 * 256 + block[i++] * 256 * 256 * 256; // the Data Descriptor, and presume that that signature does not appear in the (compressed) data of the compressed file.
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 ((ze._BitField & 0x0008) != 0x0008)
} {
else 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;
// the CRC, compressed size, and uncompressed size are stored later in the stream. ze._UncompressedSize = block[i++] + block[i++] * 256 + block[i++] * 256 * 256 + block[i++] * 256 * 256 * 256;
// here, we advance the pointer. }
i += 12; else
} {
// the CRC, compressed size, and uncompressed size are stored later in the stream.
Int16 filenameLength = (short)(block[i++] + block[i++] * 256); // here, we advance the pointer.
Int16 extraFieldLength = (short)(block[i++] + block[i++] * 256); i += 12;
}
block = new byte[filenameLength];
n = s.Read(block, 0, block.Length); Int16 filenameLength = (short)(block[i++] + block[i++] * 256);
ze._FileName = Shared.StringFromBuffer(block, 0, block.Length); Int16 extraFieldLength = (short)(block[i++] + block[i++] * 256);
ze._Extra = new byte[extraFieldLength]; block = new byte[filenameLength];
n = s.Read(ze._Extra, 0, ze._Extra.Length); n = s.Read(block, 0, block.Length);
ze._FileName = Shared.StringFromBuffer(block, 0, block.Length);
// transform the time data into something usable
ze._LastModified = Shared.PackedToDateTime(ze._LastModDateTime); ze._Extra = new byte[extraFieldLength];
n = s.Read(ze._Extra, 0, ze._Extra.Length);
// actually get the compressed size and CRC if necessary
if ((ze._BitField & 0x0008) == 0x0008) // transform the time data into something usable
{ ze._LastModified = Shared.PackedToDateTime(ze._LastModDateTime);
long posn = s.Position;
long SizeOfDataRead = Shared.FindSignature(s, ZipEntryDataDescriptorSignature); // actually get the compressed size and CRC if necessary
if (SizeOfDataRead == -1) return false; if ((ze._BitField & 0x0008) == 0x0008)
{
// read 3x 4-byte fields (CRC, Compressed Size, Uncompressed Size) long posn = s.Position;
block = new byte[12]; long SizeOfDataRead = Shared.FindSignature(s, ZipEntryDataDescriptorSignature);
n = s.Read(block, 0, block.Length); if (SizeOfDataRead == -1) return false;
if (n != 12) return false;
i = 0; // read 3x 4-byte fields (CRC, Compressed Size, Uncompressed Size)
ze._Crc32 = block[i++] + block[i++] * 256 + block[i++] * 256 * 256 + block[i++] * 256 * 256 * 256; block = new byte[12];
ze._CompressedSize = block[i++] + block[i++] * 256 + block[i++] * 256 * 256 + block[i++] * 256 * 256 * 256; n = s.Read(block, 0, block.Length);
ze._UncompressedSize = block[i++] + block[i++] * 256 + block[i++] * 256 * 256 + block[i++] * 256 * 256 * 256; if (n != 12) return false;
i = 0;
if (SizeOfDataRead != ze._CompressedSize) ze._Crc32 = block[i++] + block[i++] * 256 + block[i++] * 256 * 256 + block[i++] * 256 * 256 * 256;
throw new Exception("Data format error (bit 3 is set)"); 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;
// seek back to previous position, to read file data
s.Seek(posn, System.IO.SeekOrigin.Begin); if (SizeOfDataRead != ze._CompressedSize)
} throw new Exception("Data format error (bit 3 is set)");
return true; // seek back to previous position, to read file data
} s.Seek(posn, System.IO.SeekOrigin.Begin);
}
private static bool SignatureIsNotValid(int signature) return true;
{ }
return (signature != ZipEntrySignature);
}
private static bool SignatureIsNotValid(int signature)
public static ZipEntry Read(System.IO.Stream s) {
{ return (signature != ZipEntrySignature);
ZipEntry entry = new ZipEntry(); }
if (!ReadHeader(s, entry)) return null;
public static ZipEntry Read(System.IO.Stream s)
entry.__filedata = new byte[entry._CompressedSize]; {
int n = s.Read(entry._FileData, 0, entry._FileData.Length); ZipEntry entry = new ZipEntry();
if (n != entry._FileData.Length) if (!ReadHeader(s, entry)) return null;
{
throw new Exception("badly formatted zip file."); entry.__filedata = new byte[entry._CompressedSize];
} int n = s.Read(entry._FileData, 0, entry._FileData.Length);
// finally, seek past the (already read) Data descriptor if necessary if (n != entry._FileData.Length)
if ((entry._BitField & 0x0008) == 0x0008) {
{ throw new Exception("badly formatted zip file.");
s.Seek(16, System.IO.SeekOrigin.Current); }
} // finally, seek past the (already read) Data descriptor if necessary
return entry; if ((entry._BitField & 0x0008) == 0x0008)
} {
s.Seek(16, System.IO.SeekOrigin.Current);
}
public void Extract(System.IO.Stream s) return entry;
{ }
using (System.IO.MemoryStream memstream = new System.IO.MemoryStream(_FileData))
{
System.IO.Stream input = null; public void Extract(System.IO.Stream s)
try {
{ using (System.IO.MemoryStream memstream = new System.IO.MemoryStream(_FileData))
if (this._CompressedSize == this._UncompressedSize) {
{ System.IO.Stream input = null;
input = memstream; try
} {
else if (this._CompressedSize == this._UncompressedSize)
{ {
input = new System.IO.Compression.DeflateStream(memstream, System.IO.Compression.CompressionMode.Decompress); input = memstream;
} }
else
System.IO.Stream output = null; {
try input = new System.IO.Compression.DeflateStream(memstream, System.IO.Compression.CompressionMode.Decompress);
{ }
output = s;
System.IO.Stream output = null;
try
byte[] bytes = new byte[4096]; {
int n; output = s;
n = 1; // anything non-zero
while (n != 0) byte[] bytes = new byte[4096];
{ int n;
n = input.Read(bytes, 0, bytes.Length);
if (n > 0) n = 1; // anything non-zero
{ while (n != 0)
output.Write(bytes, 0, n); {
} n = input.Read(bytes, 0, bytes.Length);
} if (n > 0)
} {
finally output.Write(bytes, 0, n);
{ }
// we only close the output stream if we opened it. }
if (output != null) }
{ finally
output.Close(); {
output.Dispose(); // we only close the output stream if we opened it.
} if (output != null)
} {
} output.Close();
finally output.Dispose();
{ }
// 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)) finally
{ {
input.Close(); // we only close the output stream if we opened it.
input.Dispose(); // 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; class Shared
char[] c = new char[maxlength]; {
for (i = 0; (i < maxlength) && (i < buf.Length) && (buf[i] != 0); i++) protected internal static string StringFromBuffer(byte[] buf, int start, int maxlength)
{ {
c[i] = (char)buf[i]; // System.BitConverter.ToChar(buf, start+i*2); int i;
} char[] c = new char[maxlength];
string s = new System.String(c, 0, i); for (i = 0; (i < maxlength) && (i < buf.Length) && (buf[i] != 0); i++)
return s; {
} c[i] = (char)buf[i]; // System.BitConverter.ToChar(buf, start+i*2);
}
protected internal static int ReadSignature(System.IO.Stream s) string s = new System.String(c, 0, i);
{ return s;
int n = 0; }
byte[] sig = new byte[4];
n = s.Read(sig, 0, sig.Length); protected internal static int ReadSignature(System.IO.Stream s)
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]; int n = 0;
return signature; 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!");
protected internal static long FindSignature(System.IO.Stream s, int SignatureToFind) int signature = (((sig[3] * 256 + sig[2]) * 256) + sig[1]) * 256 + sig[0];
{ return signature;
long startingPosition = s.Position; }
int BATCH_SIZE = 1024; protected internal static long FindSignature(System.IO.Stream s, int SignatureToFind)
byte[] targetBytes = new byte[4]; {
targetBytes[0] = (byte)(SignatureToFind >> 24); long startingPosition = s.Position;
targetBytes[1] = (byte)((SignatureToFind & 0x00FF0000) >> 16);
targetBytes[2] = (byte)((SignatureToFind & 0x0000FF00) >> 8); int BATCH_SIZE = 1024;
targetBytes[3] = (byte)(SignatureToFind & 0x000000FF); byte[] targetBytes = new byte[4];
byte[] batch = new byte[BATCH_SIZE]; targetBytes[0] = (byte)(SignatureToFind >> 24);
int n = 0; targetBytes[1] = (byte)((SignatureToFind & 0x00FF0000) >> 16);
bool success = false; targetBytes[2] = (byte)((SignatureToFind & 0x0000FF00) >> 8);
do targetBytes[3] = (byte)(SignatureToFind & 0x000000FF);
{ byte[] batch = new byte[BATCH_SIZE];
n = s.Read(batch, 0, batch.Length); int n = 0;
if (n != 0) bool success = false;
{ do
for (int i = 0; i < n; i++) {
{ n = s.Read(batch, 0, batch.Length);
if (batch[i] == targetBytes[3]) if (n != 0)
{ {
s.Seek(i - n, System.IO.SeekOrigin.Current); for (int i = 0; i < n; i++)
int sig = ReadSignature(s); {
success = (sig == SignatureToFind); if (batch[i] == targetBytes[3])
if (!success) s.Seek(-3, System.IO.SeekOrigin.Current); {
break; // out of for loop s.Seek(i - n, System.IO.SeekOrigin.Current);
} int sig = ReadSignature(s);
} success = (sig == SignatureToFind);
} if (!success) s.Seek(-3, System.IO.SeekOrigin.Current);
else break; break; // out of for loop
if (success) break; }
} while (true); }
if (!success) }
{ else break;
s.Seek(startingPosition, System.IO.SeekOrigin.Begin); if (success) break;
return -1; // or throw? } while (true);
} if (!success)
{
// subtract 4 for the signature. s.Seek(startingPosition, System.IO.SeekOrigin.Begin);
long bytesRead = (s.Position - startingPosition) - 4; return -1; // or throw?
// number of bytes read, should be the same as compressed size of file }
return bytesRead;
} // subtract 4 for the signature.
protected internal static DateTime PackedToDateTime(Int32 packedDateTime) long bytesRead = (s.Position - startingPosition) - 4;
{ // number of bytes read, should be the same as compressed size of file
Int16 packedTime = (Int16)(packedDateTime & 0x0000ffff); return bytesRead;
Int16 packedDate = (Int16)((packedDateTime & 0xffff0000) >> 16); }
protected internal static DateTime PackedToDateTime(Int32 packedDateTime)
int year = 1980 + ((packedDate & 0xFE00) >> 9); {
int month = (packedDate & 0x01E0) >> 5; Int16 packedTime = (Int16)(packedDateTime & 0x0000ffff);
int day = packedDate & 0x001F; Int16 packedDate = (Int16)((packedDateTime & 0xffff0000) >> 16);
int year = 1980 + ((packedDate & 0xFE00) >> 9);
int hour = (packedTime & 0xF800) >> 11; int month = (packedDate & 0x01E0) >> 5;
int minute = (packedTime & 0x07E0) >> 5; int day = packedDate & 0x001F;
int second = packedTime & 0x001F;
DateTime d = System.DateTime.Now; int hour = (packedTime & 0xF800) >> 11;
try { d = new System.DateTime(year, month, day, hour, minute, second, 0); } int minute = (packedTime & 0x07E0) >> 5;
catch int second = packedTime & 0x001F;
{
Console.Write("\nInvalid date/time?:\nyear: {0} ", year); DateTime d = System.DateTime.Now;
Console.Write("month: {0} ", month); try { d = new System.DateTime(year, month, day, hour, minute, second, 0); }
Console.WriteLine("day: {0} ", day); catch
Console.WriteLine("HH:MM:SS= {0}:{1}:{2}", hour, minute, second); {
} Console.Write("\nInvalid date/time?:\nyear: {0} ", year);
Console.Write("month: {0} ", month);
return d; Console.WriteLine("day: {0} ", day);
} Console.WriteLine("HH:MM:SS= {0}:{1}:{2}", hour, minute, second);
}
protected internal static Int32 DateTimeToPacked(DateTime time) return d;
{ }
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); 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);
}
}
}

View file

@ -1,142 +1,142 @@
using System; using System;
using System.ComponentModel; using System.ComponentModel;
using System.Drawing; using System.Drawing;
using System.Drawing.Design; using System.Drawing.Design;
using System.Windows.Forms; using System.Windows.Forms;
using System.Windows.Forms.Design; using System.Windows.Forms.Design;
namespace LSLEditor.Docking namespace LSLEditor.Docking
{ {
internal class DockAreasEditor : UITypeEditor internal class DockAreasEditor : UITypeEditor
{ {
private class DockAreasEditorControl : System.Windows.Forms.UserControl private class DockAreasEditorControl : System.Windows.Forms.UserControl
{ {
private CheckBox checkBoxFloat; private CheckBox checkBoxFloat;
private CheckBox checkBoxDockLeft; private CheckBox checkBoxDockLeft;
private CheckBox checkBoxDockRight; private CheckBox checkBoxDockRight;
private CheckBox checkBoxDockTop; private CheckBox checkBoxDockTop;
private CheckBox checkBoxDockBottom; private CheckBox checkBoxDockBottom;
private CheckBox checkBoxDockFill; private CheckBox checkBoxDockFill;
private DockAreas m_oldDockAreas; private DockAreas m_oldDockAreas;
public DockAreas DockAreas public DockAreas DockAreas
{ {
get get
{ {
DockAreas dockAreas = 0; DockAreas dockAreas = 0;
if (checkBoxFloat.Checked) if (checkBoxFloat.Checked)
dockAreas |= DockAreas.Float; dockAreas |= DockAreas.Float;
if (checkBoxDockLeft.Checked) if (checkBoxDockLeft.Checked)
dockAreas |= DockAreas.DockLeft; dockAreas |= DockAreas.DockLeft;
if (checkBoxDockRight.Checked) if (checkBoxDockRight.Checked)
dockAreas |= DockAreas.DockRight; dockAreas |= DockAreas.DockRight;
if (checkBoxDockTop.Checked) if (checkBoxDockTop.Checked)
dockAreas |= DockAreas.DockTop; dockAreas |= DockAreas.DockTop;
if (checkBoxDockBottom.Checked) if (checkBoxDockBottom.Checked)
dockAreas |= DockAreas.DockBottom; dockAreas |= DockAreas.DockBottom;
if (checkBoxDockFill.Checked) if (checkBoxDockFill.Checked)
dockAreas |= DockAreas.Document; dockAreas |= DockAreas.Document;
if (dockAreas == 0) if (dockAreas == 0)
return m_oldDockAreas; return m_oldDockAreas;
else else
return dockAreas; return dockAreas;
} }
} }
public DockAreasEditorControl() public DockAreasEditorControl()
{ {
checkBoxFloat = new CheckBox(); checkBoxFloat = new CheckBox();
checkBoxDockLeft = new CheckBox(); checkBoxDockLeft = new CheckBox();
checkBoxDockRight = new CheckBox(); checkBoxDockRight = new CheckBox();
checkBoxDockTop = new CheckBox(); checkBoxDockTop = new CheckBox();
checkBoxDockBottom = new CheckBox(); checkBoxDockBottom = new CheckBox();
checkBoxDockFill = new CheckBox(); checkBoxDockFill = new CheckBox();
SuspendLayout(); SuspendLayout();
checkBoxFloat.Appearance = Appearance.Button; checkBoxFloat.Appearance = Appearance.Button;
checkBoxFloat.Dock = DockStyle.Top; checkBoxFloat.Dock = DockStyle.Top;
checkBoxFloat.Height = 24; checkBoxFloat.Height = 24;
checkBoxFloat.Text = Strings.DockAreaEditor_FloatCheckBoxText; checkBoxFloat.Text = Strings.DockAreaEditor_FloatCheckBoxText;
checkBoxFloat.TextAlign = ContentAlignment.MiddleCenter; checkBoxFloat.TextAlign = ContentAlignment.MiddleCenter;
checkBoxFloat.FlatStyle = FlatStyle.System; checkBoxFloat.FlatStyle = FlatStyle.System;
checkBoxDockLeft.Appearance = System.Windows.Forms.Appearance.Button; checkBoxDockLeft.Appearance = System.Windows.Forms.Appearance.Button;
checkBoxDockLeft.Dock = System.Windows.Forms.DockStyle.Left; checkBoxDockLeft.Dock = System.Windows.Forms.DockStyle.Left;
checkBoxDockLeft.Width = 24; checkBoxDockLeft.Width = 24;
checkBoxDockLeft.FlatStyle = FlatStyle.System; checkBoxDockLeft.FlatStyle = FlatStyle.System;
checkBoxDockRight.Appearance = System.Windows.Forms.Appearance.Button; checkBoxDockRight.Appearance = System.Windows.Forms.Appearance.Button;
checkBoxDockRight.Dock = System.Windows.Forms.DockStyle.Right; checkBoxDockRight.Dock = System.Windows.Forms.DockStyle.Right;
checkBoxDockRight.Width = 24; checkBoxDockRight.Width = 24;
checkBoxDockRight.FlatStyle = FlatStyle.System; checkBoxDockRight.FlatStyle = FlatStyle.System;
checkBoxDockTop.Appearance = System.Windows.Forms.Appearance.Button; checkBoxDockTop.Appearance = System.Windows.Forms.Appearance.Button;
checkBoxDockTop.Dock = System.Windows.Forms.DockStyle.Top; checkBoxDockTop.Dock = System.Windows.Forms.DockStyle.Top;
checkBoxDockTop.Height = 24; checkBoxDockTop.Height = 24;
checkBoxDockTop.FlatStyle = FlatStyle.System; checkBoxDockTop.FlatStyle = FlatStyle.System;
checkBoxDockBottom.Appearance = System.Windows.Forms.Appearance.Button; checkBoxDockBottom.Appearance = System.Windows.Forms.Appearance.Button;
checkBoxDockBottom.Dock = System.Windows.Forms.DockStyle.Bottom; checkBoxDockBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
checkBoxDockBottom.Height = 24; checkBoxDockBottom.Height = 24;
checkBoxDockBottom.FlatStyle = FlatStyle.System; checkBoxDockBottom.FlatStyle = FlatStyle.System;
checkBoxDockFill.Appearance = System.Windows.Forms.Appearance.Button; checkBoxDockFill.Appearance = System.Windows.Forms.Appearance.Button;
checkBoxDockFill.Dock = System.Windows.Forms.DockStyle.Fill; checkBoxDockFill.Dock = System.Windows.Forms.DockStyle.Fill;
checkBoxDockFill.FlatStyle = FlatStyle.System; checkBoxDockFill.FlatStyle = FlatStyle.System;
this.Controls.AddRange(new Control[] { this.Controls.AddRange(new Control[] {
checkBoxDockFill, checkBoxDockFill,
checkBoxDockBottom, checkBoxDockBottom,
checkBoxDockTop, checkBoxDockTop,
checkBoxDockRight, checkBoxDockRight,
checkBoxDockLeft, checkBoxDockLeft,
checkBoxFloat}); checkBoxFloat});
Size = new System.Drawing.Size(160, 144); Size = new System.Drawing.Size(160, 144);
BackColor = SystemColors.Control; BackColor = SystemColors.Control;
ResumeLayout(); ResumeLayout();
} }
public void SetStates(DockAreas dockAreas) public void SetStates(DockAreas dockAreas)
{ {
m_oldDockAreas = dockAreas; m_oldDockAreas = dockAreas;
if ((dockAreas & DockAreas.DockLeft) != 0) if ((dockAreas & DockAreas.DockLeft) != 0)
checkBoxDockLeft.Checked = true; checkBoxDockLeft.Checked = true;
if ((dockAreas & DockAreas.DockRight) != 0) if ((dockAreas & DockAreas.DockRight) != 0)
checkBoxDockRight.Checked = true; checkBoxDockRight.Checked = true;
if ((dockAreas & DockAreas.DockTop) != 0) if ((dockAreas & DockAreas.DockTop) != 0)
checkBoxDockTop.Checked = true; checkBoxDockTop.Checked = true;
if ((dockAreas & DockAreas.DockTop) != 0) if ((dockAreas & DockAreas.DockTop) != 0)
checkBoxDockTop.Checked = true; checkBoxDockTop.Checked = true;
if ((dockAreas & DockAreas.DockBottom) != 0) if ((dockAreas & DockAreas.DockBottom) != 0)
checkBoxDockBottom.Checked = true; checkBoxDockBottom.Checked = true;
if ((dockAreas & DockAreas.Document) != 0) if ((dockAreas & DockAreas.Document) != 0)
checkBoxDockFill.Checked = true; checkBoxDockFill.Checked = true;
if ((dockAreas & DockAreas.Float) != 0) if ((dockAreas & DockAreas.Float) != 0)
checkBoxFloat.Checked = true; checkBoxFloat.Checked = true;
} }
} }
private DockAreasEditor.DockAreasEditorControl m_ui = null; private DockAreasEditor.DockAreasEditorControl m_ui = null;
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
{ {
return UITypeEditorEditStyle.DropDown; return UITypeEditorEditStyle.DropDown;
} }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider sp, object value) public override object EditValue(ITypeDescriptorContext context, IServiceProvider sp, object value)
{ {
if (m_ui == null) if (m_ui == null)
m_ui = new DockAreasEditor.DockAreasEditorControl(); m_ui = new DockAreasEditor.DockAreasEditorControl();
m_ui.SetStates((DockAreas)value); m_ui.SetStates((DockAreas)value);
IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)sp.GetService(typeof(IWindowsFormsEditorService)); IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)sp.GetService(typeof(IWindowsFormsEditorService));
edSvc.DropDownControl(m_ui); edSvc.DropDownControl(m_ui);
return m_ui.DockAreas; return m_ui.DockAreas;
} }
} }
} }

View file

@ -1,304 +1,304 @@
using System; using System;
using System.ComponentModel; using System.ComponentModel;
using System.Drawing; using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
namespace LSLEditor.Docking namespace LSLEditor.Docking
{ {
public class DockContent : Form, IDockContent public class DockContent : Form, IDockContent
{ {
public DockContent() public DockContent()
{ {
m_dockHandler = new DockContentHandler(this, new GetPersistStringCallback(GetPersistString)); m_dockHandler = new DockContentHandler(this, new GetPersistStringCallback(GetPersistString));
m_dockHandler.DockStateChanged += new EventHandler(DockHandler_DockStateChanged); m_dockHandler.DockStateChanged += new EventHandler(DockHandler_DockStateChanged);
//Suggested as a fix by bensty regarding form resize //Suggested as a fix by bensty regarding form resize
this.ParentChanged += new EventHandler(DockContent_ParentChanged); this.ParentChanged += new EventHandler(DockContent_ParentChanged);
} }
//Suggested as a fix by bensty regarding form resize //Suggested as a fix by bensty regarding form resize
private void DockContent_ParentChanged(object Sender, EventArgs e) private void DockContent_ParentChanged(object Sender, EventArgs e)
{ {
if (this.Parent != null) if (this.Parent != null)
this.Font = this.Parent.Font; this.Font = this.Parent.Font;
} }
private DockContentHandler m_dockHandler = null; private DockContentHandler m_dockHandler = null;
[Browsable(false)] [Browsable(false)]
public DockContentHandler DockHandler public DockContentHandler DockHandler
{ {
get { return m_dockHandler; } get { return m_dockHandler; }
} }
[LocalizedCategory("Category_Docking")] [LocalizedCategory("Category_Docking")]
[LocalizedDescription("DockContent_AllowEndUserDocking_Description")] [LocalizedDescription("DockContent_AllowEndUserDocking_Description")]
[DefaultValue(true)] [DefaultValue(true)]
public bool AllowEndUserDocking public bool AllowEndUserDocking
{ {
get { return DockHandler.AllowEndUserDocking; } get { return DockHandler.AllowEndUserDocking; }
set { DockHandler.AllowEndUserDocking = value; } set { DockHandler.AllowEndUserDocking = value; }
} }
[LocalizedCategory("Category_Docking")] [LocalizedCategory("Category_Docking")]
[LocalizedDescription("DockContent_DockAreas_Description")] [LocalizedDescription("DockContent_DockAreas_Description")]
[DefaultValue(DockAreas.DockLeft|DockAreas.DockRight|DockAreas.DockTop|DockAreas.DockBottom|DockAreas.Document|DockAreas.Float)] [DefaultValue(DockAreas.DockLeft|DockAreas.DockRight|DockAreas.DockTop|DockAreas.DockBottom|DockAreas.Document|DockAreas.Float)]
public DockAreas DockAreas public DockAreas DockAreas
{ {
get { return DockHandler.DockAreas; } get { return DockHandler.DockAreas; }
set { DockHandler.DockAreas = value; } set { DockHandler.DockAreas = value; }
} }
[LocalizedCategory("Category_Docking")] [LocalizedCategory("Category_Docking")]
[LocalizedDescription("DockContent_AutoHidePortion_Description")] [LocalizedDescription("DockContent_AutoHidePortion_Description")]
[DefaultValue(0.25)] [DefaultValue(0.25)]
public double AutoHidePortion public double AutoHidePortion
{ {
get { return DockHandler.AutoHidePortion; } get { return DockHandler.AutoHidePortion; }
set { DockHandler.AutoHidePortion = value; } set { DockHandler.AutoHidePortion = value; }
} }
[Localizable(true)] [Localizable(true)]
[LocalizedCategory("Category_Docking")] [LocalizedCategory("Category_Docking")]
[LocalizedDescription("DockContent_TabText_Description")] [LocalizedDescription("DockContent_TabText_Description")]
[DefaultValue(null)] [DefaultValue(null)]
private string m_tabText = null; private string m_tabText = null;
public string TabText public string TabText
{ {
get { return m_tabText; } get { return m_tabText; }
set { DockHandler.TabText = m_tabText = value; } set { DockHandler.TabText = m_tabText = value; }
} }
private bool ShouldSerializeTabText() private bool ShouldSerializeTabText()
{ {
return (m_tabText != null); return (m_tabText != null);
} }
[LocalizedCategory("Category_Docking")] [LocalizedCategory("Category_Docking")]
[LocalizedDescription("DockContent_CloseButton_Description")] [LocalizedDescription("DockContent_CloseButton_Description")]
[DefaultValue(true)] [DefaultValue(true)]
public bool CloseButton public bool CloseButton
{ {
get { return DockHandler.CloseButton; } get { return DockHandler.CloseButton; }
set { DockHandler.CloseButton = value; } set { DockHandler.CloseButton = value; }
} }
[LocalizedCategory("Category_Docking")] [LocalizedCategory("Category_Docking")]
[LocalizedDescription("DockContent_CloseButtonVisible_Description")] [LocalizedDescription("DockContent_CloseButtonVisible_Description")]
[DefaultValue(true)] [DefaultValue(true)]
public bool CloseButtonVisible public bool CloseButtonVisible
{ {
get { return DockHandler.CloseButtonVisible; } get { return DockHandler.CloseButtonVisible; }
set { DockHandler.CloseButtonVisible = value; } set { DockHandler.CloseButtonVisible = value; }
} }
[Browsable(false)] [Browsable(false)]
public DockPanel DockPanel public DockPanel DockPanel
{ {
get { return DockHandler.DockPanel; } get { return DockHandler.DockPanel; }
set { DockHandler.DockPanel = value; } set { DockHandler.DockPanel = value; }
} }
[Browsable(false)] [Browsable(false)]
public DockState DockState public DockState DockState
{ {
get { return DockHandler.DockState; } get { return DockHandler.DockState; }
set { DockHandler.DockState = value; } set { DockHandler.DockState = value; }
} }
[Browsable(false)] [Browsable(false)]
public DockPane Pane public DockPane Pane
{ {
get { return DockHandler.Pane; } get { return DockHandler.Pane; }
set { DockHandler.Pane = value; } set { DockHandler.Pane = value; }
} }
[Browsable(false)] [Browsable(false)]
public bool IsHidden public bool IsHidden
{ {
get { return DockHandler.IsHidden; } get { return DockHandler.IsHidden; }
set { DockHandler.IsHidden = value; } set { DockHandler.IsHidden = value; }
} }
[Browsable(false)] [Browsable(false)]
public DockState VisibleState public DockState VisibleState
{ {
get { return DockHandler.VisibleState; } get { return DockHandler.VisibleState; }
set { DockHandler.VisibleState = value; } set { DockHandler.VisibleState = value; }
} }
[Browsable(false)] [Browsable(false)]
public bool IsFloat public bool IsFloat
{ {
get { return DockHandler.IsFloat; } get { return DockHandler.IsFloat; }
set { DockHandler.IsFloat = value; } set { DockHandler.IsFloat = value; }
} }
[Browsable(false)] [Browsable(false)]
public DockPane PanelPane public DockPane PanelPane
{ {
get { return DockHandler.PanelPane; } get { return DockHandler.PanelPane; }
set { DockHandler.PanelPane = value; } set { DockHandler.PanelPane = value; }
} }
[Browsable(false)] [Browsable(false)]
public DockPane FloatPane public DockPane FloatPane
{ {
get { return DockHandler.FloatPane; } get { return DockHandler.FloatPane; }
set { DockHandler.FloatPane = value; } set { DockHandler.FloatPane = value; }
} }
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
protected virtual string GetPersistString() protected virtual string GetPersistString()
{ {
return GetType().ToString(); return GetType().ToString();
} }
[LocalizedCategory("Category_Docking")] [LocalizedCategory("Category_Docking")]
[LocalizedDescription("DockContent_HideOnClose_Description")] [LocalizedDescription("DockContent_HideOnClose_Description")]
[DefaultValue(false)] [DefaultValue(false)]
public bool HideOnClose public bool HideOnClose
{ {
get { return DockHandler.HideOnClose; } get { return DockHandler.HideOnClose; }
set { DockHandler.HideOnClose = value; } set { DockHandler.HideOnClose = value; }
} }
[LocalizedCategory("Category_Docking")] [LocalizedCategory("Category_Docking")]
[LocalizedDescription("DockContent_ShowHint_Description")] [LocalizedDescription("DockContent_ShowHint_Description")]
[DefaultValue(DockState.Unknown)] [DefaultValue(DockState.Unknown)]
public DockState ShowHint public DockState ShowHint
{ {
get { return DockHandler.ShowHint; } get { return DockHandler.ShowHint; }
set { DockHandler.ShowHint = value; } set { DockHandler.ShowHint = value; }
} }
[Browsable(false)] [Browsable(false)]
public bool IsActivated public bool IsActivated
{ {
get { return DockHandler.IsActivated; } get { return DockHandler.IsActivated; }
} }
public bool IsDockStateValid(DockState dockState) public bool IsDockStateValid(DockState dockState)
{ {
return DockHandler.IsDockStateValid(dockState); return DockHandler.IsDockStateValid(dockState);
} }
[LocalizedCategory("Category_Docking")] [LocalizedCategory("Category_Docking")]
[LocalizedDescription("DockContent_TabPageContextMenu_Description")] [LocalizedDescription("DockContent_TabPageContextMenu_Description")]
[DefaultValue(null)] [DefaultValue(null)]
public ContextMenuStrip TabPageContextMenu public ContextMenu TabPageContextMenu
{ {
get { return DockHandler.TabPageContextMenu; } get { return DockHandler.TabPageContextMenu; }
set { DockHandler.TabPageContextMenu = value; } set { DockHandler.TabPageContextMenu = value; }
} }
[LocalizedCategory("Category_Docking")] [LocalizedCategory("Category_Docking")]
[LocalizedDescription("DockContent_TabPageContextMenuStrip_Description")] [LocalizedDescription("DockContent_TabPageContextMenuStrip_Description")]
[DefaultValue(null)] [DefaultValue(null)]
public ContextMenuStrip TabPageContextMenuStrip public ContextMenuStrip TabPageContextMenuStrip
{ {
get { return DockHandler.TabPageContextMenuStrip; } get { return DockHandler.TabPageContextMenuStrip; }
set { DockHandler.TabPageContextMenuStrip = value; } set { DockHandler.TabPageContextMenuStrip = value; }
} }
[Localizable(true)] [Localizable(true)]
[Category("Appearance")] [Category("Appearance")]
[LocalizedDescription("DockContent_ToolTipText_Description")] [LocalizedDescription("DockContent_ToolTipText_Description")]
[DefaultValue(null)] [DefaultValue(null)]
public string ToolTipText public string ToolTipText
{ {
get { return DockHandler.ToolTipText; } get { return DockHandler.ToolTipText; }
set { DockHandler.ToolTipText = value; } set { DockHandler.ToolTipText = value; }
} }
public new void Activate() public new void Activate()
{ {
DockHandler.Activate(); DockHandler.Activate();
} }
public new void Hide() public new void Hide()
{ {
DockHandler.Hide(); DockHandler.Hide();
} }
public new void Show() public new void Show()
{ {
DockHandler.Show(); DockHandler.Show();
} }
public void Show(DockPanel dockPanel) public void Show(DockPanel dockPanel)
{ {
DockHandler.Show(dockPanel); DockHandler.Show(dockPanel);
} }
public void Show(DockPanel dockPanel, DockState dockState) public void Show(DockPanel dockPanel, DockState dockState)
{ {
DockHandler.Show(dockPanel, dockState); DockHandler.Show(dockPanel, dockState);
} }
[SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters")] [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters")]
public void Show(DockPanel dockPanel, Rectangle floatWindowBounds) public void Show(DockPanel dockPanel, Rectangle floatWindowBounds)
{ {
DockHandler.Show(dockPanel, floatWindowBounds); DockHandler.Show(dockPanel, floatWindowBounds);
} }
public void Show(DockPane pane, IDockContent beforeContent) public void Show(DockPane pane, IDockContent beforeContent)
{ {
DockHandler.Show(pane, beforeContent); DockHandler.Show(pane, beforeContent);
} }
public void Show(DockPane previousPane, DockAlignment alignment, double proportion) public void Show(DockPane previousPane, DockAlignment alignment, double proportion)
{ {
DockHandler.Show(previousPane, alignment, proportion); DockHandler.Show(previousPane, alignment, proportion);
} }
[SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters")] [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters")]
public void FloatAt(Rectangle floatWindowBounds) public void FloatAt(Rectangle floatWindowBounds)
{ {
DockHandler.FloatAt(floatWindowBounds); DockHandler.FloatAt(floatWindowBounds);
} }
public void DockTo(DockPane paneTo, DockStyle dockStyle, int contentIndex) public void DockTo(DockPane paneTo, DockStyle dockStyle, int contentIndex)
{ {
DockHandler.DockTo(paneTo, dockStyle, contentIndex); DockHandler.DockTo(paneTo, dockStyle, contentIndex);
} }
public void DockTo(DockPanel panel, DockStyle dockStyle) public void DockTo(DockPanel panel, DockStyle dockStyle)
{ {
DockHandler.DockTo(panel, dockStyle); DockHandler.DockTo(panel, dockStyle);
} }
#region IDockContent Members #region IDockContent Members
void IDockContent.OnActivated(EventArgs e) void IDockContent.OnActivated(EventArgs e)
{ {
this.OnActivated(e); this.OnActivated(e);
} }
void IDockContent.OnDeactivate(EventArgs e) void IDockContent.OnDeactivate(EventArgs e)
{ {
this.OnDeactivate(e); this.OnDeactivate(e);
} }
#endregion #endregion
#region Events #region Events
private void DockHandler_DockStateChanged(object sender, EventArgs e) private void DockHandler_DockStateChanged(object sender, EventArgs e)
{ {
OnDockStateChanged(e); OnDockStateChanged(e);
} }
private static readonly object DockStateChangedEvent = new object(); private static readonly object DockStateChangedEvent = new object();
[LocalizedCategory("Category_PropertyChanged")] [LocalizedCategory("Category_PropertyChanged")]
[LocalizedDescription("Pane_DockStateChanged_Description")] [LocalizedDescription("Pane_DockStateChanged_Description")]
public event EventHandler DockStateChanged public event EventHandler DockStateChanged
{ {
add { Events.AddHandler(DockStateChangedEvent, value); } add { Events.AddHandler(DockStateChangedEvent, value); }
remove { Events.RemoveHandler(DockStateChangedEvent, value); } remove { Events.RemoveHandler(DockStateChangedEvent, value); }
} }
protected virtual void OnDockStateChanged(EventArgs e) protected virtual void OnDockStateChanged(EventArgs e)
{ {
EventHandler handler = (EventHandler)Events[DockStateChangedEvent]; EventHandler handler = (EventHandler)Events[DockStateChangedEvent];
if (handler != null) if (handler != null)
handler(this, e); handler(this, e);
} }
#endregion #endregion
} }
} }

View file

@ -1,175 +1,175 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
namespace LSLEditor.Docking namespace LSLEditor.Docking
{ {
public class DockContentCollection : ReadOnlyCollection<IDockContent> public class DockContentCollection : ReadOnlyCollection<IDockContent>
{ {
private static List<IDockContent> _emptyList = new List<IDockContent>(0); private static List<IDockContent> _emptyList = new List<IDockContent>(0);
internal DockContentCollection() internal DockContentCollection()
: base(new List<IDockContent>()) : base(new List<IDockContent>())
{ {
} }
internal DockContentCollection(DockPane pane) internal DockContentCollection(DockPane pane)
: base(_emptyList) : base(_emptyList)
{ {
m_dockPane = pane; m_dockPane = pane;
} }
private DockPane m_dockPane = null; private DockPane m_dockPane = null;
private DockPane DockPane private DockPane DockPane
{ {
get { return m_dockPane; } get { return m_dockPane; }
} }
public new IDockContent this[int index] public new IDockContent this[int index]
{ {
get get
{ {
if (DockPane == null) if (DockPane == null)
return Items[index] as IDockContent; return Items[index] as IDockContent;
else else
return GetVisibleContent(index); return GetVisibleContent(index);
} }
} }
internal int Add(IDockContent content) internal int Add(IDockContent content)
{ {
#if DEBUG #if DEBUG
if (DockPane != null) if (DockPane != null)
throw new InvalidOperationException(); throw new InvalidOperationException();
#endif #endif
if (Contains(content)) if (Contains(content))
return IndexOf(content); return IndexOf(content);
Items.Add(content); Items.Add(content);
return Count - 1; return Count - 1;
} }
internal void AddAt(IDockContent content, int index) internal void AddAt(IDockContent content, int index)
{ {
#if DEBUG #if DEBUG
if (DockPane != null) if (DockPane != null)
throw new InvalidOperationException(); throw new InvalidOperationException();
#endif #endif
if (index < 0 || index > Items.Count - 1) if (index < 0 || index > Items.Count - 1)
return; return;
if (Contains(content)) if (Contains(content))
return; return;
Items.Insert(index, content); Items.Insert(index, content);
} }
public new bool Contains(IDockContent content) public new bool Contains(IDockContent content)
{ {
if (DockPane == null) if (DockPane == null)
return Items.Contains(content); return Items.Contains(content);
else else
return (GetIndexOfVisibleContents(content) != -1); return (GetIndexOfVisibleContents(content) != -1);
} }
public new int Count public new int Count
{ {
get get
{ {
if (DockPane == null) if (DockPane == null)
return base.Count; return base.Count;
else else
return CountOfVisibleContents; return CountOfVisibleContents;
} }
} }
public new int IndexOf(IDockContent content) public new int IndexOf(IDockContent content)
{ {
if (DockPane == null) if (DockPane == null)
{ {
if (!Contains(content)) if (!Contains(content))
return -1; return -1;
else else
return Items.IndexOf(content); return Items.IndexOf(content);
} }
else else
return GetIndexOfVisibleContents(content); return GetIndexOfVisibleContents(content);
} }
internal void Remove(IDockContent content) internal void Remove(IDockContent content)
{ {
if (DockPane != null) if (DockPane != null)
throw new InvalidOperationException(); throw new InvalidOperationException();
if (!Contains(content)) if (!Contains(content))
return; return;
Items.Remove(content); Items.Remove(content);
} }
private int CountOfVisibleContents private int CountOfVisibleContents
{ {
get get
{ {
#if DEBUG #if DEBUG
if (DockPane == null) if (DockPane == null)
throw new InvalidOperationException(); throw new InvalidOperationException();
#endif #endif
int count = 0; int count = 0;
foreach (IDockContent content in DockPane.Contents) foreach (IDockContent content in DockPane.Contents)
{ {
if (content.DockHandler.DockState == DockPane.DockState) if (content.DockHandler.DockState == DockPane.DockState)
count++; count++;
} }
return count; return count;
} }
} }
private IDockContent GetVisibleContent(int index) private IDockContent GetVisibleContent(int index)
{ {
#if DEBUG #if DEBUG
if (DockPane == null) if (DockPane == null)
throw new InvalidOperationException(); throw new InvalidOperationException();
#endif #endif
int currentIndex = -1; int currentIndex = -1;
foreach (IDockContent content in DockPane.Contents) foreach (IDockContent content in DockPane.Contents)
{ {
if (content.DockHandler.DockState == DockPane.DockState) if (content.DockHandler.DockState == DockPane.DockState)
currentIndex++; currentIndex++;
if (currentIndex == index) if (currentIndex == index)
return content; return content;
} }
throw (new ArgumentOutOfRangeException()); throw (new ArgumentOutOfRangeException());
} }
private int GetIndexOfVisibleContents(IDockContent content) private int GetIndexOfVisibleContents(IDockContent content)
{ {
#if DEBUG #if DEBUG
if (DockPane == null) if (DockPane == null)
throw new InvalidOperationException(); throw new InvalidOperationException();
#endif #endif
if (content == null) if (content == null)
return -1; return -1;
int index = -1; int index = -1;
foreach (IDockContent c in DockPane.Contents) foreach (IDockContent c in DockPane.Contents)
{ {
if (c.DockHandler.DockState == DockPane.DockState) if (c.DockHandler.DockState == DockPane.DockState)
{ {
index++; index++;
if (c == content) if (c == content)
return index; return index;
} }
} }
return -1; return -1;
} }
} }
} }

View file

@ -1,19 +1,19 @@
using System; using System;
namespace LSLEditor.Docking namespace LSLEditor.Docking
{ {
public class DockContentEventArgs : EventArgs public class DockContentEventArgs : EventArgs
{ {
private IDockContent m_content; private IDockContent m_content;
public DockContentEventArgs(IDockContent content) public DockContentEventArgs(IDockContent content)
{ {
m_content = content; m_content = content;
} }
public IDockContent Content public IDockContent Content
{ {
get { return m_content; } get { return m_content; }
} }
} }
} }

View file

@ -1,161 +1,161 @@
using System; using System;
using System.Drawing; using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
namespace LSLEditor.Docking namespace LSLEditor.Docking
{ {
internal abstract class DockOutlineBase internal abstract class DockOutlineBase
{ {
public DockOutlineBase() public DockOutlineBase()
{ {
Init(); Init();
} }
private void Init() private void Init()
{ {
SetValues(Rectangle.Empty, null, DockStyle.None, -1); SetValues(Rectangle.Empty, null, DockStyle.None, -1);
SaveOldValues(); SaveOldValues();
} }
private Rectangle m_oldFloatWindowBounds; private Rectangle m_oldFloatWindowBounds;
protected Rectangle OldFloatWindowBounds protected Rectangle OldFloatWindowBounds
{ {
get { return m_oldFloatWindowBounds; } get { return m_oldFloatWindowBounds; }
} }
private Control m_oldDockTo; private Control m_oldDockTo;
protected Control OldDockTo protected Control OldDockTo
{ {
get { return m_oldDockTo; } get { return m_oldDockTo; }
} }
private DockStyle m_oldDock; private DockStyle m_oldDock;
protected DockStyle OldDock protected DockStyle OldDock
{ {
get { return m_oldDock; } get { return m_oldDock; }
} }
private int m_oldContentIndex; private int m_oldContentIndex;
protected int OldContentIndex protected int OldContentIndex
{ {
get { return m_oldContentIndex; } get { return m_oldContentIndex; }
} }
protected bool SameAsOldValue protected bool SameAsOldValue
{ {
get get
{ {
return FloatWindowBounds == OldFloatWindowBounds && return FloatWindowBounds == OldFloatWindowBounds &&
DockTo == OldDockTo && DockTo == OldDockTo &&
Dock == OldDock && Dock == OldDock &&
ContentIndex == OldContentIndex; ContentIndex == OldContentIndex;
} }
} }
private Rectangle m_floatWindowBounds; private Rectangle m_floatWindowBounds;
public Rectangle FloatWindowBounds public Rectangle FloatWindowBounds
{ {
get { return m_floatWindowBounds; } get { return m_floatWindowBounds; }
} }
private Control m_dockTo; private Control m_dockTo;
public Control DockTo public Control DockTo
{ {
get { return m_dockTo; } get { return m_dockTo; }
} }
private DockStyle m_dock; private DockStyle m_dock;
public DockStyle Dock public DockStyle Dock
{ {
get { return m_dock; } get { return m_dock; }
} }
private int m_contentIndex; private int m_contentIndex;
public int ContentIndex public int ContentIndex
{ {
get { return m_contentIndex; } get { return m_contentIndex; }
} }
public bool FlagFullEdge public bool FlagFullEdge
{ {
get { return m_contentIndex != 0; } get { return m_contentIndex != 0; }
} }
private bool m_flagTestDrop = false; private bool m_flagTestDrop = false;
public bool FlagTestDrop public bool FlagTestDrop
{ {
get { return m_flagTestDrop; } get { return m_flagTestDrop; }
set { m_flagTestDrop = value; } set { m_flagTestDrop = value; }
} }
private void SaveOldValues() private void SaveOldValues()
{ {
m_oldDockTo = m_dockTo; m_oldDockTo = m_dockTo;
m_oldDock = m_dock; m_oldDock = m_dock;
m_oldContentIndex = m_contentIndex; m_oldContentIndex = m_contentIndex;
m_oldFloatWindowBounds = m_floatWindowBounds; m_oldFloatWindowBounds = m_floatWindowBounds;
} }
protected abstract void OnShow(); protected abstract void OnShow();
protected abstract void OnClose(); protected abstract void OnClose();
private void SetValues(Rectangle floatWindowBounds, Control dockTo, DockStyle dock, int contentIndex) private void SetValues(Rectangle floatWindowBounds, Control dockTo, DockStyle dock, int contentIndex)
{ {
m_floatWindowBounds = floatWindowBounds; m_floatWindowBounds = floatWindowBounds;
m_dockTo = dockTo; m_dockTo = dockTo;
m_dock = dock; m_dock = dock;
m_contentIndex = contentIndex; m_contentIndex = contentIndex;
FlagTestDrop = true; FlagTestDrop = true;
} }
private void TestChange() private void TestChange()
{ {
if (m_floatWindowBounds != m_oldFloatWindowBounds || if (m_floatWindowBounds != m_oldFloatWindowBounds ||
m_dockTo != m_oldDockTo || m_dockTo != m_oldDockTo ||
m_dock != m_oldDock || m_dock != m_oldDock ||
m_contentIndex != m_oldContentIndex) m_contentIndex != m_oldContentIndex)
OnShow(); OnShow();
} }
public void Show() public void Show()
{ {
SaveOldValues(); SaveOldValues();
SetValues(Rectangle.Empty, null, DockStyle.None, -1); SetValues(Rectangle.Empty, null, DockStyle.None, -1);
TestChange(); TestChange();
} }
public void Show(DockPane pane, DockStyle dock) public void Show(DockPane pane, DockStyle dock)
{ {
SaveOldValues(); SaveOldValues();
SetValues(Rectangle.Empty, pane, dock, -1); SetValues(Rectangle.Empty, pane, dock, -1);
TestChange(); TestChange();
} }
public void Show(DockPane pane, int contentIndex) public void Show(DockPane pane, int contentIndex)
{ {
SaveOldValues(); SaveOldValues();
SetValues(Rectangle.Empty, pane, DockStyle.Fill, contentIndex); SetValues(Rectangle.Empty, pane, DockStyle.Fill, contentIndex);
TestChange(); TestChange();
} }
public void Show(DockPanel dockPanel, DockStyle dock, bool fullPanelEdge) public void Show(DockPanel dockPanel, DockStyle dock, bool fullPanelEdge)
{ {
SaveOldValues(); SaveOldValues();
SetValues(Rectangle.Empty, dockPanel, dock, fullPanelEdge ? -1 : 0); SetValues(Rectangle.Empty, dockPanel, dock, fullPanelEdge ? -1 : 0);
TestChange(); TestChange();
} }
public void Show(Rectangle floatWindowBounds) public void Show(Rectangle floatWindowBounds)
{ {
SaveOldValues(); SaveOldValues();
SetValues(floatWindowBounds, null, DockStyle.None, -1); SetValues(floatWindowBounds, null, DockStyle.None, -1);
TestChange(); TestChange();
} }
public void Close() public void Close()
{ {
OnClose(); OnClose();
} }
} }
} }

View file

@ -1,157 +1,157 @@
using System; using System;
using System.Collections; using System.Collections;
using System.ComponentModel; using System.ComponentModel;
using System.Drawing; using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
namespace LSLEditor.Docking namespace LSLEditor.Docking
{ {
partial class DockPane partial class DockPane
{ {
private class SplitterControl : Control, ISplitterDragSource private class SplitterControl : Control, ISplitterDragSource
{ {
DockPane m_pane; DockPane m_pane;
public SplitterControl(DockPane pane) public SplitterControl(DockPane pane)
{ {
SetStyle(ControlStyles.Selectable, false); SetStyle(ControlStyles.Selectable, false);
m_pane = pane; m_pane = pane;
} }
public DockPane DockPane public DockPane DockPane
{ {
get { return m_pane; } get { return m_pane; }
} }
private DockAlignment m_alignment; private DockAlignment m_alignment;
public DockAlignment Alignment public DockAlignment Alignment
{ {
get { return m_alignment; } get { return m_alignment; }
set set
{ {
m_alignment = value; m_alignment = value;
if (m_alignment == DockAlignment.Left || m_alignment == DockAlignment.Right) if (m_alignment == DockAlignment.Left || m_alignment == DockAlignment.Right)
Cursor = Cursors.VSplit; Cursor = Cursors.VSplit;
else if (m_alignment == DockAlignment.Top || m_alignment == DockAlignment.Bottom) else if (m_alignment == DockAlignment.Top || m_alignment == DockAlignment.Bottom)
Cursor = Cursors.HSplit; Cursor = Cursors.HSplit;
else else
Cursor = Cursors.Default; Cursor = Cursors.Default;
if (DockPane.DockState == DockState.Document) if (DockPane.DockState == DockState.Document)
Invalidate(); Invalidate();
} }
} }
protected override void OnPaint(PaintEventArgs e) protected override void OnPaint(PaintEventArgs e)
{ {
base.OnPaint(e); base.OnPaint(e);
if (DockPane.DockState != DockState.Document) if (DockPane.DockState != DockState.Document)
return; return;
Graphics g = e.Graphics; Graphics g = e.Graphics;
Rectangle rect = ClientRectangle; Rectangle rect = ClientRectangle;
if (Alignment == DockAlignment.Top || Alignment == DockAlignment.Bottom) if (Alignment == DockAlignment.Top || Alignment == DockAlignment.Bottom)
g.DrawLine(SystemPens.ControlDark, rect.Left, rect.Bottom - 1, rect.Right, rect.Bottom - 1); g.DrawLine(SystemPens.ControlDark, rect.Left, rect.Bottom - 1, rect.Right, rect.Bottom - 1);
else if (Alignment == DockAlignment.Left || Alignment == DockAlignment.Right) else if (Alignment == DockAlignment.Left || Alignment == DockAlignment.Right)
g.DrawLine(SystemPens.ControlDarkDark, rect.Right - 1, rect.Top, rect.Right - 1, rect.Bottom); g.DrawLine(SystemPens.ControlDarkDark, rect.Right - 1, rect.Top, rect.Right - 1, rect.Bottom);
} }
protected override void OnMouseDown(MouseEventArgs e) protected override void OnMouseDown(MouseEventArgs e)
{ {
base.OnMouseDown(e); base.OnMouseDown(e);
if (e.Button != MouseButtons.Left) if (e.Button != MouseButtons.Left)
return; return;
DockPane.DockPanel.BeginDrag(this, Parent.RectangleToScreen(Bounds)); DockPane.DockPanel.BeginDrag(this, Parent.RectangleToScreen(Bounds));
} }
#region ISplitterDragSource Members #region ISplitterDragSource Members
void ISplitterDragSource.BeginDrag(Rectangle rectSplitter) void ISplitterDragSource.BeginDrag(Rectangle rectSplitter)
{ {
} }
void ISplitterDragSource.EndDrag() void ISplitterDragSource.EndDrag()
{ {
} }
bool ISplitterDragSource.IsVertical bool ISplitterDragSource.IsVertical
{ {
get get
{ {
NestedDockingStatus status = DockPane.NestedDockingStatus; NestedDockingStatus status = DockPane.NestedDockingStatus;
return (status.DisplayingAlignment == DockAlignment.Left || return (status.DisplayingAlignment == DockAlignment.Left ||
status.DisplayingAlignment == DockAlignment.Right); status.DisplayingAlignment == DockAlignment.Right);
} }
} }
Rectangle ISplitterDragSource.DragLimitBounds Rectangle ISplitterDragSource.DragLimitBounds
{ {
get get
{ {
NestedDockingStatus status = DockPane.NestedDockingStatus; NestedDockingStatus status = DockPane.NestedDockingStatus;
Rectangle rectLimit = Parent.RectangleToScreen(status.LogicalBounds); Rectangle rectLimit = Parent.RectangleToScreen(status.LogicalBounds);
if (((ISplitterDragSource)this).IsVertical) if (((ISplitterDragSource)this).IsVertical)
{ {
rectLimit.X += MeasurePane.MinSize; rectLimit.X += MeasurePane.MinSize;
rectLimit.Width -= 2 * MeasurePane.MinSize; rectLimit.Width -= 2 * MeasurePane.MinSize;
} }
else else
{ {
rectLimit.Y += MeasurePane.MinSize; rectLimit.Y += MeasurePane.MinSize;
rectLimit.Height -= 2 * MeasurePane.MinSize; rectLimit.Height -= 2 * MeasurePane.MinSize;
} }
return rectLimit; return rectLimit;
} }
} }
void ISplitterDragSource.MoveSplitter(int offset) void ISplitterDragSource.MoveSplitter(int offset)
{ {
NestedDockingStatus status = DockPane.NestedDockingStatus; NestedDockingStatus status = DockPane.NestedDockingStatus;
double proportion = status.Proportion; double proportion = status.Proportion;
if (status.LogicalBounds.Width <= 0 || status.LogicalBounds.Height <= 0) if (status.LogicalBounds.Width <= 0 || status.LogicalBounds.Height <= 0)
return; return;
else if (status.DisplayingAlignment == DockAlignment.Left) else if (status.DisplayingAlignment == DockAlignment.Left)
proportion += ((double)offset) / (double)status.LogicalBounds.Width; proportion += ((double)offset) / (double)status.LogicalBounds.Width;
else if (status.DisplayingAlignment == DockAlignment.Right) else if (status.DisplayingAlignment == DockAlignment.Right)
proportion -= ((double)offset) / (double)status.LogicalBounds.Width; proportion -= ((double)offset) / (double)status.LogicalBounds.Width;
else if (status.DisplayingAlignment == DockAlignment.Top) else if (status.DisplayingAlignment == DockAlignment.Top)
proportion += ((double)offset) / (double)status.LogicalBounds.Height; proportion += ((double)offset) / (double)status.LogicalBounds.Height;
else else
proportion -= ((double)offset) / (double)status.LogicalBounds.Height; proportion -= ((double)offset) / (double)status.LogicalBounds.Height;
DockPane.SetNestedDockingProportion(proportion); DockPane.SetNestedDockingProportion(proportion);
} }
#region IDragSource Members #region IDragSource Members
Control IDragSource.DragControl Control IDragSource.DragControl
{ {
get { return this; } get { return this; }
} }
#endregion #endregion
#endregion #endregion
} }
private SplitterControl m_splitter; private SplitterControl m_splitter;
private SplitterControl Splitter private SplitterControl Splitter
{ {
get { return m_splitter; } get { return m_splitter; }
} }
internal Rectangle SplitterBounds internal Rectangle SplitterBounds
{ {
set { Splitter.Bounds = value; } set { Splitter.Bounds = value; }
} }
internal DockAlignment SplitterAlignment internal DockAlignment SplitterAlignment
{ {
set { Splitter.Alignment = value; } set { Splitter.Alignment = value; }
} }
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -1,100 +1,100 @@
using System; using System;
using System.Windows.Forms; using System.Windows.Forms;
using System.Drawing; using System.Drawing;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Security.Permissions; using System.Security.Permissions;
namespace LSLEditor.Docking namespace LSLEditor.Docking
{ {
public abstract class DockPaneCaptionBase : Control public abstract class DockPaneCaptionBase : Control
{ {
protected internal DockPaneCaptionBase(DockPane pane) protected internal DockPaneCaptionBase(DockPane pane)
{ {
m_dockPane = pane; m_dockPane = pane;
SetStyle(ControlStyles.OptimizedDoubleBuffer | SetStyle(ControlStyles.OptimizedDoubleBuffer |
ControlStyles.ResizeRedraw | ControlStyles.ResizeRedraw |
ControlStyles.UserPaint | ControlStyles.UserPaint |
ControlStyles.AllPaintingInWmPaint, true); ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.Selectable, false); SetStyle(ControlStyles.Selectable, false);
} }
private DockPane m_dockPane; private DockPane m_dockPane;
protected DockPane DockPane protected DockPane DockPane
{ {
get { return m_dockPane; } get { return m_dockPane; }
} }
protected DockPane.AppearanceStyle Appearance protected DockPane.AppearanceStyle Appearance
{ {
get { return DockPane.Appearance; } get { return DockPane.Appearance; }
} }
protected bool HasTabPageContextMenu protected bool HasTabPageContextMenu
{ {
get { return DockPane.HasTabPageContextMenu; } get { return DockPane.HasTabPageContextMenu; }
} }
protected void ShowTabPageContextMenu(Point position) protected void ShowTabPageContextMenu(Point position)
{ {
DockPane.ShowTabPageContextMenu(this, position); DockPane.ShowTabPageContextMenu(this, position);
} }
protected override void OnMouseUp(MouseEventArgs e) protected override void OnMouseUp(MouseEventArgs e)
{ {
base.OnMouseUp(e); base.OnMouseUp(e);
if (e.Button == MouseButtons.Right) if (e.Button == MouseButtons.Right)
ShowTabPageContextMenu(new Point(e.X, e.Y)); ShowTabPageContextMenu(new Point(e.X, e.Y));
} }
protected override void OnMouseDown(MouseEventArgs e) protected override void OnMouseDown(MouseEventArgs e)
{ {
base.OnMouseDown(e); base.OnMouseDown(e);
if (e.Button == MouseButtons.Left && if (e.Button == MouseButtons.Left &&
DockPane.DockPanel.AllowEndUserDocking && DockPane.DockPanel.AllowEndUserDocking &&
DockPane.AllowDockDragAndDrop && DockPane.AllowDockDragAndDrop &&
!DockHelper.IsDockStateAutoHide(DockPane.DockState) && !DockHelper.IsDockStateAutoHide(DockPane.DockState) &&
DockPane.ActiveContent != null) DockPane.ActiveContent != null)
DockPane.DockPanel.BeginDrag(DockPane); DockPane.DockPanel.BeginDrag(DockPane);
} }
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)] [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
protected override void WndProc(ref Message m) protected override void WndProc(ref Message m)
{ {
if (m.Msg == (int)Win32.Msgs.WM_LBUTTONDBLCLK) if (m.Msg == (int)Win32.Msgs.WM_LBUTTONDBLCLK)
{ {
if (DockHelper.IsDockStateAutoHide(DockPane.DockState)) if (DockHelper.IsDockStateAutoHide(DockPane.DockState))
{ {
DockPane.DockPanel.ActiveAutoHideContent = null; DockPane.DockPanel.ActiveAutoHideContent = null;
return; return;
} }
if (DockPane.IsFloat) if (DockPane.IsFloat)
DockPane.RestoreToPanel(); DockPane.RestoreToPanel();
else else
DockPane.Float(); DockPane.Float();
} }
base.WndProc(ref m); base.WndProc(ref m);
} }
internal void RefreshChanges() internal void RefreshChanges()
{ {
if (IsDisposed) if (IsDisposed)
return; return;
OnRefreshChanges(); OnRefreshChanges();
} }
protected virtual void OnRightToLeftLayoutChanged() protected virtual void OnRightToLeftLayoutChanged()
{ {
} }
protected virtual void OnRefreshChanges() protected virtual void OnRefreshChanges()
{ {
} }
protected internal abstract int MeasureHeight(); protected internal abstract int MeasureHeight();
} }
} }

View file

@ -1,47 +1,47 @@
using System; using System;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
namespace LSLEditor.Docking namespace LSLEditor.Docking
{ {
public class DockPaneCollection : ReadOnlyCollection<DockPane> public class DockPaneCollection : ReadOnlyCollection<DockPane>
{ {
internal DockPaneCollection() internal DockPaneCollection()
: base(new List<DockPane>()) : base(new List<DockPane>())
{ {
} }
internal int Add(DockPane pane) internal int Add(DockPane pane)
{ {
if (Items.Contains(pane)) if (Items.Contains(pane))
return Items.IndexOf(pane); return Items.IndexOf(pane);
Items.Add(pane); Items.Add(pane);
return Count - 1; return Count - 1;
} }
internal void AddAt(DockPane pane, int index) internal void AddAt(DockPane pane, int index)
{ {
if (index < 0 || index > Items.Count - 1) if (index < 0 || index > Items.Count - 1)
return; return;
if (Contains(pane)) if (Contains(pane))
return; return;
Items.Insert(index, pane); Items.Insert(index, pane);
} }
internal void Dispose() internal void Dispose()
{ {
for (int i=Count - 1; i>=0; i--) for (int i=Count - 1; i>=0; i--)
this[i].Close(); this[i].Close();
} }
internal void Remove(DockPane pane) internal void Remove(DockPane pane)
{ {
Items.Remove(pane); Items.Remove(pane);
} }
} }
} }

Some files were not shown because too many files have changed in this diff Show more