Merge include functionality in master

This commit is contained in:
User 2018-01-11 10:43:10 +01:00
commit 5d5684ecb5
26 changed files with 3483 additions and 400 deletions

12
.gitignore vendored
View file

@ -3,11 +3,9 @@
################################################################################
/bin
/trunk/obj/Release
/trunk/obj/Debug
/trunk/.vs/lsleditor/v15
/trunk/lsleditor.csproj.user
/lsl-editor-doc.xml
/trunk/.vs/lsleditor/v15
/trunk/obj/Debug
/trunk/obj/Release/Default/Project
/trunk/obj/Release
/trunk/lsleditor.csproj.user

View file

@ -31,8 +31,8 @@ namespace LSLEditor
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.tvOutline = new System.Windows.Forms.TreeView();
this.numberedTextBoxUC1 = new NumberedTextBox.NumberedTextBoxUC();
this.tvOutline = new System.Windows.Forms.TreeView();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.splitContainer1.Panel1.SuspendLayout();
@ -83,18 +83,6 @@ namespace LSLEditor
this.splitContainer1.SplitterDistance = 397;
this.splitContainer1.TabIndex = 7;
//
// tvOutline
//
this.tvOutline.Dock = System.Windows.Forms.DockStyle.Fill;
this.tvOutline.HotTracking = true;
this.tvOutline.Location = new System.Drawing.Point(0, 0);
this.tvOutline.Name = "tvOutline";
this.tvOutline.Size = new System.Drawing.Size(141, 228);
this.tvOutline.TabIndex = 6;
this.tvOutline.VisibleChanged += new System.EventHandler(this.tvOutline_VisibleChanged);
this.tvOutline.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvOutline_AfterSelect);
this.tvOutline.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.tvOutline_NodeMouseClick);
//
// numberedTextBoxUC1
//
this.numberedTextBoxUC1.Dock = System.Windows.Forms.DockStyle.Fill;
@ -103,12 +91,25 @@ namespace LSLEditor
this.numberedTextBoxUC1.Size = new System.Drawing.Size(393, 228);
this.numberedTextBoxUC1.TabIndex = 4;
//
// tvOutline
//
this.tvOutline.Dock = System.Windows.Forms.DockStyle.Fill;
this.tvOutline.HotTracking = true;
this.tvOutline.Location = new System.Drawing.Point(0, 0);
this.tvOutline.Name = "tvOutline";
this.tvOutline.Size = new System.Drawing.Size(141, 228);
this.tvOutline.TabIndex = 6;
this.tvOutline.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvOutline_AfterSelect);
this.tvOutline.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.tvOutline_NodeMouseClick);
this.tvOutline.VisibleChanged += new System.EventHandler(this.tvOutline_VisibleChanged);
//
// EditForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(560, 264);
this.Controls.Add(this.tabControl1);
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Name = "EditForm";
this.Text = "EditForm";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.EditForm_FormClosing);

View file

@ -45,6 +45,7 @@ using System.Text;
using System.Windows.Forms;
using LSLEditor.Docking;
using LSLEditor.Helpers;
using System.Collections.Generic;
namespace LSLEditor
{
@ -52,7 +53,9 @@ namespace LSLEditor
{
public RuntimeConsole runtime;
private string m_FullPathName;
public List<string> verboseQueue = new List<string>();
private string m_FullPathName;
private Guid m_Guid;
// private bool sOutline = true;
public LSLEditorForm parent;
@ -180,13 +183,34 @@ namespace LSLEditor
void TextBox_OnDirtyChanged(object sender, EventArgs e)
{
this.Text = this.ScriptName;
if (this.numberedTextBoxUC1.TextBox.Dirty) {
this.Text = this.Text.Trim() + "* ";
} else {
this.Text = this.Text.Trim() + " ";
}
TabPage tabPage = this.Tag as TabPage;
if(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;
}
@ -196,7 +220,7 @@ namespace LSLEditor
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
this.Close();
}
public string FullPathName
@ -307,30 +331,68 @@ namespace LSLEditor
public void SaveCurrentFile(string 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;
}
// 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;
}
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()
{
@ -397,12 +459,26 @@ namespace LSLEditor
// 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 tabPage = new TabPage("Debug");
tabPage.Controls.Add(runtime);
this.tabControl1.TabPages.Add(tabPage);
this.tabControl1.SelectedIndex = 1;
@ -419,8 +495,17 @@ namespace LSLEditor
// 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(SourceCode);
string strCSharp = translator.Parse(lsl);
if (System.Diagnostics.Debugger.IsAttached) {
for (int intI = this.tabControl1.TabPages.Count - 1; intI > 0; intI--) {
@ -458,14 +543,53 @@ namespace LSLEditor
{
this.parent.CancelClosing = false;
if (this.Dirty) {
DialogResult dialogResult = MessageBox.Show(this, @"Save """ + this.ScriptName + @"""?", "File has changed", MessageBoxButtons.YesNoCancel);
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);
}
}
}
this.parent.CancelClosing = e.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)
@ -509,6 +633,6 @@ namespace LSLEditor
private void tvOutline_VisibleChanged(object sender, EventArgs e)
{
this.tvOutline.ExpandAll();
}
}
}
}
}

View file

@ -146,27 +146,30 @@ namespace LSLEditor
public static string RemoveComment(string strLine)
{
bool blnWithinString = false;
for (int intI = 0; intI < (strLine.Length - 1); intI++)
{
char chrC = strLine[intI];
if (chrC == '"')
blnWithinString = !blnWithinString;
if (blnWithinString)
{
if (chrC == '\\')
intI++;
continue;
}
if (chrC != '/')
continue;
if (strLine[intI + 1] == '/')
{
strLine = strLine.Substring(0, intI);
break;
}
}
return strLine;
bool blnWithinString = false;
for (int intI = 0; intI < (strLine.Length - 1); intI++)
{
char chrC = strLine[intI];
if (chrC == '"')
blnWithinString = !blnWithinString;
if (blnWithinString)
{
if (chrC == '\\')
intI++;
continue;
}
if (chrC != '/')
continue;
if (strLine[intI + 1] == '/')
{
//if(strLine.IndexOf("@include") != intI + 2)
//{
strLine = strLine.Substring(0, intI);
//}
break;
}
}
return strLine;
}
public static string RemoveCommentsFromLines(string strLines)

View file

@ -0,0 +1,684 @@
// <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

@ -0,0 +1,270 @@
// <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;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

File diff suppressed because it is too large Load diff

View file

@ -82,8 +82,7 @@ namespace LSLEditor
private Browser browser;
private SimulatorConsole SimulatorConsole;
public bool CancelClosing = false;
public Solution.SolutionExplorer m_SolutionExplorer;
@ -279,8 +278,8 @@ namespace LSLEditor
private void Start(string[] args)
{
string fileFilterNotes = "Notecard files (*.txt)|*.txt|All files (*.*)|*.*";
string fileFilterScripts = "Secondlife script files (*.lsl)|*.lsl|All files (*.*)|*.*";
string fileFilterSolutions = "LSLEditor Solution File (*.sol)|*.sol|All Files (*.*)|*.*";
string fileFilterScripts = "Secondlife script files (*.lsl;*.lsli)|*.lsl;*.lsli|All files (*.*)|*.*";
string fileFilterSolutions = "LSLEditor Solution File (*.sol)|*.sol|All Files (*.*)|*.*";
this.ConfLSL = GetXmlFromResource(Properties.Settings.Default.ConfLSL);
this.ConfCSharp = GetXmlFromResource(Properties.Settings.Default.ConfCSharp);
@ -355,7 +354,15 @@ namespace LSLEditor
void TextBox_OnCursorPositionChanged(object sender, SyntaxRichTextBox.CursorPositionEventArgs e)
{
this.toolStripStatusLabel1.Text = string.Format("Ln {0,-10} Col {1,-10} Ch {2,-20} Ttl {3,-10} {4,-10} {5,-10}", e.Line, e.Column, e.Char, e.Total, e.Insert ? "INS" : "OVR", e.Caps ? "CAP" : "");
EditForm editForm = (EditForm)this.ActiveMdiForm;
string expandedWarning = "";
if (editForm != null && Helpers.LSLIPathHelper.IsExpandedLSL(editForm.ScriptName))
{
expandedWarning = "Warning: Editing in included sections will be erased when collapsing/saving!";
}
this.toolStripStatusLabel1.Text = string.Format("Ln {0,-10} Col {1,-10} Ch {2,-20} Ttl {3,-10} {4,-10} {5,-10} {6}",
e.Line, e.Column, e.Char, e.Total, e.Insert ? "INS" : "OVR", e.Caps ? "CAP" : "", expandedWarning);
}
private XmlDocument GetXmlFromResource(string strName)
@ -379,14 +386,20 @@ namespace LSLEditor
AddForm(editForm);
}
private void NewFile()
private void NewFile(bool isLSLI = false)
{
EditForm editForm = new EditForm(this);
editForm.SourceCode = Helpers.GetTemplate.Source();
editForm.TextBox.FormatDocument();
editForm.TextBox.ClearUndoStack();
editForm.FullPathName = Properties.Settings.Default.ExampleName;
editForm.TextBox.OnCursorPositionChanged += new SyntaxRichTextBox.CursorPositionChangedHandler(TextBox_OnCursorPositionChanged);
if(isLSLI)
{
editForm.FullPathName = Properties.Settings.Default.ExampleNameLSLI;
} else
{
editForm.FullPathName = Properties.Settings.Default.ExampleName;
}
editForm.TextBox.OnCursorPositionChanged += new SyntaxRichTextBox.CursorPositionChangedHandler(TextBox_OnCursorPositionChanged);
AddForm(editForm);
}
@ -417,6 +430,11 @@ namespace LSLEditor
UpdateRecentFileList(strPath);
if(Helpers.LSLIPathHelper.IsExpandedLSL(editForm.Text))
{
editForm.Text = Helpers.LSLIPathHelper.GetExpandedTabName(editForm.Text);
}
return editForm;
}
@ -581,15 +599,24 @@ namespace LSLEditor
DialogResult dialogresult = DialogResult.OK;
if (editForm.FullPathName == Properties.Settings.Default.ExampleName || blnSaveAs) {
SaveFileDialog saveDialog = editForm.IsScript ? this.saveScriptFilesDialog : this.saveNoteFilesDialog;
saveDialog.FileName = editForm.FullPathName;
string strExtension = Path.GetExtension(editForm.FullPathName);
// Save as LSLI when it's an expanded LSL
if (Helpers.LSLIPathHelper.IsExpandedLSL(editForm.ScriptName))
{
saveDialog.FileName = Helpers.LSLIPathHelper.CreateCollapsedScriptName(editForm.ScriptName);
} else
{
saveDialog.FileName = editForm.ScriptName;
}
//saveDialog.FileName = editForm.FullPathName;
string strExtension = Path.GetExtension(editForm.FullPathName);
dialogresult = saveDialog.ShowDialog();
if (dialogresult == DialogResult.OK) {
editForm.FullPathName = saveDialog.FileName;
}
}
if (dialogresult == DialogResult.OK) {
editForm.SaveCurrentFile();
editForm.SaveCurrentFile();
UpdateRecentFileList(editForm.FullPathName);
return true;
}
@ -735,6 +762,7 @@ namespace LSLEditor
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
// Check if a LSLI or expanded LSL open is, and close that one as well
this.Close();
}
@ -1003,7 +1031,14 @@ namespace LSLEditor
}
ActivateMdiForm(editForm);
if (editForm.Dirty) {
DialogResult dialogResult = MessageBox.Show(this, @"Save """ + editForm.ScriptName + @"""?", "File has changed", MessageBoxButtons.YesNoCancel);
string scriptToSave = editForm.ScriptName;
if(Helpers.LSLIPathHelper.IsExpandedLSL(editForm.ScriptName))
{
// Expanded scripts will always be saved as LSLI's
scriptToSave = Helpers.LSLIPathHelper.CreateCollapsedScriptName(scriptToSave);
}
DialogResult dialogResult = MessageBox.Show(this, @"Save """ + scriptToSave + @"""?", "File has changed", MessageBoxButtons.YesNoCancel);
if (dialogResult == DialogResult.Cancel) {
return false;
}
@ -1018,7 +1053,14 @@ namespace LSLEditor
if (dialogResult == DialogResult.No) {
editForm.Dirty = false;
}
}
// Delete expanded file when closing
string expandedFile = Helpers.LSLIPathHelper.CreateExpandedPathAndScriptName(editForm.FullPathName);
if (File.Exists(expandedFile))
{
File.Delete(expandedFile);
}
}
CloseActiveWindow();
}
return true;
@ -1128,8 +1170,19 @@ namespace LSLEditor
if (editForm == null || editForm.IsDisposed) {
continue;
}
if (editForm.FullPathName == e.FullPathName) {
ActivateMdiForm(editForm);
if (!editForm.Visible)
{
if(Helpers.LSLIPathHelper.IsExpandedLSL(editForm.ScriptName) && GetForm(Helpers.LSLIPathHelper.CreateCollapsedScriptName(editForm.ScriptName)).Visible)
{
//SetReadOnly((EditForm) GetForm(Helpers.LSLIPathHelper.CreateCollapsedScriptName(editForm.ScriptName)), true); // Doesn't seem to work? Why?
EditForm LSLIForm = (EditForm)GetForm(Helpers.LSLIPathHelper.CreateCollapsedScriptName(editForm.ScriptName));
LSLIForm.Close();
}
editForm.Show();
}
ActivateMdiForm(editForm);
editForm.TextBox.Goto(e.Line, e.Char);
editForm.Focus();
return;
@ -1146,6 +1199,7 @@ namespace LSLEditor
this.SimulatorConsole = new SimulatorConsole(this.SolutionExplorer, this.Children);
this.SimulatorConsole.Show(dockPanel);
//TODO: Show Simulator Console somewhere
//this.panel1.Controls.Clear();
//this.panel1.Controls.Add(this.SimulatorConsole);
@ -1165,6 +1219,43 @@ namespace LSLEditor
this.SimulatorConsole = null;
}
/// <summary>
/// When running an LSLI script, a related expanded LSL script or LSLI readonly may be opened. These should not be ran/checked for syntax.
/// An LSLI script should also first be expanded to an LSL script before it checks for syntax.
/// </summary>
/// <param name="editForm"></param>
/// <returns></returns>
private EditForm SelectEditFormToRun(EditForm editForm)
{
if (Helpers.LSLIPathHelper.IsLSLI(editForm.ScriptName) && editForm.Visible && !IsReadOnly(editForm))
{
// Open and hide or select the expanded LSLI form
EditForm expandedForm = (EditForm)GetForm(Helpers.LSLIPathHelper.GetExpandedTabName(editForm.ScriptName));
if (expandedForm == null)
{
// Create the LSL
ExpandForm(editForm);
expandedForm = (EditForm)GetForm(Helpers.LSLIPathHelper.GetExpandedTabName(editForm.ScriptName));
editForm = expandedForm;
}
else
{
ExpandForm(editForm);
editForm.Close();
}
}
else if (Helpers.LSLIPathHelper.IsExpandedLSL(editForm.ScriptName))
{
// NOTE: WAAROM COLLAPSED HIJ HEM EERST? ZO VERWIJDERD HIJ DE VERANDERINGEN IN DE EXPANDED INCLUDE SECTIONS
//CollapseForm(editForm);
//EditForm collapsedForm = (EditForm)GetForm(Helpers.LSLIPathHelper.CreateCollapsedScriptName(editForm.ScriptName));
//ExpandForm(collapsedForm);
EditForm expandedForm = (EditForm)GetForm(Helpers.LSLIPathHelper.GetExpandedTabName(editForm.ScriptName));
editForm = expandedForm;
}
return editForm;
}
private bool SyntaxCheck(bool Silent)
{
//TODO: What do we hide on SyntaxCheck?
@ -1173,7 +1264,9 @@ namespace LSLEditor
foreach (Form form in this.Children) {
EditForm editForm = form as EditForm;
if (editForm == null || editForm.IsDisposed) {
editForm = SelectEditFormToRun(editForm);
if (editForm == null || editForm.IsDisposed || !editForm.Visible || IsReadOnly(editForm)) {
continue;
}
if (Properties.Settings.Default.AutoSaveOnDebug) {
@ -1344,7 +1437,8 @@ namespace LSLEditor
public void CloseActiveWindow()
{
if (this.IsMdiContainer) {
EditForm editForm = this.ActiveMdiForm as EditForm;
if (this.IsMdiContainer) {
if (this.ActiveMdiForm != null && !this.ActiveMdiForm.IsDisposed) {
this.ActiveMdiForm.Close();
}
@ -1745,7 +1839,21 @@ namespace LSLEditor
private void fileToolStripMenuItem_Click(object sender, EventArgs e)
{
SetupFileMenu();
EditForm editForm = this.ActiveMdiForm as EditForm;
if (editForm != null)
{
if (Helpers.LSLIPathHelper.IsLSLI(editForm.ScriptName) || Helpers.LSLIPathHelper.IsExpandedLSL(editForm.ScriptName))
{
toolStripMenuItem2.Enabled = true;
}
else
{
toolStripMenuItem2.Enabled = false;
}
}
SetupFileMenu();
}
private void forumStripMenuItem_Click(object sender, EventArgs e)
@ -1799,5 +1907,240 @@ namespace LSLEditor
Browser browser = GetBrowser();
browser.ShowWebBrowser("LSLEditor QA", Properties.Settings.Default.qasite);
}
}
/// <summary>
/// Gets a form based on it's form.Text property.
/// </summary>
/// <param name="formName"></param>
/// <returns>Returns null if not found</returns>
public Form GetForm(string formName)
{
EditForm desirableForm = null;
for (int i = 0; i < Children.Length; i++)
{
Form form = Children[i];
if (Helpers.LSLIPathHelper.TrimStarsAndWhiteSpace(form.Text) == formName)
{
desirableForm = (EditForm)form;
}
}
return desirableForm;
}
/// <summary>
/// Sets the readonly property of the textbox in the form
/// </summary>
/// <param name="form"></param>
/// <param name="isReadOnly"></param>
public void SetReadOnly(EditForm form, bool isReadOnly)
{
foreach (Control c in form.tabControl.SelectedTab.Controls)
{
if (c.GetType() == typeof(SplitContainer))
{
NumberedTextBox.NumberedTextBoxUC a = (NumberedTextBox.NumberedTextBoxUC)((SplitContainer)c).ActiveControl;
if(a != null)
{
a.TextBox.ReadOnly = isReadOnly;
}
}
}
}
/// <summary>
/// Gets the forms readonly property and returns it.
/// </summary>
/// <param name="form"></param>
/// <returns></returns>
public bool IsReadOnly(EditForm form)
{
foreach (Control c in form.tabControl.SelectedTab.Controls)
{
if (c.GetType() == typeof(SplitContainer))
{
NumberedTextBox.NumberedTextBoxUC a = (NumberedTextBox.NumberedTextBoxUC)((SplitContainer)c).ActiveControl;
if(a != null)
{
return a.TextBox.ReadOnly;
} else
{
return true;
}
}
}
return false;
}
/// <summary>
/// Expands an editform and opens it. Hides the LSLI
/// </summary>
/// <param name="editForm"></param>
public void ExpandForm(EditForm editForm)
{
if (editForm != null && Helpers.LSLIPathHelper.IsLSLI(editForm.ScriptName))
{
Helpers.LSLIConverter converter = new Helpers.LSLIConverter();
string lsl = converter.ExpandToLSL(editForm);
string file = Helpers.LSLIPathHelper.CreateExpandedPathAndScriptName(editForm.FullPathName);
EditForm oldExpandedForm = (EditForm)GetForm(Helpers.LSLIPathHelper.GetExpandedTabName(Helpers.LSLIPathHelper.CreateExpandedScriptName(editForm.ScriptName)));
// Check if the expanded form is already open. If so, then overwrite the content of it.
if (oldExpandedForm != null)//
{
oldExpandedForm.SourceCode = lsl;
//oldExpandedForm.TabIndex = editForm.TabIndex; // TODO: Keep tabIndex when expanding/collapsing the same
oldExpandedForm.Show();
SetReadOnly(oldExpandedForm, false);
oldExpandedForm.Dirty = editForm.Dirty;
}
else
{ // If not already open
Helpers.LSLIPathHelper.DeleteFile(file);
using (StreamWriter sw = new StreamWriter(file))
{
sw.Write(lsl);
}
Helpers.LSLIPathHelper.HideFile(file);
EditForm expandedForm = (EditForm)GetForm(Helpers.LSLIPathHelper.CreateExpandedScriptName(Path.GetFileName(file)));
if (expandedForm != null)
{
expandedForm.Close();
}
OpenFile(file);
EditForm lslForm = (EditForm)GetForm(Helpers.LSLIPathHelper.GetExpandedTabName(file));
lslForm.Dirty = editForm.Dirty;
}
editForm.Hide();
}
}
// Expand to LSL button (F11)
private void expandToLSLToolStripMenuItem_Click(object sender, EventArgs e)
{
EditForm editForm = this.ActiveMdiForm as EditForm;
ExpandForm(editForm);
}
public void CollapseForm(EditForm editForm)
{
if (editForm != null && Helpers.LSLIPathHelper.IsExpandedLSL(editForm.ScriptName))
{
Helpers.LSLIConverter converter = new Helpers.LSLIConverter();
Helpers.LSLIPathHelper.DeleteFile(editForm.FullPathName);
string lsli = converter.CollapseToLSLIFromEditform(editForm);
string file = Helpers.LSLIPathHelper.CreateCollapsedPathAndScriptName(editForm.FullPathName);
// Check if the LSLI form is already open (but hidden)
if (GetForm(Path.GetFileName(file)) != null)
{
EditForm LSLIform = (EditForm)GetForm(Path.GetFileName(file));
LSLIform.SourceCode = lsli;
LSLIform.Show();
SetReadOnly(LSLIform, false);
LSLIform.Dirty = editForm.Dirty;
}
else
{
OpenFile(file);
EditForm LSLIform = (EditForm)GetForm(Path.GetFileName(file));
LSLIform.SourceCode = lsli;
LSLIform.Dirty = editForm.Dirty;
}
if (GetForm(Path.GetFileName(file) + Helpers.LSLIPathHelper.READONLY_TAB_EXTENSION) != null) // if readonly is open, close it
{
GetForm(Path.GetFileName(file) + Helpers.LSLIPathHelper.READONLY_TAB_EXTENSION).Close();
}
editForm.Hide();
}
}
// Collapse to LSLI button (F10)
private void CollapseToLSLIToolStripMenuItem_Click(object sender, EventArgs e)
{
EditForm editForm = this.ActiveMdiForm as EditForm;
CollapseForm(editForm);
}
// View LSLI button (F12)
private void viewLSLIToolStripMenuItem_Click(object sender, EventArgs e)
{
EditForm editForm = this.ActiveMdiForm as EditForm;
if(editForm != null)
{
if (Helpers.LSLIPathHelper.IsLSLI(editForm.Text))
{
return;
}
string pathOfLSLI = Helpers.LSLIPathHelper.CreateCollapsedPathAndScriptName(editForm.FullPathName);
if (File.Exists(pathOfLSLI)) {
string tabText = Path.GetFileName(pathOfLSLI) + Helpers.LSLIPathHelper.READONLY_TAB_EXTENSION;
// If old LSLI readonly is open
Form OldReadOnlyLSLIform = GetForm(tabText);
if (OldReadOnlyLSLIform != null)
{
OldReadOnlyLSLIform.Close();
}
OpenFile(pathOfLSLI);
EditForm lsliForm = (EditForm) GetForm(Path.GetFileName(pathOfLSLI));
SetReadOnly(lsliForm, true);
lsliForm.AutoScroll = true;
lsliForm.Text = tabText;
}
else
{
MessageBox.Show("Error: No related LSLI file found. \n \"" + pathOfLSLI + "\"", "Oops...", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
// Export button (Ctrl+E)
private void toolStripMenuItem2_Click(object sender, EventArgs e)
{
StreamWriter streamWriter;
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
EditForm editForm = this.ActiveMdiForm as EditForm;
saveFileDialog1.Filter = "Secondlife script files (*.lsl)|*.lsl";
saveFileDialog1.FileName = Helpers.LSLIPathHelper.RemoveDotInFrontOfFilename(Helpers.LSLIPathHelper.RemoveExpandedSubExtension(
Path.GetFileNameWithoutExtension(editForm.ScriptName))) + Helpers.LSLIConverter.LSL_EXT;
saveFileDialog1.RestoreDirectory = true;
saveFileDialog1.Title = "Export to LSL";
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
if ((streamWriter = new StreamWriter(saveFileDialog1.OpenFile())) != null)
{
Helpers.LSLIConverter lsliConverter = new Helpers.LSLIConverter();
bool showBeginEnd = Properties.Settings.Default.ShowIncludeMetaData;
streamWriter.Write(lsliConverter.ExpandToLSL(editForm, showBeginEnd));
streamWriter.Close();
OpenFile(Path.GetFullPath(saveFileDialog1.FileName));
}
}
}
// New LSLI script button (Ctrl+M)
private void lSLIScriptToolStripMenuItem_Click(object sender, EventArgs e)
{
NewFile(true);
}
}
}

View file

@ -70,7 +70,7 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
//
[assembly: AssemblyVersion("2.55.0.124")]
[assembly: AssemblyVersion("2.55.0.1054")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
@ -100,4 +100,4 @@ using System.Runtime.InteropServices;
[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyName("")]
[assembly: ComVisibleAttribute(false)]
[assembly: AssemblyFileVersionAttribute("2.55.0.124")]
[assembly: AssemblyFileVersionAttribute("2.55.0.1054")]

View file

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.296
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -19,7 +19,7 @@ namespace LSLEditor.Properties {
// 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", "4.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
@ -60,6 +60,9 @@ namespace LSLEditor.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ADDITEM {
get {
object obj = ResourceManager.GetObject("ADDITEM", resourceCulture);
@ -67,6 +70,9 @@ namespace LSLEditor.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap COPY {
get {
object obj = ResourceManager.GetObject("COPY", resourceCulture);
@ -74,6 +80,9 @@ namespace LSLEditor.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap CUT {
get {
object obj = ResourceManager.GetObject("CUT", resourceCulture);
@ -81,6 +90,9 @@ namespace LSLEditor.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap DEINDENT {
get {
object obj = ResourceManager.GetObject("DEINDENT", resourceCulture);
@ -88,6 +100,9 @@ namespace LSLEditor.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap DELETE {
get {
object obj = ResourceManager.GetObject("DELETE", resourceCulture);
@ -95,6 +110,9 @@ namespace LSLEditor.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap END {
get {
object obj = ResourceManager.GetObject("END", resourceCulture);
@ -102,6 +120,19 @@ namespace LSLEditor.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap export_file_32 {
get {
object obj = ResourceManager.GetObject("export_file-32", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap FIND {
get {
object obj = ResourceManager.GetObject("FIND", resourceCulture);
@ -109,6 +140,9 @@ namespace LSLEditor.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ININDENT {
get {
object obj = ResourceManager.GetObject("ININDENT", resourceCulture);
@ -116,6 +150,9 @@ namespace LSLEditor.Properties {
}
}
/// <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);
@ -123,6 +160,9 @@ namespace LSLEditor.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap NEWDOC {
get {
object obj = ResourceManager.GetObject("NEWDOC", resourceCulture);
@ -130,6 +170,9 @@ namespace LSLEditor.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap NEWPROJ {
get {
object obj = ResourceManager.GetObject("NEWPROJ", resourceCulture);
@ -137,6 +180,9 @@ namespace LSLEditor.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap OPEN {
get {
object obj = ResourceManager.GetObject("OPEN", resourceCulture);
@ -144,6 +190,9 @@ namespace LSLEditor.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap PASTE {
get {
object obj = ResourceManager.GetObject("PASTE", resourceCulture);
@ -151,6 +200,9 @@ namespace LSLEditor.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap PRINT {
get {
object obj = ResourceManager.GetObject("PRINT", resourceCulture);
@ -158,6 +210,9 @@ namespace LSLEditor.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap PROJECT {
get {
object obj = ResourceManager.GetObject("PROJECT", resourceCulture);
@ -165,6 +220,9 @@ namespace LSLEditor.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap PROPS {
get {
object obj = ResourceManager.GetObject("PROPS", resourceCulture);
@ -172,6 +230,9 @@ namespace LSLEditor.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap REDO {
get {
object obj = ResourceManager.GetObject("REDO", resourceCulture);
@ -179,6 +240,9 @@ namespace LSLEditor.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap SAVE {
get {
object obj = ResourceManager.GetObject("SAVE", resourceCulture);
@ -186,6 +250,9 @@ namespace LSLEditor.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap SAVEAS {
get {
object obj = ResourceManager.GetObject("SAVEAS", resourceCulture);
@ -193,6 +260,9 @@ namespace LSLEditor.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap START {
get {
object obj = ResourceManager.GetObject("START", resourceCulture);
@ -200,6 +270,9 @@ namespace LSLEditor.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap UNDO {
get {
object obj = ResourceManager.GetObject("UNDO", resourceCulture);

View file

@ -118,47 +118,23 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.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="COPY" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\copy.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="logo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\logo.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ININDENT" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\inindent.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DELETE" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\delete.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="NEWPROJ" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\newproj.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PRINT" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\print.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="FIND" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\find.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SAVE" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\save.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="NEWDOC" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\newdoc.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DEINDENT" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\deindent.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PASTE" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\paste.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PROPS" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\props.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="END" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\end.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="OPEN" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\open.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="PROPS" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\props.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CUT" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\cut.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="FIND" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\find.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="UNDO" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\undo.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PROJECT" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\project.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -166,19 +142,47 @@
<data name="REDO" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\redo.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SAVEAS" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\saveas.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="logo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\logo.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="UNDO" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\undo.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="PASTE" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\paste.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="START" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\start.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="SAVE" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\save.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CUT" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\cut.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="DELETE" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\delete.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="OPEN" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\open.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ADDITEM" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\additem.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="NEWDOC" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\newdoc.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DEINDENT" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\deindent.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PRINT" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\print.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="START" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\start.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SAVEAS" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\saveas.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="NEWPROJ" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\newproj.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="COPY" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\copy.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="export_file-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\export_file-32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -8,6 +8,8 @@
// </auto-generated>
//------------------------------------------------------------------------------
using System.Collections.Generic;
namespace LSLEditor.Properties {
@ -257,6 +259,17 @@ namespace LSLEditor.Properties {
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("new.lsli")]
public string ExampleNameLSLI
{
get
{
return ((string)(this["ExampleNameLSLI"]));
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("ReleaseNotes.htm")]
@ -699,6 +712,36 @@ namespace LSLEditor.Properties {
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public List<string> IncludeDirectories
{
get
{
return ((List<string>)(this["IncludeDirectories"]));
}
set
{
this["IncludeDirectories"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool ShowIncludeMetaData
{
get
{
return ((bool)(this["ShowIncludeMetaData"]));
}
set
{
this["ShowIncludeMetaData"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]

View file

@ -5,11 +5,17 @@
<Words name="Strings" color="#A0A0A0" slcolor="#003300">
<Word name="regex">
<Word name="regex">
"[^"\\]* (?>\\.[^"\\]*)*"
</Word>
</Words>
<Words name="Includes" color="#A0A0A0" slcolor="#003300">
<Word name="//#BEGIN">
</Word>
<Word name="//#END">
</Word>
</Words>
<Words name="Operators" color="#777700" slcolor="#000000">
<Word name="regex">

View file

@ -8,6 +8,8 @@
</item>
<item name="Projects and Solutions" usercontrol="ProjectSettings">
<item name="General" usercontrol="ProjectSettings" />
<item name="Includes" usercontrol="ProjectIncludes" />
<item name="Exports LSL" usercontrol="IncludeExportSettings" />
</item>
<item name="Source Control" usercontrol="VersionControlGeneral">

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View file

@ -68,11 +68,13 @@ namespace LSLEditor
private string CSharpCode;
private EditForm editForm;
private bool GetNewHost()
private bool GetNewHost()
{
bool blnResult = false;
Assembly assembly = CompilerHelper.CompileCSharp(editForm, CSharpCode);
if (assembly != null) {
Assembly assembly = null;
assembly = CompilerHelper.CompileCSharp(editForm, CSharpCode);
if (assembly != null) {
if (SecondLifeHost != null) {
SecondLifeHost.Dispose();
}
@ -95,17 +97,54 @@ namespace LSLEditor
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);
ResetScriptEvent = new AutoResetEvent(false);
ResetScriptWatcher = new Thread(new ThreadStart(ResetScriptWatch));
ResetScriptWatcher.Name = "ResetScriptWatch";
ResetScriptWatcher.IsBackground = true;
ResetScriptWatcher.Start();
CSharpCode = MakeSharp(editForm.ConfLSL, editForm.SourceCode);
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();
}

View file

@ -38,16 +38,16 @@
// </summary>
using System;
using System.IO;
using System.Xml;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
using System.Xml;
namespace LSLEditor.Solution
{
public partial class SolutionExplorer : ToolWindow
public partial class SolutionExplorer : ToolWindow
{
public enum TypeSL : int
{
@ -89,6 +89,7 @@ namespace LSLEditor.Solution
Snapshot = 25,
Script = 26,
LSLIScript = 42,
Sound = 27,
Texture = 28,
@ -137,6 +138,7 @@ namespace LSLEditor.Solution
TypeSL.Snapshot,
TypeSL.Object,
TypeSL.Script,
TypeSL.LSLIScript,
TypeSL.Sound,
TypeSL.Texture
};
@ -222,7 +224,7 @@ namespace LSLEditor.Solution
imageList1 = new ImageList();
imageList1.TransparentColor = Color.Transparent;
for (int intI = 0; intI <= 41; intI++)
for (int intI = 0; intI <= 42; intI++)//41
{
TypeSL typeSL = (TypeSL)intI;
imageList1.Images.Add(intI.ToString(), new Bitmap(typeof(LSLEditorForm), "ImagesSolutionExplorer." + typeSL.ToString().Replace("_", " ") + ".gif"));
@ -586,6 +588,7 @@ namespace LSLEditor.Solution
}
RealTag rt = (RealTag)e.Node.Tag;
string oldName = rt.Name;
rt.Name = e.Node.Text;
e.Node.Tag = rt; // save name
EditForm editForm = GetEditForm(rt.Guid);
@ -594,7 +597,33 @@ namespace LSLEditor.Solution
editForm.FullPathName = strDestination; // GetFullPath(e.Node);
editForm.SaveCurrentFile();
}
return; // rename file complete
if (rt.ItemType == TypeSL.LSLIScript)
{
EditForm form = GetEditForm(rt.Guid);
if(form != null)
{
form.SaveCurrentFile();
form.Dirty = true;
form.Show();
// Get the expanded version of the form
string x = Helpers.LSLIPathHelper.GetExpandedTabName(Helpers.LSLIPathHelper.CreateExpandedScriptName(oldName));
EditForm xform = (EditForm)parent.GetForm(x);
if (xform != null && xform.Visible)
{
string src = xform.SourceCode;
xform.Dirty = false;
xform.Close();
form.SourceCode = src;
form.Dirty = true;
parent.ExpandForm(form);
}
}
}
return; // rename file complete
}
// rename directory
@ -1008,7 +1037,10 @@ namespace LSLEditor.Solution
{
case TypeSL.Script:
strExtension = ".lsl";
break;
break;
case TypeSL.LSLIScript:
strExtension = ".lsli";
break;
case TypeSL.Notecard:
strExtension = ".txt";
break;
@ -1043,10 +1075,13 @@ namespace LSLEditor.Solution
switch (typeFile)
{
case TypeSL.Script:
case TypeSL.Script:
sw.Write(AutoFormatter.ApplyFormatting(0,Helpers.GetTemplate.Source()));
break;
case TypeSL.Notecard:
case TypeSL.LSLIScript:
sw.Write(AutoFormatter.ApplyFormatting(0, Helpers.GetTemplate.Source()));
break;
case TypeSL.Notecard:
sw.Write("notecard");
break;
default:
@ -1057,11 +1092,11 @@ namespace LSLEditor.Solution
}
TreeNode newFile = new TreeNode(strNewName, (int)typeFile, (int)typeFile);
newFile.Tag = new RealTag(typeFile, strNewName, Guid.NewGuid());
newFile.Tag = new RealTag(typeFile, strNewName, Guid.NewGuid());
parent.Nodes.Add(newFile);
parent.Expand();
this.m_dirty = true;
this.m_dirty = true;
}
private void AddExistingFile(TreeNode parent, string strName, Guid guid)
@ -1694,7 +1729,7 @@ namespace LSLEditor.Solution
tn.BeginEdit();
}
private void CutAction(TreeNode tn)
private void CutAction(TreeNode tn)
{
if (CutObject != null)
CutObject.ForeColor = Color.Empty;
@ -1725,15 +1760,40 @@ namespace LSLEditor.Solution
timer.Tag = null;
Guid guid = ((RealTag)e.Node.Tag).Guid;
string path = GetFullPath(e.Node);
// already opened
EditForm editForm = GetEditForm(guid);
// already opened
EditForm editForm = GetEditForm(guid);
if (editForm != null)
{
TabPage tabPage = editForm.Tag as TabPage;
if (tabPage == null)
{
editForm.Focus();
if(editForm.Visible)
{
editForm.Focus();
} else
{
// Check if there's a related expanded lsl or lsli opened. If so, focus it. Else open the lsli.
EditForm expandedForm = (EditForm)parent.GetForm(Helpers.LSLIPathHelper.GetExpandedTabName(Helpers.LSLIPathHelper.CreateExpandedScriptName(Path.GetFileName(path))));
EditForm collapsedForm = (EditForm)parent.GetForm(Helpers.LSLIPathHelper.CreateCollapsedScriptName(Path.GetFileName(path)));
if (expandedForm != null && expandedForm.Visible)
{
expandedForm.Focus();
}
else if (collapsedForm != null && collapsedForm.Visible)
{
collapsedForm.Focus();
}
else
{
// Open a new one
if (GetTypeSL(e.Node) == TypeSL.Script || GetTypeSL(e.Node) == TypeSL.LSLIScript)
{
this.parent.OpenFile(GetFullPath(e.Node), guid, true);
}
}
}
}
else
{
@ -1744,9 +1804,37 @@ namespace LSLEditor.Solution
return;
}
// open a new one
if (GetTypeSL(e.Node) == TypeSL.Script)
this.parent.OpenFile(GetFullPath(e.Node), guid, true);
// Check if it's an lsli that has an open expanded form
if (GetTypeSL(e.Node) == TypeSL.Script || GetTypeSL(e.Node) == TypeSL.LSLIScript)
{
if (Helpers.LSLIPathHelper.IsLSLI(path)) {
// Check if there's a related expanded lsl opened. If so, focus it. Else open the lsli.
EditForm expandedForm = (EditForm)parent.GetForm(Helpers.LSLIPathHelper.GetExpandedTabName(Helpers.LSLIPathHelper.CreateExpandedScriptName(Path.GetFileName(path))));
EditForm collapsedForm = (EditForm)parent.GetForm(Helpers.LSLIPathHelper.CreateCollapsedScriptName(Path.GetFileName(path)));
if (expandedForm != null && expandedForm.Visible)
{
expandedForm.Focus();
} else if(collapsedForm != null && collapsedForm.Visible)
{
collapsedForm.Focus();
} else
{
// Open a new one
if (GetTypeSL(e.Node) == TypeSL.Script || GetTypeSL(e.Node) == TypeSL.LSLIScript)
{
this.parent.OpenFile(GetFullPath(e.Node), guid, true);
}
}
} else
{
// Open a new one
if (GetTypeSL(e.Node) == TypeSL.Script || GetTypeSL(e.Node) == TypeSL.LSLIScript)
{
this.parent.OpenFile(GetFullPath(e.Node), guid, true);
}
}
}
if (GetTypeSL(e.Node) == TypeSL.Notecard)
this.parent.OpenFile(GetFullPath(e.Node), guid, false);
}

717
trunk/StyleCop.Cache Normal file
View file

@ -0,0 +1,717 @@
<stylecopresultscache>
<version>12</version>
<sourcecode name="SecondLifeHost.cs" parser="StyleCop.CSharp.CsParser">
<timestamps>
<styleCop>2017-09-21 13:07:48.197</styleCop>
<settingsFile>2017-09-21 13:07:48.180</settingsFile>
<sourceFile>2017-10-03 11:30:44.634</sourceFile>
<parser>2017-09-21 13:07:48.197</parser>
<StyleCop.CSharp.DocumentationRules>2017-09-21 13:07:48.197</StyleCop.CSharp.DocumentationRules>
<StyleCop.CSharp.DocumentationRules.FilesHashCode>0</StyleCop.CSharp.DocumentationRules.FilesHashCode>
<StyleCop.CSharp.LayoutRules>2017-09-21 13:07:48.197</StyleCop.CSharp.LayoutRules>
<StyleCop.CSharp.LayoutRules.FilesHashCode>0</StyleCop.CSharp.LayoutRules.FilesHashCode>
<StyleCop.CSharp.MaintainabilityRules>2017-09-21 13:07:48.197</StyleCop.CSharp.MaintainabilityRules>
<StyleCop.CSharp.MaintainabilityRules.FilesHashCode>0</StyleCop.CSharp.MaintainabilityRules.FilesHashCode>
<StyleCop.CSharp.NamingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.NamingRules>
<StyleCop.CSharp.NamingRules.FilesHashCode>0</StyleCop.CSharp.NamingRules.FilesHashCode>
<StyleCop.CSharp.OrderingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.OrderingRules>
<StyleCop.CSharp.OrderingRules.FilesHashCode>0</StyleCop.CSharp.OrderingRules.FilesHashCode>
<StyleCop.CSharp.ReadabilityRules>2017-09-21 13:07:48.197</StyleCop.CSharp.ReadabilityRules>
<StyleCop.CSharp.ReadabilityRules.FilesHashCode>0</StyleCop.CSharp.ReadabilityRules.FilesHashCode>
<StyleCop.CSharp.SpacingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.SpacingRules>
<StyleCop.CSharp.SpacingRules.FilesHashCode>0</StyleCop.CSharp.SpacingRules.FilesHashCode>
</timestamps>
<violations>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="FileHeaderFileNameDocumentationMustMatchTypeName" ruleCheckId="SA1649">
<context>The file attribute in the file header's copyright tag must contain the name of the first type in the file and can be any of these: "SecondLifeHostEventArgs"</context>
<line>1</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="DocumentationTextMustEndWithAPeriod" ruleCheckId="SA1629">
<context>The documentation text within the summary tag must end with a period.</context>
<line>173</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="DocumentationTextMustEndWithAPeriod" ruleCheckId="SA1629">
<context>The documentation text within the summary tag must end with a period.</context>
<line>188</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="DocumentationTextMustBeginWithACapitalLetter" ruleCheckId="SA1628">
<context>The documentation text within the summary tag must begin with a capital letter.</context>
<line>188</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="DocumentationTextMustMeetMinimumCharacterLength" ruleCheckId="SA1632">
<context>The documentation text within the summary tag must be at least 10 characters in length. Documentation failing to meet this guideline most likely does not follow a proper grammatical structure required for documentation text.</context>
<line>188</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="DocumentationTextMustEndWithAPeriod" ruleCheckId="SA1629">
<context>The documentation text within the summary tag must end with a period.</context>
<line>203</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="DocumentationTextMustEndWithAPeriod" ruleCheckId="SA1629">
<context>The documentation text within the param tag must end with a period.</context>
<line>313</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="DocumentationTextMustEndWithAPeriod" ruleCheckId="SA1629">
<context>The documentation text within the summary tag must end with a period.</context>
<line>350</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementReturnValueDocumentationMustHaveText" ruleCheckId="SA1616">
<context>The returns section in the documentation header must not be empty.</context>
<line>423</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="DocumentationTextMustEndWithAPeriod" ruleCheckId="SA1629">
<context>The documentation text within the summary tag must end with a period.</context>
<line>496</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="DocumentationTextMustBeginWithACapitalLetter" ruleCheckId="SA1628">
<context>The documentation text within the param tag must begin with a capital letter.</context>
<line>581</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ConstructorSummaryDocumentationMustBeginWithStandardText" ruleCheckId="SA1642">
<context>The documentation text within the constructor's summary tag must begin with the text: Initialises a new instance of the &lt;see cref="Link" /&gt; struct.</context>
<line>581</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ConstructorSummaryDocumentationMustBeginWithStandardText" ruleCheckId="SA1642">
<context>The documentation text within the constructor's summary tag must begin with the text: Initialises a new instance of the &lt;see cref="ListenFilter" /&gt; struct.</context>
<line>666</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="DocumentationTextMustEndWithAPeriod" ruleCheckId="SA1629">
<context>The documentation text within the summary tag must end with a period.</context>
<line>681</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="DocumentationTextMustEndWithAPeriod" ruleCheckId="SA1629">
<context>The documentation text within the summary tag must end with a period.</context>
<line>767</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="DocumentationTextMustBeginWithACapitalLetter" ruleCheckId="SA1628">
<context>The documentation text within the summary tag must begin with a capital letter.</context>
<line>767</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="DocumentationTextMustEndWithAPeriod" ruleCheckId="SA1629">
<context>The documentation text within the summary tag must end with a period.</context>
<line>812</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="DocumentationTextMustBeginWithACapitalLetter" ruleCheckId="SA1628">
<context>The documentation text within the summary tag must begin with a capital letter.</context>
<line>812</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="DocumentationTextMustMeetMinimumCharacterLength" ruleCheckId="SA1632">
<context>The documentation text within the summary tag must be at least 10 characters in length. Documentation failing to meet this guideline most likely does not follow a proper grammatical structure required for documentation text.</context>
<line>812</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>824</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementReturnValueDocumentationMustHaveText" ruleCheckId="SA1616">
<context>The returns section in the documentation header must not be empty.</context>
<line>824</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>854</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>892</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>909</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>928</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>951</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>988</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1005</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1026</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1043</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1057</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1074</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1094</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1109</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1115</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1145</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1153</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1165</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1188</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementReturnValueDocumentationMustHaveText" ruleCheckId="SA1616">
<context>The returns section in the documentation header must not be empty.</context>
<line>1188</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1209</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1226</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementReturnValueDocumentationMustHaveText" ruleCheckId="SA1616">
<context>The returns section in the documentation header must not be empty.</context>
<line>1226</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1249</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1254</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1278</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1296</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1315</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="DocumentationTextMustEndWithAPeriod" ruleCheckId="SA1629">
<context>The documentation text within the summary tag must end with a period.</context>
<line>1335</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="DocumentationTextMustBeginWithACapitalLetter" ruleCheckId="SA1628">
<context>The documentation text within the summary tag must begin with a capital letter.</context>
<line>1335</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementReturnValueDocumentationMustHaveText" ruleCheckId="SA1616">
<context>The returns section in the documentation header must not be empty.</context>
<line>1335</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="DocumentationTextMustEndWithAPeriod" ruleCheckId="SA1629">
<context>The documentation text within the summary tag must end with a period.</context>
<line>1348</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="DocumentationTextMustBeginWithACapitalLetter" ruleCheckId="SA1628">
<context>The documentation text within the summary tag must begin with a capital letter.</context>
<line>1348</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1366</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementReturnValueDocumentationMustHaveText" ruleCheckId="SA1616">
<context>The returns section in the documentation header must not be empty.</context>
<line>1366</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1376</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementReturnValueDocumentationMustHaveText" ruleCheckId="SA1616">
<context>The returns section in the documentation header must not be empty.</context>
<line>1376</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1385</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1397</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementReturnValueDocumentationMustHaveText" ruleCheckId="SA1616">
<context>The returns section in the documentation header must not be empty.</context>
<line>1397</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1411</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementReturnValueDocumentationMustHaveText" ruleCheckId="SA1616">
<context>The returns section in the documentation header must not be empty.</context>
<line>1411</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1420</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1431</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementReturnValueDocumentationMustHaveText" ruleCheckId="SA1616">
<context>The returns section in the documentation header must not be empty.</context>
<line>1431</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1449</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementReturnValueDocumentationMustHaveText" ruleCheckId="SA1616">
<context>The returns section in the documentation header must not be empty.</context>
<line>1449</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1464</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementReturnValueDocumentationMustHaveText" ruleCheckId="SA1616">
<context>The returns section in the documentation header must not be empty.</context>
<line>1464</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1478</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementReturnValueDocumentationMustHaveText" ruleCheckId="SA1616">
<context>The returns section in the documentation header must not be empty.</context>
<line>1478</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1492</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementReturnValueDocumentationMustHaveText" ruleCheckId="SA1616">
<context>The returns section in the documentation header must not be empty.</context>
<line>1492</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1502</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementReturnValueDocumentationMustHaveText" ruleCheckId="SA1616">
<context>The returns section in the documentation header must not be empty.</context>
<line>1502</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1511</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1521</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementReturnValueDocumentationMustHaveText" ruleCheckId="SA1616">
<context>The returns section in the documentation header must not be empty.</context>
<line>1521</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementDocumentationMustHaveSummaryText" ruleCheckId="SA1606">
<context>The summary section in the documentation header must not be empty.</context>
<line>1535</line>
<warning>False</warning>
</violation>
</violations>
</sourcecode>
<sourcecode name="About.cs" parser="StyleCop.CSharp.CsParser">
<timestamps>
<styleCop>2017-09-21 13:07:48.197</styleCop>
<settingsFile>2017-09-21 13:07:48.180</settingsFile>
<sourceFile>2017-09-20 09:46:59.865</sourceFile>
<parser>2017-09-21 13:07:48.197</parser>
<StyleCop.CSharp.DocumentationRules>2017-09-21 13:07:48.197</StyleCop.CSharp.DocumentationRules>
<StyleCop.CSharp.DocumentationRules.FilesHashCode>0</StyleCop.CSharp.DocumentationRules.FilesHashCode>
<StyleCop.CSharp.LayoutRules>2017-09-21 13:07:48.197</StyleCop.CSharp.LayoutRules>
<StyleCop.CSharp.LayoutRules.FilesHashCode>0</StyleCop.CSharp.LayoutRules.FilesHashCode>
<StyleCop.CSharp.MaintainabilityRules>2017-09-21 13:07:48.197</StyleCop.CSharp.MaintainabilityRules>
<StyleCop.CSharp.MaintainabilityRules.FilesHashCode>0</StyleCop.CSharp.MaintainabilityRules.FilesHashCode>
<StyleCop.CSharp.NamingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.NamingRules>
<StyleCop.CSharp.NamingRules.FilesHashCode>0</StyleCop.CSharp.NamingRules.FilesHashCode>
<StyleCop.CSharp.OrderingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.OrderingRules>
<StyleCop.CSharp.OrderingRules.FilesHashCode>0</StyleCop.CSharp.OrderingRules.FilesHashCode>
<StyleCop.CSharp.ReadabilityRules>2017-09-21 13:07:48.197</StyleCop.CSharp.ReadabilityRules>
<StyleCop.CSharp.ReadabilityRules.FilesHashCode>0</StyleCop.CSharp.ReadabilityRules.FilesHashCode>
<StyleCop.CSharp.SpacingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.SpacingRules>
<StyleCop.CSharp.SpacingRules.FilesHashCode>0</StyleCop.CSharp.SpacingRules.FilesHashCode>
</timestamps>
<violations />
</sourcecode>
<sourcecode name="Float.cs" parser="StyleCop.CSharp.CsParser">
<timestamps>
<styleCop>2017-09-21 13:07:48.197</styleCop>
<settingsFile>2017-09-21 13:07:48.180</settingsFile>
<sourceFile>2017-09-20 09:46:59.967</sourceFile>
<parser>2017-09-21 13:07:48.197</parser>
<StyleCop.CSharp.DocumentationRules>2017-09-21 13:07:48.197</StyleCop.CSharp.DocumentationRules>
<StyleCop.CSharp.DocumentationRules.FilesHashCode>0</StyleCop.CSharp.DocumentationRules.FilesHashCode>
<StyleCop.CSharp.LayoutRules>2017-09-21 13:07:48.197</StyleCop.CSharp.LayoutRules>
<StyleCop.CSharp.LayoutRules.FilesHashCode>0</StyleCop.CSharp.LayoutRules.FilesHashCode>
<StyleCop.CSharp.MaintainabilityRules>2017-09-21 13:07:48.197</StyleCop.CSharp.MaintainabilityRules>
<StyleCop.CSharp.MaintainabilityRules.FilesHashCode>0</StyleCop.CSharp.MaintainabilityRules.FilesHashCode>
<StyleCop.CSharp.NamingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.NamingRules>
<StyleCop.CSharp.NamingRules.FilesHashCode>0</StyleCop.CSharp.NamingRules.FilesHashCode>
<StyleCop.CSharp.OrderingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.OrderingRules>
<StyleCop.CSharp.OrderingRules.FilesHashCode>0</StyleCop.CSharp.OrderingRules.FilesHashCode>
<StyleCop.CSharp.ReadabilityRules>2017-09-21 13:07:48.197</StyleCop.CSharp.ReadabilityRules>
<StyleCop.CSharp.ReadabilityRules.FilesHashCode>0</StyleCop.CSharp.ReadabilityRules.FilesHashCode>
<StyleCop.CSharp.SpacingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.SpacingRules>
<StyleCop.CSharp.SpacingRules.FilesHashCode>0</StyleCop.CSharp.SpacingRules.FilesHashCode>
</timestamps>
<violations />
</sourcecode>
<sourcecode name="LSL_Constants.cs" parser="StyleCop.CSharp.CsParser">
<timestamps>
<styleCop>2017-09-21 13:07:48.197</styleCop>
<settingsFile>2017-09-21 13:07:48.180</settingsFile>
<sourceFile>2017-09-20 09:46:59.967</sourceFile>
<parser>2017-09-21 13:07:48.197</parser>
<StyleCop.CSharp.DocumentationRules>2017-09-21 13:07:48.197</StyleCop.CSharp.DocumentationRules>
<StyleCop.CSharp.DocumentationRules.FilesHashCode>0</StyleCop.CSharp.DocumentationRules.FilesHashCode>
<StyleCop.CSharp.LayoutRules>2017-09-21 13:07:48.197</StyleCop.CSharp.LayoutRules>
<StyleCop.CSharp.LayoutRules.FilesHashCode>0</StyleCop.CSharp.LayoutRules.FilesHashCode>
<StyleCop.CSharp.MaintainabilityRules>2017-09-21 13:07:48.197</StyleCop.CSharp.MaintainabilityRules>
<StyleCop.CSharp.MaintainabilityRules.FilesHashCode>0</StyleCop.CSharp.MaintainabilityRules.FilesHashCode>
<StyleCop.CSharp.NamingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.NamingRules>
<StyleCop.CSharp.NamingRules.FilesHashCode>0</StyleCop.CSharp.NamingRules.FilesHashCode>
<StyleCop.CSharp.OrderingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.OrderingRules>
<StyleCop.CSharp.OrderingRules.FilesHashCode>0</StyleCop.CSharp.OrderingRules.FilesHashCode>
<StyleCop.CSharp.ReadabilityRules>2017-09-21 13:07:48.197</StyleCop.CSharp.ReadabilityRules>
<StyleCop.CSharp.ReadabilityRules.FilesHashCode>0</StyleCop.CSharp.ReadabilityRules.FilesHashCode>
<StyleCop.CSharp.SpacingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.SpacingRules>
<StyleCop.CSharp.SpacingRules.FilesHashCode>0</StyleCop.CSharp.SpacingRules.FilesHashCode>
</timestamps>
<violations />
</sourcecode>
<sourcecode name="LSL_Events.cs" parser="StyleCop.CSharp.CsParser">
<timestamps>
<styleCop>2017-09-21 13:07:48.197</styleCop>
<settingsFile>2017-09-21 13:07:48.180</settingsFile>
<sourceFile>2017-09-20 09:46:59.967</sourceFile>
<parser>2017-09-21 13:07:48.197</parser>
<StyleCop.CSharp.DocumentationRules>2017-09-21 13:07:48.197</StyleCop.CSharp.DocumentationRules>
<StyleCop.CSharp.DocumentationRules.FilesHashCode>0</StyleCop.CSharp.DocumentationRules.FilesHashCode>
<StyleCop.CSharp.LayoutRules>2017-09-21 13:07:48.197</StyleCop.CSharp.LayoutRules>
<StyleCop.CSharp.LayoutRules.FilesHashCode>0</StyleCop.CSharp.LayoutRules.FilesHashCode>
<StyleCop.CSharp.MaintainabilityRules>2017-09-21 13:07:48.197</StyleCop.CSharp.MaintainabilityRules>
<StyleCop.CSharp.MaintainabilityRules.FilesHashCode>0</StyleCop.CSharp.MaintainabilityRules.FilesHashCode>
<StyleCop.CSharp.NamingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.NamingRules>
<StyleCop.CSharp.NamingRules.FilesHashCode>0</StyleCop.CSharp.NamingRules.FilesHashCode>
<StyleCop.CSharp.OrderingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.OrderingRules>
<StyleCop.CSharp.OrderingRules.FilesHashCode>0</StyleCop.CSharp.OrderingRules.FilesHashCode>
<StyleCop.CSharp.ReadabilityRules>2017-09-21 13:07:48.197</StyleCop.CSharp.ReadabilityRules>
<StyleCop.CSharp.ReadabilityRules.FilesHashCode>0</StyleCop.CSharp.ReadabilityRules.FilesHashCode>
<StyleCop.CSharp.SpacingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.SpacingRules>
<StyleCop.CSharp.SpacingRules.FilesHashCode>0</StyleCop.CSharp.SpacingRules.FilesHashCode>
</timestamps>
<violations />
</sourcecode>
<sourcecode name="LSL_Functions.cs" parser="StyleCop.CSharp.CsParser">
<timestamps>
<styleCop>2017-09-21 13:07:48.197</styleCop>
<settingsFile>2017-09-21 13:07:48.180</settingsFile>
<sourceFile>2017-10-03 11:30:44.622</sourceFile>
<parser>2017-09-21 13:07:48.197</parser>
<StyleCop.CSharp.DocumentationRules>2017-09-21 13:07:48.197</StyleCop.CSharp.DocumentationRules>
<StyleCop.CSharp.DocumentationRules.FilesHashCode>0</StyleCop.CSharp.DocumentationRules.FilesHashCode>
<StyleCop.CSharp.LayoutRules>2017-09-21 13:07:48.197</StyleCop.CSharp.LayoutRules>
<StyleCop.CSharp.LayoutRules.FilesHashCode>0</StyleCop.CSharp.LayoutRules.FilesHashCode>
<StyleCop.CSharp.MaintainabilityRules>2017-09-21 13:07:48.197</StyleCop.CSharp.MaintainabilityRules>
<StyleCop.CSharp.MaintainabilityRules.FilesHashCode>0</StyleCop.CSharp.MaintainabilityRules.FilesHashCode>
<StyleCop.CSharp.NamingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.NamingRules>
<StyleCop.CSharp.NamingRules.FilesHashCode>0</StyleCop.CSharp.NamingRules.FilesHashCode>
<StyleCop.CSharp.OrderingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.OrderingRules>
<StyleCop.CSharp.OrderingRules.FilesHashCode>0</StyleCop.CSharp.OrderingRules.FilesHashCode>
<StyleCop.CSharp.ReadabilityRules>2017-09-21 13:07:48.197</StyleCop.CSharp.ReadabilityRules>
<StyleCop.CSharp.ReadabilityRules.FilesHashCode>0</StyleCop.CSharp.ReadabilityRules.FilesHashCode>
<StyleCop.CSharp.SpacingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.SpacingRules>
<StyleCop.CSharp.SpacingRules.FilesHashCode>0</StyleCop.CSharp.SpacingRules.FilesHashCode>
</timestamps>
<violations />
</sourcecode>
<sourcecode name="SecondLifeMain.cs" parser="StyleCop.CSharp.CsParser">
<timestamps>
<styleCop>2017-09-21 13:07:48.197</styleCop>
<settingsFile>2017-09-21 13:07:48.180</settingsFile>
<sourceFile>2017-09-20 09:46:59.969</sourceFile>
<parser>2017-09-21 13:07:48.197</parser>
<StyleCop.CSharp.DocumentationRules>2017-09-21 13:07:48.197</StyleCop.CSharp.DocumentationRules>
<StyleCop.CSharp.DocumentationRules.FilesHashCode>0</StyleCop.CSharp.DocumentationRules.FilesHashCode>
<StyleCop.CSharp.LayoutRules>2017-09-21 13:07:48.197</StyleCop.CSharp.LayoutRules>
<StyleCop.CSharp.LayoutRules.FilesHashCode>0</StyleCop.CSharp.LayoutRules.FilesHashCode>
<StyleCop.CSharp.MaintainabilityRules>2017-09-21 13:07:48.197</StyleCop.CSharp.MaintainabilityRules>
<StyleCop.CSharp.MaintainabilityRules.FilesHashCode>0</StyleCop.CSharp.MaintainabilityRules.FilesHashCode>
<StyleCop.CSharp.NamingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.NamingRules>
<StyleCop.CSharp.NamingRules.FilesHashCode>0</StyleCop.CSharp.NamingRules.FilesHashCode>
<StyleCop.CSharp.OrderingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.OrderingRules>
<StyleCop.CSharp.OrderingRules.FilesHashCode>0</StyleCop.CSharp.OrderingRules.FilesHashCode>
<StyleCop.CSharp.ReadabilityRules>2017-09-21 13:07:48.197</StyleCop.CSharp.ReadabilityRules>
<StyleCop.CSharp.ReadabilityRules.FilesHashCode>0</StyleCop.CSharp.ReadabilityRules.FilesHashCode>
<StyleCop.CSharp.SpacingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.SpacingRules>
<StyleCop.CSharp.SpacingRules.FilesHashCode>0</StyleCop.CSharp.SpacingRules.FilesHashCode>
</timestamps>
<violations />
</sourcecode>
<project key="899059069">
<configuration>DEBUG;TRACE</configuration>
</project>
<sourcecode name="LSLIConverter.cs" parser="StyleCop.CSharp.CsParser">
<timestamps>
<styleCop>2017-09-21 13:07:48.197</styleCop>
<settingsFile>2017-09-21 13:07:48.180</settingsFile>
<sourceFile>2017-10-05 14:15:45.007</sourceFile>
<parser>2017-09-21 13:07:48.197</parser>
<StyleCop.CSharp.DocumentationRules>2017-09-21 13:07:48.197</StyleCop.CSharp.DocumentationRules>
<StyleCop.CSharp.DocumentationRules.FilesHashCode>0</StyleCop.CSharp.DocumentationRules.FilesHashCode>
<StyleCop.CSharp.LayoutRules>2017-09-21 13:07:48.197</StyleCop.CSharp.LayoutRules>
<StyleCop.CSharp.LayoutRules.FilesHashCode>0</StyleCop.CSharp.LayoutRules.FilesHashCode>
<StyleCop.CSharp.MaintainabilityRules>2017-09-21 13:07:48.197</StyleCop.CSharp.MaintainabilityRules>
<StyleCop.CSharp.MaintainabilityRules.FilesHashCode>0</StyleCop.CSharp.MaintainabilityRules.FilesHashCode>
<StyleCop.CSharp.NamingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.NamingRules>
<StyleCop.CSharp.NamingRules.FilesHashCode>0</StyleCop.CSharp.NamingRules.FilesHashCode>
<StyleCop.CSharp.OrderingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.OrderingRules>
<StyleCop.CSharp.OrderingRules.FilesHashCode>0</StyleCop.CSharp.OrderingRules.FilesHashCode>
<StyleCop.CSharp.ReadabilityRules>2017-09-21 13:07:48.197</StyleCop.CSharp.ReadabilityRules>
<StyleCop.CSharp.ReadabilityRules.FilesHashCode>0</StyleCop.CSharp.ReadabilityRules.FilesHashCode>
<StyleCop.CSharp.SpacingRules>2017-09-21 13:07:48.197</StyleCop.CSharp.SpacingRules>
<StyleCop.CSharp.SpacingRules.FilesHashCode>0</StyleCop.CSharp.SpacingRules.FilesHashCode>
</timestamps>
<violations>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="FileHeaderFileNameDocumentationMustMatchTypeName" ruleCheckId="SA1649">
<context>The file attribute in the file header's copyright tag must contain the name of the first type in the file and can be any of these: "LSLIConverter"</context>
<line>1</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementsMustBeDocumented" ruleCheckId="SA1600">
<context>The class must have a documentation header.</context>
<line>48</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.LayoutRules" rule="SingleLineCommentsMustNotBeFollowedByBlankLine" ruleCheckId="SA1512">
<context>A single-line comment must not be followed by a blank line. To ignore this error when commenting out a line of code, begin the comment with '////' rather than '//'.</context>
<line>123</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.MaintainabilityRules" rule="AccessModifierMustBeDeclared" ruleCheckId="SA1400">
<context>The class must have an access modifier.</context>
<line>48</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.SpacingRules" rule="SingleLineCommentsMustBeginWithSingleSpace" ruleCheckId="SA1005">
<context>The comment must start with a single space. To ignore this error when commenting out a line of code, begin the comment with '////' rather than '//'.</context>
<line>119</line>
<index>5147</index>
<endIndex>5167</endIndex>
<startLine>119</startLine>
<startColumn>9</startColumn>
<endLine>119</endLine>
<endColumn>29</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.SpacingRules" rule="SingleLineCommentsMustBeginWithSingleSpace" ruleCheckId="SA1005">
<context>The comment must start with a single space. To ignore this error when commenting out a line of code, begin the comment with '////' rather than '//'.</context>
<line>122</line>
<index>5276</index>
<endIndex>5286</endIndex>
<startLine>122</startLine>
<startColumn>9</startColumn>
<endLine>122</endLine>
<endColumn>19</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.SpacingRules" rule="SingleLineCommentsMustBeginWithSingleSpace" ruleCheckId="SA1005">
<context>The comment must start with a single space. To ignore this error when commenting out a line of code, begin the comment with '////' rather than '//'.</context>
<line>123</line>
<index>5297</index>
<endIndex>5302</endIndex>
<startLine>123</startLine>
<startColumn>9</startColumn>
<endLine>123</endLine>
<endColumn>14</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementsMustBeDocumented" ruleCheckId="SA1600">
<context>The field must have a documentation header.</context>
<line>50</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementsMustBeDocumented" ruleCheckId="SA1600">
<context>The field must have a documentation header.</context>
<line>51</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementsMustBeDocumented" ruleCheckId="SA1600">
<context>The field must have a documentation header.</context>
<line>52</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementsMustBeDocumented" ruleCheckId="SA1600">
<context>The constructor must have a documentation header.</context>
<line>54</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.LayoutRules" rule="OpeningCurlyBracketsMustNotBeFollowedByBlankLine" ruleCheckId="SA1505">
<context>An opening curly bracket must not be followed by a blank line.</context>
<line>55</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.LayoutRules" rule="ClosingCurlyBracketsMustNotBePrecededByBlankLine" ruleCheckId="SA1508">
<context>A closing curly bracket must not be preceded by a blank line.</context>
<line>57</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementsMustBeDocumented" ruleCheckId="SA1600">
<context>The method must have a documentation header.</context>
<line>59</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.LayoutRules" rule="SingleLineCommentsMustNotBeFollowedByBlankLine" ruleCheckId="SA1512">
<context>A single-line comment must not be followed by a blank line. To ignore this error when commenting out a line of code, begin the comment with '////' rather than '//'.</context>
<line>77</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.LayoutRules" rule="CodeMustNotContainMultipleBlankLinesInARow" ruleCheckId="SA1507">
<context>The code must not contain multiple blank lines in a row.</context>
<line>88</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.ReadabilityRules" rule="BlockStatementsMustNotContainEmbeddedComments" ruleCheckId="SA1108">
<context>A comment may not be placed within the bracketed statement.</context>
<line>79</line>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.SpacingRules" rule="KeywordsMustBeSpacedCorrectly" ruleCheckId="SA1000">
<context>The spacing around the keyword 'using' is invalid.</context>
<line>91</line>
<index>4105</index>
<endIndex>4109</endIndex>
<startLine>91</startLine>
<startColumn>21</startColumn>
<endLine>91</endLine>
<endColumn>25</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.SpacingRules" rule="KeywordsMustBeSpacedCorrectly" ruleCheckId="SA1000">
<context>The spacing around the keyword 'if' is invalid.</context>
<line>105</line>
<index>4690</index>
<endIndex>4691</endIndex>
<startLine>105</startLine>
<startColumn>21</startColumn>
<endLine>105</endLine>
<endColumn>22</endColumn>
<warning>False</warning>
</violation>
<violation namespace="StyleCop.CSharp.DocumentationRules" rule="ElementsMustBeDocumented" ruleCheckId="SA1600">
<context>The method must have a documentation header.</context>
<line>125</line>
<warning>False</warning>
</violation>
</violations>
</sourcecode>
</stylecopresultscache>

View file

@ -0,0 +1,74 @@
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

@ -0,0 +1,25 @@
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

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

139
trunk/Tools/ProjectIncludes.Designer.cs generated Normal file
View file

@ -0,0 +1,139 @@
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

@ -0,0 +1,107 @@
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;
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 = 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

@ -0,0 +1,123 @@
<?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

@ -32,7 +32,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
<PublishUrl>C:\Users\User\Desktop\Workspace_Jasper\LSL_editor\published\</PublishUrl>
<PublishUrl>C:\Users\User\Desktop\Workspace_Jasper\LSL_editor\Published LSLEditor\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
@ -43,7 +43,7 @@
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<AutorunEnabled>true</AutorunEnabled>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationRevision>10</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
@ -108,6 +108,9 @@
<PropertyGroup>
<ManifestKeyFile>lsleditor_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>true</GenerateManifests>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll</HintPath>
@ -343,9 +346,11 @@
<Compile Include="Helpers\HTTPRequest.cs">
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
<Compile Include="Helpers\LSLIConverter.cs" />
<Compile Include="Helpers\OutlineHelper.cs">
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
<Compile Include="Helpers\LSLIPathHelper.cs" />
<Compile Include="Helpers\SendMyKeys.cs">
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
@ -653,6 +658,18 @@
<DependentUpon>EnvironmentPlugins.cs</DependentUpon>
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
<Compile Include="Tools\IncludeExportSettings.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Tools\IncludeExportSettings.Designer.cs">
<DependentUpon>IncludeExportSettings.cs</DependentUpon>
</Compile>
<Compile Include="Tools\ProjectIncludes.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Tools\ProjectIncludes.Designer.cs">
<DependentUpon>ProjectIncludes.cs</DependentUpon>
</Compile>
<Compile Include="Tools\RuntimeGeneral.cs">
<SubType>UserControl</SubType>
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
@ -968,10 +985,14 @@
<EmbeddedResource Include="ImagesSolutionExplorer\Unknown.gif" />
<EmbeddedResource Include="Images\Vars.gif" />
<EmbeddedResource Include="Images\States.gif" />
<None Include="Resources\export_file-32.png" />
<EmbeddedResource Include="ImagesSolutionExplorer\LSLIScript.gif" />
<Content Include="Resource\App.ico" />
<Content Include="Images\logo.gif" />
<Content Include="LSLEditor.rc" />
<EmbeddedResource Include="Resource\ToolsOptions.xml" />
<EmbeddedResource Include="Resource\ToolsOptions.xml">
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Resource\thanks.gif" />
<None Include="lsleditor_TemporaryKey.pfx" />
<None Include="packages.config" />
@ -1000,6 +1021,12 @@
<SubType>Designer</SubType>
<DependentUpon>EnvironmentPlugins.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\IncludeExportSettings.resx">
<DependentUpon>IncludeExportSettings.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\ProjectIncludes.resx">
<DependentUpon>ProjectIncludes.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\RuntimeGeneral.resx">
<DependentUpon>RuntimeGeneral.cs</DependentUpon>
<SubType>Designer</SubType>
@ -1120,8 +1147,7 @@
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- <Import Project="$(ProgramFiles)\MSBuild\StyleCop\v4.7\StyleCop.targets" /> -->
<PropertyGroup>
<PreBuildEvent>"$(FrameworkSDKDir)..\v7.0A\Bin\x64\Rc.exe" /r "$(ProjectDir)$(TargetName).rc"
</PreBuildEvent>
<PreBuildEvent>"$(FrameworkSDKDir)..\v7.0A\Bin\x64\Rc.exe" /r "$(ProjectDir)$(TargetName).rc"</PreBuildEvent>
<PostBuildEvent>"$(SolutionDir)..\build\AssemblyRevisionIncrementer.exe" /t="$(SolutionDir)Properties\AssemblyInfo.cs"</PostBuildEvent>
</PropertyGroup>
</Project>