Settings, bug fixes and extra functionalities
This commit is contained in:
parent
334359ac96
commit
b7911a5b87
18 changed files with 1296 additions and 191 deletions
27
trunk/EditForm.Designer.cs
generated
27
trunk/EditForm.Designer.cs
generated
|
@ -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);
|
||||
|
|
|
@ -183,6 +183,11 @@ namespace LSLEditor
|
|||
|
||||
void TextBox_OnDirtyChanged(object sender, EventArgs e)
|
||||
{
|
||||
if(parent.IsReadOnly(this))
|
||||
{
|
||||
Dirty = false;
|
||||
return;
|
||||
}
|
||||
if(this.Text == null || this.ScriptName == null)
|
||||
{
|
||||
this.Text = this.ScriptName;
|
||||
|
@ -538,13 +543,43 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
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.CreateCollapsedScriptName(ScriptName)) + " (Read Only)");
|
||||
|
||||
if (readOnlyLSLI != null)
|
||||
{
|
||||
readOnlyLSLI.Close();
|
||||
}
|
||||
}
|
||||
|
||||
// Delete expanded file when closing
|
||||
string expandedFile = LSLIPathHelper.CreateExpandedPathAndScriptName(FullPathName);
|
||||
if (File.Exists(expandedFile))
|
||||
{
|
||||
File.Delete(expandedFile);
|
||||
}
|
||||
}
|
||||
this.parent.CancelClosing = e.Cancel;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,15 +51,20 @@ namespace LSLEditor.Helpers
|
|||
private EditForm editForm;
|
||||
private const string BEGIN = "//@BEGIN";
|
||||
private const string END = "//@END";
|
||||
private static List<string> validExtensions = new List<string>() { "lsl", "lsli", ".lsl", ".lsli" }; // TODO: Optimize dit...
|
||||
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 = "(\\s+|^)//@include\\(\".*?\"\\)";// Eerst was '\\s+' '\n'
|
||||
private const string BEGIN_REGEX = "(\\s+|^)" + BEGIN; //"(\n|^)//@BEGIN"
|
||||
private const string INCLUDE_REGEX = "(\n|^)\\s*" + INCLUDE + "\\(\".*?\"\\).*";//"(\\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;
|
||||
|
@ -69,15 +74,76 @@ namespace LSLEditor.Helpers
|
|||
|
||||
}
|
||||
|
||||
//private string GetFile(string file) // TODO?
|
||||
//{
|
||||
// if (File.Exists(directory))
|
||||
// {
|
||||
// return file;
|
||||
// }
|
||||
// if (Path.GetExtension(file) == "")
|
||||
// {
|
||||
// string pFile = "";
|
||||
|
||||
// foreach (string extension in validExtensions)
|
||||
// {
|
||||
// pFile = file + extension;
|
||||
|
||||
// if (File.Exists(pFile))
|
||||
// {
|
||||
// return pFile;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Searches for a file with one of the validExtensions based on a name or path.
|
||||
/// 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 string SearchFile(string file)
|
||||
{
|
||||
// TODO: Check of settings IncludeFromFolder aanstaat
|
||||
// If setting IncludeDirectories is enabled
|
||||
foreach (string directory in Properties.Settings.Default.IncludeDirectories)
|
||||
{
|
||||
string pFile;
|
||||
if(file.Contains(directory))
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If IncludeDirectories setting is disabled
|
||||
if (Properties.Settings.Default.IncludeDirectories.Count == 0)
|
||||
{
|
||||
if (File.Exists(file))
|
||||
{
|
||||
return file;
|
||||
|
@ -85,10 +151,9 @@ namespace LSLEditor.Helpers
|
|||
|
||||
if (Path.GetExtension(file) == "")
|
||||
{
|
||||
List<string> extensions = validExtensions.Where(e => e[0] == '.').ToList();
|
||||
string pFile = "";
|
||||
|
||||
foreach (string extension in extensions)
|
||||
foreach (string extension in validExtensions)
|
||||
{
|
||||
pFile = file + extension;
|
||||
|
||||
|
@ -97,45 +162,22 @@ namespace LSLEditor.Helpers
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a relative path between two paths
|
||||
/// Finds all indexes of a value in a string
|
||||
/// </summary>
|
||||
/// <param name="filespec">The file or folder to create a relative path towards</param>
|
||||
/// <param name="folder">The base folder</param>
|
||||
/// <param name="str"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
private string GetRelativePath(string filespec, string folder)
|
||||
{
|
||||
filespec = Path.GetFullPath(filespec).ToLower();
|
||||
if(validExtensions.Contains(filespec.Substring(filespec.LastIndexOf(".") + 1)))
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
public static List<int> AllIndexesOf(string str, string value)
|
||||
{
|
||||
if (String.IsNullOrEmpty(value))
|
||||
throw new ArgumentException("the string to find may not be empty", "value");
|
||||
throw new ArgumentException("The string to find may not be empty", "value");
|
||||
List<int> indexes = new List<int>();
|
||||
for (int index = 0; ; index += value.Length)
|
||||
{
|
||||
|
@ -147,14 +189,22 @@ namespace LSLEditor.Helpers
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is a hack to get the correct line, since problems arose in WriteAfterLine when inserting index-based
|
||||
/// 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)
|
||||
{
|
||||
if (Regex.IsMatch(lineBefore.Trim('\n'), INCLUDE_REGEX)
|
||||
&& lineBefore.Trim('\n').EndsWith(Regex.Match(lineBefore.Trim('\n'), INCLUDE_REGEX).ToString())) // Line before this line is an include statement, that means this is a BEGIN statement
|
||||
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);
|
||||
|
@ -162,18 +212,20 @@ namespace LSLEditor.Helpers
|
|||
foreach (int index in allIndexes)
|
||||
{
|
||||
// Check wether there is already a begin statement
|
||||
string actualLineBefore = context.Substring(index + lineBefore.Length).Trim('\n');
|
||||
if (actualLineBefore.StartsWith(BEGIN))
|
||||
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;
|
||||
return index; // Found a free spot! Return the index
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return context.LastIndexOf(lineBefore);
|
||||
return context.LastIndexOf(lineBefore); // If the lineBefore is not an include statement, simply return the last index of it.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -183,7 +235,7 @@ namespace LSLEditor.Helpers
|
|||
/// <param name="newLine"></param>
|
||||
/// <param name="lineBefore"></param>
|
||||
/// <returns>Context with the new line</returns>
|
||||
private StringBuilder WriteAfterLine(StringBuilder context, string newLine, string lineBefore) // TODO: HIJ MOET KIJKEN NAAR DE INDEX VAN LINEBEFORE, NIET ZELF DE INDEX OPZOEKEN
|
||||
private StringBuilder WriteAfterLine(StringBuilder context, string newLine, string lineBefore)
|
||||
{
|
||||
string ctx = context.ToString();
|
||||
int lastIndexOfLineBefore = GetCorrectIndexOfLine(lineBefore, ctx);
|
||||
|
@ -206,6 +258,10 @@ namespace LSLEditor.Helpers
|
|||
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))
|
||||
|
@ -215,6 +271,12 @@ namespace LSLEditor.Helpers
|
|||
}
|
||||
}
|
||||
|
||||
/// <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) // TODO: Dit wordt wss een setting. Tabs hangt namelijk af van de hoeveelheid ingedente include statement.
|
||||
{
|
||||
string tabs = "";
|
||||
|
@ -230,13 +292,144 @@ namespace LSLEditor.Helpers
|
|||
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);
|
||||
int tabCount = 0;
|
||||
|
||||
// Count the tabs between the start of the line and the begin of the include. NOTE: HIJ MOET ALLEEN DE INCLUDEDEPTH AFTREKKEN WANNEER HIJ DEBUG IS
|
||||
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 tabs 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);
|
||||
|
||||
|
||||
return includeDepthTabs + indentedIncludeTabs;
|
||||
}
|
||||
|
||||
/// <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) // TODO: Lange functie, kan ik deze opsplitten?
|
||||
private string ImportScripts(string strC, string pathOfScript, bool ShowBeginEnd = true)
|
||||
{
|
||||
if(!LSLIPathHelper.IsLSLI(pathOfScript))
|
||||
{
|
||||
|
@ -255,13 +448,10 @@ namespace LSLEditor.Helpers
|
|||
}
|
||||
includeDepth++;
|
||||
|
||||
string contentAfterMatchValue = strC.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
|
||||
string line = strC.Substring(m.Index, indexOfNewLine - m.Index); // Get full line
|
||||
string line = GetLineOfMatch(strC, m);
|
||||
int lineNumber = strC.Take(m.Index + line.Length - 1).Count(c => c == '\n') + 1;
|
||||
|
||||
int lineNumber = strC.Take(indexOfNewLine - 1).Count(c => c == '\n') + 1;
|
||||
|
||||
string pathOfIncludeOriginal = Regex.Match(line, "\".*?\"").Value.Trim('"');
|
||||
string pathOfIncludeOriginal = Regex.Match(line, PATH_OF_INCLUDE_REGEX).Value.Trim('"');
|
||||
string pathOfInclude = pathOfIncludeOriginal;
|
||||
string ext = Path.GetExtension(pathOfInclude).ToLower();
|
||||
|
||||
|
@ -269,54 +459,24 @@ namespace LSLEditor.Helpers
|
|||
&& !pathOfScript.Contains(pathOfInclude))
|
||||
{
|
||||
// If path is relative
|
||||
if (!Path.IsPathRooted(pathOfInclude))
|
||||
if (!Path.IsPathRooted(pathOfInclude) && Properties.Settings.Default.IncludeDirectories.Count == 0)
|
||||
{
|
||||
pathOfInclude = GetRelativePath(pathOfScript, Environment.CurrentDirectory) + pathOfInclude;
|
||||
pathOfInclude = LSLIPathHelper.GetRelativePath(pathOfScript, Environment.CurrentDirectory) + pathOfInclude;
|
||||
} else if (this.implementedIncludes.Count > 0)
|
||||
{
|
||||
pathOfInclude = Path.GetDirectoryName(this.implementedIncludes.LastOrDefault()) + '\\' + pathOfInclude;
|
||||
}
|
||||
|
||||
pathOfInclude = SearchFile(pathOfInclude);
|
||||
|
||||
if (pathOfInclude != "" && !this.implementedIncludes.Contains(Path.GetFullPath(pathOfInclude)))
|
||||
{
|
||||
if(ShowBeginEnd)
|
||||
if(!ShowBeginEnd)
|
||||
{
|
||||
sb = this.WriteAfterLine(sb, GetTabsForIncludeDepth(includeDepth, true) + BEGIN, line);
|
||||
}
|
||||
|
||||
// Insert included script
|
||||
string script = GetTabsForIncludeDepth(includeDepth) + "// Empty script\n";
|
||||
using (StreamReader sr = new StreamReader(pathOfInclude))
|
||||
{
|
||||
this.implementedIncludes.Add(Path.GetFullPath(pathOfInclude));
|
||||
string scriptRaw = sr.ReadToEnd();
|
||||
scriptRaw = GetTabsForIncludeDepth(includeDepth) + scriptRaw.Replace("\n", "\n" + GetTabsForIncludeDepth(includeDepth));
|
||||
|
||||
// If there are includes in the included script
|
||||
if (Regex.IsMatch(scriptRaw, INCLUDE_REGEX))
|
||||
{
|
||||
// Then import these scripts too
|
||||
if (ShowBeginEnd)
|
||||
{
|
||||
script = "\n" + ImportScripts(scriptRaw, pathOfInclude) + "\n";
|
||||
sb = WriteExportScript(pathOfInclude, sb, line);
|
||||
} else
|
||||
{
|
||||
script = "\n" + ImportScripts(scriptRaw, pathOfInclude, false) + "\n";
|
||||
}
|
||||
} else if(!Regex.IsMatch(scriptRaw, "^\\s*$"))// Check if its not empty or whitespace // scriptRaw != "" && scriptRaw != " ")
|
||||
{
|
||||
script = scriptRaw + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (ShowBeginEnd)
|
||||
{
|
||||
this.WriteAfterLine(sb, script, BEGIN + "\n");
|
||||
this.WriteAfterLine(sb, GetTabsForIncludeDepth(includeDepth, true) + END, script);
|
||||
} else
|
||||
{
|
||||
this.WriteAfterLine(sb, script, line);
|
||||
string ctx = sb.ToString();
|
||||
sb = new StringBuilder(ctx.Remove(ctx.IndexOf(line.TrimStart('\n')), line.TrimStart('\n').Length));
|
||||
sb = WriteDebugScript(pathOfInclude, sb, line);
|
||||
}
|
||||
}
|
||||
else if (pathOfInclude != "" && this.implementedIncludes.Contains(Path.GetFullPath(pathOfInclude)))
|
||||
|
@ -328,7 +488,7 @@ namespace LSLEditor.Helpers
|
|||
ShowError(message);
|
||||
} else
|
||||
{
|
||||
string correctPath = Path.GetFullPath(GetRelativePath(pathOfScript, Environment.CurrentDirectory) + pathOfIncludeOriginal);
|
||||
string correctPath = Path.GetFullPath(LSLIPathHelper.GetRelativePath(pathOfScript, Environment.CurrentDirectory) + pathOfIncludeOriginal);
|
||||
string message = "Error: Unable to find file \"" + correctPath +
|
||||
"\". In script \"" + Path.GetFileName(pathOfScript) + "\". Line " + lineNumber + ".";
|
||||
|
||||
|
@ -439,7 +599,18 @@ namespace LSLEditor.Helpers
|
|||
public string ExpandToLSL(EditForm editForm, bool ShowBeginEnd = true)
|
||||
{
|
||||
this.editForm = editForm;
|
||||
string sourceCode = ImportScripts(editForm.SourceCode, editForm.FullPathName, ShowBeginEnd);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,7 +81,6 @@ namespace LSLEditor.Helpers
|
|||
|
||||
private static string RemoveExtension(string filename)
|
||||
{
|
||||
//filename = filename.Contains(LSLIConverter.EXPANDED_SUBEXT) ? filename.Replace(LSLIConverter.EXPANDED_SUBEXT, "") : filename; // Is nu een aparte functie voor
|
||||
filename = TrimStarsAndWhiteSpace(filename.Remove(filename.LastIndexOf(Path.GetExtension(filename))));
|
||||
return filename;
|
||||
}
|
||||
|
@ -112,9 +111,15 @@ namespace LSLEditor.Helpers
|
|||
/// </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.
|
||||
|
@ -158,7 +163,7 @@ namespace LSLEditor.Helpers
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// "Hides" the file in the folder
|
||||
/// "Hides" the file in the folder by setting it's attributes to "Hidden"
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
public static void HideFile(string path)
|
||||
|
@ -183,10 +188,48 @@ namespace LSLEditor.Helpers
|
|||
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 LSL)");
|
||||
}
|
||||
|
||||
// TODO: CREATE SAME FUNCTION AS ABOVE FOR READONLY TAB NAME (IS CURRENTLY HARD-CODED)
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
15
trunk/LSLEditorForm.Designer.cs
generated
15
trunk/LSLEditorForm.Designer.cs
generated
|
@ -150,6 +150,7 @@ namespace LSLEditor
|
|||
this.openSolutionFilesDialog = new System.Windows.Forms.OpenFileDialog();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.dockPanel = new LSLEditor.Docking.DockPanel();
|
||||
this.lSLIScriptToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
|
@ -211,6 +212,7 @@ namespace LSLEditor
|
|||
this.newToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.newProjectToolStripMenuItem,
|
||||
this.newFileToolStripMenuItem,
|
||||
this.lSLIScriptToolStripMenuItem,
|
||||
this.notecardToolStripMenuItem});
|
||||
this.newToolStripMenuItem.Name = "newToolStripMenuItem";
|
||||
this.newToolStripMenuItem.Size = new System.Drawing.Size(191, 22);
|
||||
|
@ -231,7 +233,7 @@ namespace LSLEditor
|
|||
this.newFileToolStripMenuItem.Name = "newFileToolStripMenuItem";
|
||||
this.newFileToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
|
||||
this.newFileToolStripMenuItem.Size = new System.Drawing.Size(202, 22);
|
||||
this.newFileToolStripMenuItem.Text = "Script";
|
||||
this.newFileToolStripMenuItem.Text = "LSL Script";
|
||||
this.newFileToolStripMenuItem.Click += new System.EventHandler(this.newFileToolStripMenuItem_Click);
|
||||
//
|
||||
// notecardToolStripMenuItem
|
||||
|
@ -1021,6 +1023,16 @@ namespace LSLEditor
|
|||
this.dockPanel.Skin = dockPanelSkin1;
|
||||
this.dockPanel.TabIndex = 10;
|
||||
//
|
||||
// lSLIScriptToolStripMenuItem
|
||||
//
|
||||
this.lSLIScriptToolStripMenuItem.Image = global::LSLEditor.Properties.Resources.NEWDOC;
|
||||
this.lSLIScriptToolStripMenuItem.Name = "lSLIScriptToolStripMenuItem";
|
||||
this.lSLIScriptToolStripMenuItem.ShortcutKeyDisplayString = "";
|
||||
this.lSLIScriptToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.M)));
|
||||
this.lSLIScriptToolStripMenuItem.Size = new System.Drawing.Size(202, 22);
|
||||
this.lSLIScriptToolStripMenuItem.Text = "LSLI Script";
|
||||
this.lSLIScriptToolStripMenuItem.Click += new System.EventHandler(this.lSLIScriptToolStripMenuItem_Click);
|
||||
//
|
||||
// LSLEditorForm
|
||||
//
|
||||
this.AllowDrop = true;
|
||||
|
@ -1157,5 +1169,6 @@ namespace LSLEditor
|
|||
private System.Windows.Forms.ToolStripMenuItem viewLSLIToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator11;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
|
||||
private System.Windows.Forms.ToolStripMenuItem lSLIScriptToolStripMenuItem;
|
||||
}
|
||||
}
|
|
@ -354,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 (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)
|
||||
|
@ -378,13 +386,19 @@ 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();
|
||||
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);
|
||||
}
|
||||
|
@ -1007,7 +1021,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;
|
||||
}
|
||||
|
@ -1022,6 +1043,13 @@ 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();
|
||||
}
|
||||
|
@ -1349,6 +1377,7 @@ namespace LSLEditor
|
|||
|
||||
public void CloseActiveWindow()
|
||||
{
|
||||
EditForm editForm = this.ActiveMdiForm as EditForm;
|
||||
if (this.IsMdiContainer) {
|
||||
if (this.ActiveMdiForm != null && !this.ActiveMdiForm.IsDisposed) {
|
||||
this.ActiveMdiForm.Close();
|
||||
|
@ -1824,13 +1853,13 @@ namespace LSLEditor
|
|||
/// </summary>
|
||||
/// <param name="formName"></param>
|
||||
/// <returns>Returns null if not found</returns>
|
||||
private Form GetForm(string formName)
|
||||
public Form GetForm(string formName)
|
||||
{
|
||||
EditForm desirableForm = null;
|
||||
for (int i = 0; i < Children.Length; i++) //Application.OpenForms
|
||||
{
|
||||
Form form = Children[i];
|
||||
if (form.Text.TrimEnd(' ') == formName)
|
||||
if (Helpers.LSLIPathHelper.TrimStarsAndWhiteSpace(form.Text) == formName) //.TrimEnd(' ')
|
||||
{
|
||||
desirableForm = (EditForm)form;
|
||||
}
|
||||
|
@ -1839,6 +1868,52 @@ namespace LSLEditor
|
|||
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)
|
||||
{
|
||||
Type dfsa = c.GetType();
|
||||
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)
|
||||
{
|
||||
Type dfsa = c.GetType();
|
||||
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;
|
||||
}
|
||||
|
||||
private void expandToLSLToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
EditForm editForm = this.ActiveMdiForm as EditForm;
|
||||
|
@ -1849,8 +1924,26 @@ namespace LSLEditor
|
|||
string lsl = converter.ExpandToLSL(editForm);
|
||||
string file = Helpers.LSLIPathHelper.CreateExpandedPathAndScriptName(editForm.FullPathName);
|
||||
|
||||
editForm.Close();
|
||||
// Check if the expanded form is already open. If so, then overwrite the content of it.
|
||||
if(GetForm(Helpers.LSLIPathHelper.GetExpandedTabName(Helpers.LSLIPathHelper.CreateExpandedScriptName(editForm.ScriptName))) != null)
|
||||
{
|
||||
EditForm oldExpandedForm = (EditForm)GetForm(Helpers.LSLIPathHelper.GetExpandedTabName(Helpers.LSLIPathHelper.CreateExpandedScriptName(editForm.ScriptName)));
|
||||
oldExpandedForm.SourceCode = lsl;
|
||||
//oldExpandedForm.TabIndex = editForm.TabIndex; // TODO: Keep tabIndex when expanding/collapsing the same
|
||||
oldExpandedForm.Show();
|
||||
SetReadOnly(oldExpandedForm, false);
|
||||
oldExpandedForm.Dirty = editForm.Dirty;
|
||||
|
||||
if (editForm.Dirty)
|
||||
{
|
||||
oldExpandedForm.Text = Helpers.LSLIPathHelper.GetExpandedTabName(editForm.Text) + "*";
|
||||
} else
|
||||
{
|
||||
oldExpandedForm.Text = Helpers.LSLIPathHelper.GetExpandedTabName(editForm.Text);
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // If not already open
|
||||
Helpers.LSLIPathHelper.DeleteFile(file);
|
||||
|
||||
using (StreamWriter sw = new StreamWriter(file))
|
||||
|
@ -1868,6 +1961,11 @@ namespace LSLEditor
|
|||
}
|
||||
|
||||
OpenFile(file);
|
||||
EditForm lslForm = (EditForm)GetForm(Helpers.LSLIPathHelper.GetExpandedTabName(file));
|
||||
lslForm.Dirty = editForm.Dirty;
|
||||
//lslForm.Text = Helpers.LSLIPathHelper.GetExpandedTabName(editForm.Text);
|
||||
}
|
||||
editForm.Hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1884,21 +1982,28 @@ namespace LSLEditor
|
|||
string lsli = converter.CollapseToLSLIFromEditform(editForm);
|
||||
string file = Helpers.LSLIPathHelper.CreateCollapsedPathAndScriptName(editForm.FullPathName);
|
||||
|
||||
editForm.Close();
|
||||
|
||||
using (StreamWriter sw = new StreamWriter(file))
|
||||
// Check if the LSLI form is already open (but hidden)
|
||||
if (GetForm(Path.GetFileName(file)) != null)
|
||||
{
|
||||
sw.Write(lsli);
|
||||
EditForm LSLIform = (EditForm)GetForm(Path.GetFileName(file));
|
||||
LSLIform.SourceCode = lsli;
|
||||
LSLIform.Show();
|
||||
SetReadOnly(LSLIform, false);
|
||||
|
||||
LSLIform.Dirty = editForm.Dirty;
|
||||
}
|
||||
|
||||
Form collapsedForm = GetForm(Helpers.LSLIPathHelper.CreateCollapsedScriptName(Path.GetFileName(file)));
|
||||
|
||||
if (collapsedForm != null)
|
||||
else
|
||||
{
|
||||
collapsedForm.Close();
|
||||
}
|
||||
|
||||
OpenFile(file);
|
||||
EditForm LSLIform = (EditForm)GetForm(Path.GetFileName(file));
|
||||
LSLIform.Dirty = editForm.Dirty;
|
||||
}
|
||||
|
||||
if (GetForm(Path.GetFileName(file) + " (Read Only)") != null) // if readonly is open, close it
|
||||
{
|
||||
GetForm(Path.GetFileName(file) + " (Read Only)").Close();
|
||||
}
|
||||
editForm.Hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1916,16 +2021,22 @@ namespace LSLEditor
|
|||
string pathOfLSLI = Helpers.LSLIPathHelper.CreateCollapsedPathAndScriptName(editForm.FullPathName);
|
||||
|
||||
if (File.Exists(pathOfLSLI)) {
|
||||
Form LSLIform = GetForm(Path.GetFileName(pathOfLSLI));
|
||||
string tabText = Path.GetFileName(pathOfLSLI) + " (Read Only)";
|
||||
|
||||
if (LSLIform != null)
|
||||
// If old LSLI readonly is open
|
||||
Form OldReadOnlyLSLIform = GetForm(tabText);
|
||||
|
||||
if (OldReadOnlyLSLIform != null)
|
||||
{
|
||||
LSLIform.Close();
|
||||
OldReadOnlyLSLIform.Close();
|
||||
}
|
||||
|
||||
OpenFile(pathOfLSLI);
|
||||
|
||||
GetForm(Path.GetFileName(pathOfLSLI)).Enabled = false;
|
||||
EditForm lsliForm = (EditForm) GetForm(Path.GetFileName(pathOfLSLI));
|
||||
SetReadOnly(lsliForm, true);
|
||||
lsliForm.AutoScroll = true;
|
||||
lsliForm.Text = tabText;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1934,6 +2045,7 @@ namespace LSLEditor
|
|||
}
|
||||
}
|
||||
|
||||
// Export button (Ctrl+E)
|
||||
private void toolStripMenuItem2_Click(object sender, EventArgs e)
|
||||
{
|
||||
StreamWriter streamWriter;
|
||||
|
@ -1951,10 +2063,18 @@ namespace LSLEditor
|
|||
if ((streamWriter = new StreamWriter(saveFileDialog1.OpenFile())) != null)
|
||||
{
|
||||
Helpers.LSLIConverter lsliConverter = new Helpers.LSLIConverter();
|
||||
streamWriter.Write(lsliConverter.ExpandToLSL(editForm, false));
|
||||
|
||||
bool showBeginEnd = Properties.Settings.Default.ShowIncludeMetaData;
|
||||
streamWriter.Write(lsliConverter.ExpandToLSL(editForm, showBeginEnd));
|
||||
streamWriter.Close();
|
||||
OpenFile(Path.GetFullPath(saveFileDialog1.FileName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void lSLIScriptToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
NewFile(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.590")]
|
||||
[assembly: AssemblyVersion("2.55.0.825")]
|
||||
|
||||
//
|
||||
// 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.590")]
|
||||
[assembly: AssemblyFileVersionAttribute("2.55.0.825")]
|
||||
|
|
43
trunk/Properties/Settings.Designer.cs
generated
43
trunk/Properties/Settings.Designer.cs
generated
|
@ -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")]
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -68,8 +68,6 @@ namespace LSLEditor
|
|||
private string CSharpCode;
|
||||
private EditForm editForm;
|
||||
|
||||
private bool isLSLI = true; // Deze moet aflezen van de extensie van het script in de tab of het LSL is of LSLI
|
||||
|
||||
private bool GetNewHost()
|
||||
{
|
||||
bool blnResult = false;
|
||||
|
@ -99,6 +97,28 @@ 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;
|
||||
|
@ -111,21 +131,17 @@ namespace LSLEditor
|
|||
|
||||
string lsl = editForm.SourceCode;
|
||||
|
||||
if (isLSLI && editForm.FullPathName.IndexOf(LSLIConverter.EXPANDED_SUBEXT) < 0) // Expand LSLI to LSL
|
||||
// If not hidden and not readonly
|
||||
if (!editForm.IsHidden && !this.mainForm.IsReadOnly(editForm))
|
||||
{
|
||||
LSLIConverter lsliConverter = new LSLIConverter();
|
||||
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))
|
||||
if (LSLIPathHelper.IsLSLI(editForm.ScriptName)) // Expand LSLI to LSL
|
||||
{
|
||||
sw.Write(lsl);
|
||||
lsl = ConvertLSLI();
|
||||
}
|
||||
|
||||
LSLIPathHelper.HideFile(path);
|
||||
} else
|
||||
{
|
||||
this.editForm.StopCompiler();
|
||||
return false;
|
||||
}
|
||||
|
||||
CSharpCode = MakeSharp(editForm.ConfLSL, lsl);
|
||||
|
|
|
@ -1725,6 +1725,7 @@ namespace LSLEditor.Solution
|
|||
timer.Tag = null;
|
||||
|
||||
Guid guid = ((RealTag)e.Node.Tag).Guid;
|
||||
string path = GetFullPath(e.Node);
|
||||
|
||||
// already opened
|
||||
EditForm editForm = GetEditForm(guid);
|
||||
|
@ -1732,8 +1733,32 @@ namespace LSLEditor.Solution
|
|||
{
|
||||
TabPage tabPage = editForm.Tag as TabPage;
|
||||
if (tabPage == null)
|
||||
{
|
||||
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)
|
||||
{
|
||||
this.parent.OpenFile(GetFullPath(e.Node), guid, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1744,9 +1769,37 @@ namespace LSLEditor.Solution
|
|||
return;
|
||||
}
|
||||
|
||||
// open a new one
|
||||
// Check if it's an lsli that has an open expanded form
|
||||
if (GetTypeSL(e.Node) == TypeSL.Script)
|
||||
{
|
||||
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)
|
||||
{
|
||||
this.parent.OpenFile(GetFullPath(e.Node), guid, true);
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
// Open a new one
|
||||
if (GetTypeSL(e.Node) == TypeSL.Script)
|
||||
{
|
||||
this.parent.OpenFile(GetFullPath(e.Node), guid, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (GetTypeSL(e.Node) == TypeSL.Notecard)
|
||||
this.parent.OpenFile(GetFullPath(e.Node), guid, false);
|
||||
}
|
||||
|
|
74
trunk/Tools/IncludeExportSettings.Designer.cs
generated
Normal file
74
trunk/Tools/IncludeExportSettings.Designer.cs
generated
Normal 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;
|
||||
}
|
||||
}
|
25
trunk/Tools/IncludeExportSettings.cs
Normal file
25
trunk/Tools/IncludeExportSettings.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
120
trunk/Tools/IncludeExportSettings.resx
Normal file
120
trunk/Tools/IncludeExportSettings.resx
Normal 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
139
trunk/Tools/ProjectIncludes.Designer.cs
generated
Normal 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;
|
||||
}
|
||||
}
|
107
trunk/Tools/ProjectIncludes.cs
Normal file
107
trunk/Tools/ProjectIncludes.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
123
trunk/Tools/ProjectIncludes.resx
Normal file
123
trunk/Tools/ProjectIncludes.resx
Normal 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>
|
|
@ -643,6 +643,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>
|
||||
|
@ -962,7 +974,9 @@
|
|||
<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="Web References\org.lsleditor.www\Service1.disco" />
|
||||
<EmbeddedResource Include="Resource\About.htm" />
|
||||
|
@ -989,6 +1003,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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue