Merge branch 'dev-load+save-notecards' into dev-next
This commit is contained in:
commit
0472df43d7
4 changed files with 936 additions and 876 deletions
|
@ -914,6 +914,9 @@ namespace LSLEditor
|
||||||
{
|
{
|
||||||
string strTextToPaste = Clipboard.GetDataObject().GetData(DataFormats.Text, true).ToString().Replace("\r", "");
|
string strTextToPaste = Clipboard.GetDataObject().GetData(DataFormats.Text, true).ToString().Replace("\r", "");
|
||||||
this.ColoredText = strTextToPaste;
|
this.ColoredText = strTextToPaste;
|
||||||
|
#if DEBUG
|
||||||
|
// TODO Add code to show encoding used in a dialogue or the status bar.
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1733
trunk/LSLEditorForm.Designer.cs
generated
1733
trunk/LSLEditorForm.Designer.cs
generated
File diff suppressed because it is too large
Load diff
|
@ -190,7 +190,7 @@ namespace LSLEditor
|
||||||
}
|
}
|
||||||
catch (Exception exception)
|
catch (Exception exception)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Error:" + OopsFormatter.ApplyFormatting(exception.Message), "Oops");
|
MessageBox.Show("Error: " + OopsFormatter.ApplyFormatting(exception.Message), "Oops");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,20 +296,33 @@ namespace LSLEditor
|
||||||
|
|
||||||
private void Start(string[] args)
|
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 (*.*)|*.*";
|
||||||
|
|
||||||
this.ConfLSL = GetXmlFromResource(Properties.Settings.Default.ConfLSL);
|
this.ConfLSL = GetXmlFromResource(Properties.Settings.Default.ConfLSL);
|
||||||
this.ConfCSharp = GetXmlFromResource(Properties.Settings.Default.ConfCSharp);
|
this.ConfCSharp = GetXmlFromResource(Properties.Settings.Default.ConfCSharp);
|
||||||
|
|
||||||
|
this.openFileDialog0.FileName = "";
|
||||||
|
this.openFileDialog0.InitialDirectory = Properties.Settings.Default.WorkingDirectory;
|
||||||
|
this.openFileDialog0.Filter = fileFilterNotes;
|
||||||
|
|
||||||
|
this.saveFileDialog0.FileName = "";
|
||||||
|
this.saveFileDialog0.InitialDirectory = Properties.Settings.Default.WorkingDirectory;
|
||||||
|
this.saveFileDialog0.Filter = fileFilterNotes;
|
||||||
|
|
||||||
|
|
||||||
this.openFileDialog1.FileName = "";
|
this.openFileDialog1.FileName = "";
|
||||||
this.openFileDialog1.InitialDirectory = Properties.Settings.Default.WorkingDirectory;
|
this.openFileDialog1.InitialDirectory = Properties.Settings.Default.WorkingDirectory;
|
||||||
this.openFileDialog1.Filter = "Secondlife script files (*.lsl)|*.lsl|All files (*.*)|*.*";
|
this.openFileDialog1.Filter = fileFilterScripts;
|
||||||
|
|
||||||
this.saveFileDialog1.FileName = "";
|
this.saveFileDialog1.FileName = "";
|
||||||
this.saveFileDialog1.InitialDirectory = Properties.Settings.Default.WorkingDirectory;
|
this.saveFileDialog1.InitialDirectory = Properties.Settings.Default.WorkingDirectory;
|
||||||
this.saveFileDialog1.Filter = "Secondlife script files (*.lsl)|*.lsl|All files (*.*)|*.*";
|
this.saveFileDialog1.Filter = fileFilterScripts;
|
||||||
|
|
||||||
this.openFileDialog2.Multiselect = false;
|
this.openFileDialog2.Multiselect = false;
|
||||||
this.openFileDialog2.FileName = "";
|
this.openFileDialog2.FileName = "";
|
||||||
this.openFileDialog2.Filter = "LSLEditor Solution File (*.sol)|*.sol|All Files (*.*)|*.*";
|
this.openFileDialog2.Filter = fileFilterSolutions;
|
||||||
this.openFileDialog2.InitialDirectory = Properties.Settings.Default.ProjectLocation;
|
this.openFileDialog2.InitialDirectory = Properties.Settings.Default.ProjectLocation;
|
||||||
|
|
||||||
|
|
||||||
|
@ -358,8 +371,8 @@ namespace LSLEditor
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
EditForm editForm = new EditForm(this);
|
EditForm editForm = new EditForm(this);
|
||||||
editForm.LoadFile(strFileName);
|
editForm.LoadFile(strFileName);
|
||||||
editForm.TextBox.OnCursorPositionChanged += new SyntaxRichTextBox.CursorPositionChangedHandler(TextBox_OnCursorPositionChanged);
|
editForm.TextBox.OnCursorPositionChanged += new SyntaxRichTextBox.CursorPositionChangedHandler(TextBox_OnCursorPositionChanged);
|
||||||
AddForm(editForm);
|
AddForm(editForm);
|
||||||
}
|
}
|
||||||
if (blnRun)
|
if (blnRun)
|
||||||
|
@ -567,7 +580,23 @@ namespace LSLEditor
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ReadFile()
|
private void ReadNoteFiles()
|
||||||
|
{
|
||||||
|
this.openFileDialog0.Multiselect = true;
|
||||||
|
if (this.openFileDialog0.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
foreach (string strFileName in this.openFileDialog0.FileNames)
|
||||||
|
{
|
||||||
|
if (File.Exists(strFileName))
|
||||||
|
{
|
||||||
|
OpenFile(strFileName, Guid.NewGuid(), false);
|
||||||
|
UpdateRecentFileList(strFileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ReadScriptFiles()
|
||||||
{
|
{
|
||||||
this.openFileDialog1.Multiselect = true;
|
this.openFileDialog1.Multiselect = true;
|
||||||
if (this.openFileDialog1.ShowDialog() == DialogResult.OK)
|
if (this.openFileDialog1.ShowDialog() == DialogResult.OK)
|
||||||
|
@ -1534,10 +1563,15 @@ namespace LSLEditor
|
||||||
this.newProjectToolStripMenuItem.Enabled = !blnVisible;
|
this.newProjectToolStripMenuItem.Enabled = !blnVisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openFileToolStripMenuItem_Click(object sender, EventArgs e)
|
private void openNoteFilesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ReadFile();
|
ReadNoteFiles();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void openScriptFilesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ReadScriptFiles();
|
||||||
|
}
|
||||||
|
|
||||||
private void closeFileToolStripMenuItem_Click(object sender, EventArgs e)
|
private void closeFileToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -118,28 +118,34 @@
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>293, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="openFileDialog0.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="saveFileDialog0.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>157, 17</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>271, 17</value>
|
<value>563, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>401, 17</value>
|
<value>703, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>671, 17</value>
|
<value>17, 56</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>126, 17</value>
|
<value>408, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="pageSetupDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="pageSetupDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>529, 17</value>
|
<value>839, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="openFileDialog2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="openFileDialog2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 54</value>
|
<value>133, 56</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>157, 54</value>
|
<value>273, 56</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>53</value>
|
<value>53</value>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue