Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
DataEditorX
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
聖園ミカ
DataEditorX
Commits
85f291e0
Commit
85f291e0
authored
Oct 24, 2014
by
keyongyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.2.2.1
parent
56f4ceae
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
225 additions
and
99 deletions
+225
-99
DataEditorX/CodeEditForm.Designer.cs
DataEditorX/CodeEditForm.Designer.cs
+6
-5
DataEditorX/CodeEditForm.cs
DataEditorX/CodeEditForm.cs
+33
-61
DataEditorX/Common/FastColoredTextBoxEx.cs
DataEditorX/Common/FastColoredTextBoxEx.cs
+60
-0
DataEditorX/Common/MySyntaxHighlighter.cs
DataEditorX/Common/MySyntaxHighlighter.cs
+78
-0
DataEditorX/DLL/FastColoredTextBox.dll
DataEditorX/DLL/FastColoredTextBox.dll
+0
-0
DataEditorX/DataEditForm.cs
DataEditorX/DataEditForm.cs
+1
-1
DataEditorX/DataEditorX.csproj
DataEditorX/DataEditorX.csproj
+2
-0
DataEditorX/Language/LMsg.cs
DataEditorX/Language/LMsg.cs
+1
-0
DataEditorX/MainForm.Designer.cs
DataEditorX/MainForm.Designer.cs
+7
-6
DataEditorX/MainForm.cs
DataEditorX/MainForm.cs
+8
-14
DataEditorX/Properties/AssemblyInfo.cs
DataEditorX/Properties/AssemblyInfo.cs
+1
-1
DataEditorX/chinese/_functions.txt
DataEditorX/chinese/_functions.txt
+1
-1
DataEditorX/chinese/message.txt
DataEditorX/chinese/message.txt
+2
-1
DataEditorX/english/message.txt
DataEditorX/english/message.txt
+2
-1
DataEditorX/readme.txt
DataEditorX/readme.txt
+5
-1
win32/DataEditorX.exe
win32/DataEditorX.exe
+0
-0
win32/FastColoredTextBox.dll
win32/FastColoredTextBox.dll
+0
-0
win32/chinese/_functions.txt
win32/chinese/_functions.txt
+1
-1
win32/chinese/history.txt
win32/chinese/history.txt
+8
-3
win32/chinese/message.txt
win32/chinese/message.txt
+2
-1
win32/english/message.txt
win32/english/message.txt
+2
-1
win32/readme.txt
win32/readme.txt
+5
-1
win32/win32.zip
win32/win32.zip
+0
-0
No files found.
DataEditorX/CodeEditForm.Designer.cs
View file @
85f291e0
...
...
@@ -50,7 +50,7 @@ private void InitializeComponent()
this
.
menuitem_replace
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
menuitem_help
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
menuitem_about
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
fctb
=
new
FastColoredTextBoxNS
.
FastColoredTextBox
();
this
.
fctb
=
new
FastColoredTextBoxNS
.
FastColoredTextBox
Ex
();
this
.
documentMap1
=
new
FastColoredTextBoxNS
.
DocumentMap
();
this
.
tb_input
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
menuStrip1
.
SuspendLayout
();
...
...
@@ -201,11 +201,12 @@ private void InitializeComponent()
this
.
fctb
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
fctb
.
Font
=
new
System
.
Drawing
.
Font
(
"Consolas"
,
14.25F
);
this
.
fctb
.
ForeColor
=
System
.
Drawing
.
Color
.
GhostWhite
;
this
.
fctb
.
IndentBackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))))
;
this
.
fctb
.
IndentBackColor
=
System
.
Drawing
.
SystemColors
.
WindowFrame
;
this
.
fctb
.
IsReplaceMode
=
false
;
this
.
fctb
.
Language
=
FastColoredTextBoxNS
.
Language
.
Lua
;
this
.
fctb
.
LeftBracket
=
'('
;
this
.
fctb
.
LeftBracket2
=
'{'
;
this
.
fctb
.
LineNumberColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
fctb
.
LineNumberColor
=
System
.
Drawing
.
Color
.
Gainsboro
;
this
.
fctb
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
25
);
this
.
fctb
.
Name
=
"fctb"
;
this
.
fctb
.
Paddings
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
...
...
@@ -217,7 +218,6 @@ private void InitializeComponent()
this
.
fctb
.
WordWrap
=
true
;
this
.
fctb
.
Zoom
=
100
;
this
.
fctb
.
ToolTipNeeded
+=
new
System
.
EventHandler
<
FastColoredTextBoxNS
.
ToolTipNeededEventArgs
>(
this
.
FctbToolTipNeeded
);
this
.
fctb
.
TextChanged
+=
new
System
.
EventHandler
<
FastColoredTextBoxNS
.
TextChangedEventArgs
>(
this
.
FctbTextChanged
);
this
.
fctb
.
SelectionChanged
+=
new
System
.
EventHandler
(
this
.
FctbSelectionChanged
);
this
.
fctb
.
TextChangedDelayed
+=
new
System
.
EventHandler
<
FastColoredTextBoxNS
.
TextChangedEventArgs
>(
this
.
FctbTextChangedDelayed
);
this
.
fctb
.
KeyDown
+=
new
System
.
Windows
.
Forms
.
KeyEventHandler
(
this
.
FctbKeyDown
);
...
...
@@ -258,6 +258,7 @@ private void InitializeComponent()
this
.
Name
=
"CodeEditForm"
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
Text
=
"CodeEditor"
;
this
.
FormClosing
+=
new
System
.
Windows
.
Forms
.
FormClosingEventHandler
(
this
.
CodeEditFormFormClosing
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
CodeEditFormLoad
);
this
.
Enter
+=
new
System
.
EventHandler
(
this
.
CodeEditFormEnter
);
this
.
menuStrip1
.
ResumeLayout
(
false
);
...
...
@@ -272,7 +273,7 @@ private void InitializeComponent()
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
menuitem_showinput
;
private
System
.
Windows
.
Forms
.
TextBox
tb_input
;
private
FastColoredTextBoxNS
.
DocumentMap
documentMap1
;
private
FastColoredTextBoxNS
.
FastColoredTextBox
fctb
;
private
FastColoredTextBoxNS
.
FastColoredTextBox
Ex
fctb
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
menuitem_showmap
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
menuitem_about
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
menuitem_help
;
...
...
DataEditorX/CodeEditForm.cs
View file @
85f291e0
...
...
@@ -24,13 +24,6 @@ namespace DataEditorX
public
partial
class
CodeEditForm
:
DockContent
{
#
region
Style
TextStyle
KeyStyle
=
new
TextStyle
(
Brushes
.
DeepSkyBlue
,
null
,
FontStyle
.
Regular
);
TextStyle
BoldStyle
=
new
TextStyle
(
null
,
null
,
FontStyle
.
Bold
|
FontStyle
.
Italic
);
TextStyle
GrayStyle
=
new
TextStyle
(
Brushes
.
Gray
,
null
,
FontStyle
.
Regular
);
TextStyle
NumberStyle
=
new
TextStyle
(
Brushes
.
Orange
,
null
,
FontStyle
.
Regular
);
TextStyle
ConStyle
=
new
TextStyle
(
Brushes
.
YellowGreen
,
null
,
FontStyle
.
Regular
);
TextStyle
YellowStyle
=
new
TextStyle
(
Brushes
.
Yellow
,
null
,
FontStyle
.
Italic
);
TextStyle
FunStyle
=
new
TextStyle
(
Brushes
.
SlateGray
,
null
,
FontStyle
.
Bold
);
MarkerStyle
SameWordsStyle
=
new
MarkerStyle
(
new
SolidBrush
(
Color
.
FromArgb
(
40
,
Color
.
White
)));
#
endregion
...
...
@@ -41,6 +34,7 @@ public partial class CodeEditForm : DockContent
AutocompleteMenu
popupMenu_find
;
string
nowFile
;
string
title
;
string
oldtext
;
Dictionary
<
string
,
string
>
tooltipDic
;
public
CodeEditForm
()
{
...
...
@@ -80,6 +74,7 @@ void InitForm()
popupMenu_find
.
Items
.
MaximumSize
=
new
System
.
Drawing
.
Size
(
200
,
400
);
popupMenu_find
.
Items
.
Width
=
300
;
title
=
this
.
Text
;
fctb
.
SyntaxHighlighter
=
new
MySyntaxHighlighter
();
}
public
void
LoadXml
(
string
xmlfile
)
...
...
@@ -101,6 +96,7 @@ public void Open(string file)
}
nowFile
=
file
;
fctb
.
OpenFile
(
nowFile
,
new
UTF8Encoding
(
false
));
oldtext
=
fctb
.
Text
;
SetTitle
();
}
}
...
...
@@ -168,7 +164,7 @@ void SetTitle()
if
(
string
.
IsNullOrEmpty
(
nowFile
))
str
=
title
;
else
str
=
nowFile
;
str
=
nowFile
+
"-"
+
title
;
if
(
this
.
MdiParent
!=
null
)
{
if
(
string
.
IsNullOrEmpty
(
nowFile
))
...
...
@@ -281,6 +277,15 @@ void Menuitem_showinputClick(object sender, EventArgs e)
#
endregion
#
region
menu
void
Menuitem_findClick
(
object
sender
,
EventArgs
e
)
{
fctb
.
ShowFindDialog
();
}
void
Menuitem_replaceClick
(
object
sender
,
EventArgs
e
)
{
fctb
.
ShowReplaceDialog
();
}
public
void
Save
()
{
if
(
string
.
IsNullOrEmpty
(
nowFile
))
...
...
@@ -334,7 +339,7 @@ void AboutToolStripMenuItemClick(object sender, EventArgs e)
LANG
.
GetMsg
(
LMSG
.
About
)+
"\t"
+
Application
.
ProductName
+
"\n"
+
LANG
.
GetMsg
(
LMSG
.
Version
)+
"\t1.1.0.0\n"
+
LANG
.
GetMsg
(
LMSG
.
Author
)+
"\t247321453\n"
+
"Email:\t
247321453@qq
.com"
);
+
"Email:\t
keyoyu@foxmail
.com"
);
}
void
Menuitem_openClick
(
object
sender
,
EventArgs
e
)
...
...
@@ -351,58 +356,7 @@ void Menuitem_openClick(object sender, EventArgs e)
}
#
endregion
void
FctbTextChanged
(
object
sender
,
TextChangedEventArgs
e
)
{
LuaSyntaxHighlight
(
e
);
}
private
void
LuaSyntaxHighlight
(
TextChangedEventArgs
e
)
{
//fctb.LeftBracket = '(';
//fctb.RightBracket = ')';
//fctb.LeftBracket2 = '\x0';
//fctb.RightBracket2 = '\x0';
//clear style of changed range
e
.
ChangedRange
.
ClearStyle
(
YellowStyle
,
BoldStyle
,
GrayStyle
,
NumberStyle
,
FunStyle
,
ConStyle
);
//string highlighting
e
.
ChangedRange
.
SetStyle
(
YellowStyle
,
@"""""|@""""|''|@"".*?""|(?<!@)(?<range>"".*?[^\\]"")|'.*?[^\\]'"
);
//comment highlighting
e
.
ChangedRange
.
SetStyle
(
GrayStyle
,
@"--.*$"
,
RegexOptions
.
Multiline
);
e
.
ChangedRange
.
SetStyle
(
GrayStyle
,
@"--\[\[[\S\s]*?|--\[\[[\S\s]*?\]\]--|[\S\s]*?\]\]--"
,
RegexOptions
.
Multiline
);
e
.
ChangedRange
.
SetStyle
(
GrayStyle
,
@"--\[\[[\S\s]*?|--\[\[[\S\s]*?\]\]--|[\S\s]*?\]\]--"
,
RegexOptions
.
Multiline
|
RegexOptions
.
RightToLeft
);
//number highlighting
e
.
ChangedRange
.
SetStyle
(
NumberStyle
,
@"\b\d+[\.]?\d*([eE]\-?\d+)?[lLdDfF]?\b|\b0x[a-fA-F\d]+\b|\bc[0-9]+\b"
);
//attribute highlighting
//e.ChangedRange.SetStyle(GrayStyle, @"^\s*(?<range>\[.+?\])\s*$", RegexOptions.Multiline);
//class name highlighting
e
.
ChangedRange
.
SetStyle
(
BoldStyle
,
@"\b(Effect|Card|Group|Duel|Debug)\b"
);
//keyword highlighting
e
.
ChangedRange
.
SetStyle
(
KeyStyle
,
@"\b(and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b"
);
//constant
e
.
ChangedRange
.
SetStyle
(
ConStyle
,
@"[\s|\(|+|,]{0,1}(?<range>[A-Z_]+?)[\)|+|\s|,]"
);
//function
//e.ChangedRange.SetStyle(FunStyle, @"[:|.|\s](?<range>[^\(]*?)[\(|\)|\s]");
//clear folding markers
e
.
ChangedRange
.
ClearFoldingMarkers
();
//set folding markers
//e.ChangedRange.SetFoldingMarkers(@"--\[\[[\S\s]*?\]\]--", RegexOptions.Multiline);//allow to collapse comment block
e
.
ChangedRange
.
SetFoldingMarkers
(
"if\b"
,
"end\b"
);
//allow to collapse brackets block
e
.
ChangedRange
.
SetFoldingMarkers
(
"function\b"
,
"end\b"
);
//allow to collapse #region blocks
}
void
Menuitem_findClick
(
object
sender
,
EventArgs
e
)
{
fctb
.
ShowFindDialog
();
}
void
Menuitem_replaceClick
(
object
sender
,
EventArgs
e
)
{
fctb
.
ShowReplaceDialog
();
}
#
region
find
void
Tb_inputKeyDown
(
object
sender
,
KeyEventArgs
e
)
{
...
...
@@ -426,5 +380,23 @@ void Tb_inputKeyDown(object sender, KeyEventArgs e)
}
}
#
endregion
public
void
SetIMEMode
(
ImeMode
im
)
{
fctb
.
ImeMode
=
im
;
}
void
CodeEditFormFormClosing
(
object
sender
,
FormClosingEventArgs
e
)
{
if
(!
string
.
IsNullOrEmpty
(
oldtext
))
{
if
(
fctb
.
Text
!=
oldtext
){
if
(
MyMsg
.
Question
(
LMSG
.
IfSaveScript
))
Save
();
}
}
else
if
(
fctb
.
Text
.
Length
>
0
){
if
(
MyMsg
.
Question
(
LMSG
.
IfSaveScript
))
Save
();
}
}
}
}
DataEditorX/Common/FastColoredTextBoxEx.cs
0 → 100644
View file @
85f291e0
/*
* 由SharpDevelop创建。
* 用户: Acer
* 日期: 2014-10-24
* 时间: 7:19
*
*/
using
System
;
using
System.Drawing
;
using
System.Drawing.Drawing2D
;
using
System.Windows.Forms
;
using
System.Collections.Generic
;
namespace
FastColoredTextBoxNS
{
/// <summary>
/// Description of FastColoredTextBoxEx.
/// </summary>
public
class
FastColoredTextBoxEx
:
FastColoredTextBox
{
Point
lastMouseCoord
;
public
new
event
EventHandler
<
ToolTipNeededEventArgs
>
ToolTipNeeded
;
protected
override
void
OnMouseMove
(
MouseEventArgs
e
)
{
base
.
OnMouseMove
(
e
);
lastMouseCoord
=
e
.
Location
;
}
protected
override
void
OnToolTip
()
{
if
(
ToolTip
==
null
)
return
;
if
(
ToolTipNeeded
==
null
)
return
;
//get place under mouse
Place
place
=
PointToPlace
(
lastMouseCoord
);
//check distance
Point
p
=
PlaceToPoint
(
place
);
if
(
Math
.
Abs
(
p
.
X
-
lastMouseCoord
.
X
)
>
CharWidth
*
2
||
Math
.
Abs
(
p
.
Y
-
lastMouseCoord
.
Y
)
>
CharHeight
*
2
)
return
;
//get word under mouse
var
r
=
new
Range
(
this
,
place
,
place
);
string
hoveredWord
=
r
.
GetFragment
(
"[a-zA-Z0-9_]"
).
Text
;
//event handler
var
ea
=
new
ToolTipNeededEventArgs
(
place
,
hoveredWord
);
ToolTipNeeded
(
this
,
ea
);
if
(
ea
.
ToolTipText
!=
null
)
{
//show tooltip
ToolTip
.
ToolTipTitle
=
ea
.
ToolTipTitle
;
ToolTip
.
ToolTipIcon
=
ea
.
ToolTipIcon
;
//ToolTip.SetToolTip(this, ea.ToolTipText);
ToolTip
.
Show
(
ea
.
ToolTipText
,
this
,
new
Point
(
lastMouseCoord
.
X
,
lastMouseCoord
.
Y
+
CharHeight
));
}
}
}
}
DataEditorX/Common/MySyntaxHighlighter.cs
0 → 100644
View file @
85f291e0
/*
* 由SharpDevelop创建。
* 用户: Acer
* 日期: 2014-10-23
* 时间: 23:14
*
*/
using
System
;
using
System.Collections.Generic
;
using
System.Drawing
;
using
System.Globalization
;
using
System.IO
;
using
System.Text.RegularExpressions
;
using
System.Xml
;
namespace
FastColoredTextBoxNS
{
/// <summary>
/// Description of FastColoredTextBoxEx.
/// </summary>
public
class
MySyntaxHighlighter
:
SyntaxHighlighter
{
TextStyle
mBoldStyle
=
new
TextStyle
(
Brushes
.
MediumSlateBlue
,
null
,
FontStyle
.
Regular
);
TextStyle
mNumberStyle
=
new
TextStyle
(
Brushes
.
Orange
,
null
,
FontStyle
.
Regular
);
TextStyle
mStrStyle
=
new
TextStyle
(
Brushes
.
Gold
,
null
,
FontStyle
.
Regular
);
TextStyle
ConStyle
=
new
TextStyle
(
Brushes
.
YellowGreen
,
null
,
FontStyle
.
Regular
);
TextStyle
mKeywordStyle
=
new
TextStyle
(
Brushes
.
DeepSkyBlue
,
null
,
FontStyle
.
Regular
);
TextStyle
mGrayStyle
=
new
TextStyle
(
Brushes
.
Gray
,
null
,
FontStyle
.
Regular
);
TextStyle
mFunStyle
=
new
TextStyle
(
Brushes
.
DeepSkyBlue
,
null
,
FontStyle
.
Regular
);
/// <summary>
/// Highlights Lua code
/// </summary>
/// <param name="range"></param>
public
override
void
LuaSyntaxHighlight
(
Range
range
)
{
range
.
tb
.
CommentPrefix
=
"--"
;
range
.
tb
.
LeftBracket
=
'('
;
range
.
tb
.
RightBracket
=
')'
;
range
.
tb
.
LeftBracket2
=
'{'
;
range
.
tb
.
RightBracket2
=
'}'
;
range
.
tb
.
BracketsHighlightStrategy
=
BracketsHighlightStrategy
.
Strategy2
;
range
.
tb
.
AutoIndentCharsPatterns
=
@"^\s*[\w\.]+(\s\w+)?\s*(?<range>=)\s*(?<range>.+)"
;
//clear style of changed range
range
.
ClearStyle
(
mStrStyle
,
mGrayStyle
,
ConStyle
,
mNumberStyle
,
mKeywordStyle
,
mFunStyle
);
//
if
(
base
.
LuaStringRegex
==
null
)
base
.
InitLuaRegex
();
//string highlighting
range
.
SetStyle
(
mStrStyle
,
base
.
LuaStringRegex
);
//comment highlighting
range
.
SetStyle
(
mGrayStyle
,
base
.
LuaCommentRegex1
);
range
.
SetStyle
(
mGrayStyle
,
base
.
LuaCommentRegex2
);
range
.
SetStyle
(
mGrayStyle
,
base
.
LuaCommentRegex3
);
//number highlighting
range
.
SetStyle
(
mNumberStyle
,
base
.
LuaNumberRegex
);
//keyword highlighting
range
.
SetStyle
(
mKeywordStyle
,
base
.
LuaKeywordRegex
);
//functions highlighting
range
.
SetStyle
(
mFunStyle
,
base
.
LuaFunctionsRegex
);
//range.SetStyle(mBoldStyle, @"\b(?<range>[a-zA-Z0-9_]+?)[.|:|=|\s]");
//constant
range
.
SetStyle
(
ConStyle
,
@"[\s|\(|+|,]{0,1}(?<range>[A-Z_]+?)[\)|+|\s|,]"
);
//function
//range.SetStyle(FunStyle, @"[:|.|\s](?<range>[^\(]*?)[\(|\)|\s]");
//clear folding markers
range
.
ClearFoldingMarkers
();
//set folding markers
range
.
SetFoldingMarkers
(
"{"
,
"}"
);
//allow to collapse brackets block
range
.
SetFoldingMarkers
(
@"--\[\["
,
@"\]\]"
);
//allow to collapse comment block
}
}
}
DataEditorX/DLL/FastColoredTextBox.dll
View file @
85f291e0
No preview for this file type
DataEditorX/DataEditForm.cs
View file @
85f291e0
...
...
@@ -1035,7 +1035,7 @@ void Menuitem_aboutClick(object sender, EventArgs e)
LANG
.
GetMsg
(
LMSG
.
About
)+
"\t"
+
Application
.
ProductName
+
"\n"
+
LANG
.
GetMsg
(
LMSG
.
Version
)+
"\t"
+
Application
.
ProductVersion
+
"\n"
+
LANG
.
GetMsg
(
LMSG
.
Author
)+
"\t247321453\n"
+
"Email:\t
247321453@qq
.com"
);
+
"Email:\t
keyoyu@foxmail
.com"
);
}
void
Menuitem_checkupdateClick
(
object
sender
,
EventArgs
e
)
...
...
DataEditorX/DataEditorX.csproj
View file @
85f291e0
...
...
@@ -67,6 +67,8 @@
</Compile>
<Compile
Include=
"Common\CheckUpdate.cs"
/>
<Compile
Include=
"Common\DoubleContorl.cs"
/>
<Compile
Include=
"Common\FastColoredTextBoxEx.cs"
/>
<Compile
Include=
"Common\MySyntaxHighlighter.cs"
/>
<Compile
Include=
"Common\MyBitmap.cs"
/>
<Compile
Include=
"Common\ZipStorer.cs"
/>
<Compile
Include=
"Core\Card.cs"
/>
...
...
DataEditorX/Language/LMsg.cs
View file @
85f291e0
...
...
@@ -84,6 +84,7 @@ public enum LMSG : uint
OpenFileFilter
,
NewFile
,
SaveFileOK
,
IfSaveScript
,
COUNT
,
}
}
DataEditorX/MainForm.Designer.cs
View file @
85f291e0
...
...
@@ -278,40 +278,41 @@ private void InitializeComponent()
// menuitem_dataeditor
//
this
.
menuitem_dataeditor
.
Name
=
"menuitem_dataeditor"
;
this
.
menuitem_dataeditor
.
Size
=
new
System
.
Drawing
.
Size
(
1
45
,
22
);
this
.
menuitem_dataeditor
.
Size
=
new
System
.
Drawing
.
Size
(
1
57
,
22
);
this
.
menuitem_dataeditor
.
Text
=
"DataEditor"
;
this
.
menuitem_dataeditor
.
Click
+=
new
System
.
EventHandler
(
this
.
DataEditorToolStripMenuItemClick
);
//
// menuitem_codeeditor
//
this
.
menuitem_codeeditor
.
Name
=
"menuitem_codeeditor"
;
this
.
menuitem_codeeditor
.
Size
=
new
System
.
Drawing
.
Size
(
1
45
,
22
);
this
.
menuitem_codeeditor
.
Size
=
new
System
.
Drawing
.
Size
(
1
57
,
22
);
this
.
menuitem_codeeditor
.
Text
=
"CodeEditor"
;
this
.
menuitem_codeeditor
.
Click
+=
new
System
.
EventHandler
(
this
.
Menuitem_codeeditorClick
);
//
// toolStripSeparator2
//
this
.
toolStripSeparator2
.
Name
=
"toolStripSeparator2"
;
this
.
toolStripSeparator2
.
Size
=
new
System
.
Drawing
.
Size
(
1
42
,
6
);
this
.
toolStripSeparator2
.
Size
=
new
System
.
Drawing
.
Size
(
1
54
,
6
);
//
// menuitem_close
//
this
.
menuitem_close
.
Name
=
"menuitem_close"
;
this
.
menuitem_close
.
Size
=
new
System
.
Drawing
.
Size
(
145
,
22
);
this
.
menuitem_close
.
ShortcutKeys
=
((
System
.
Windows
.
Forms
.
Keys
)((
System
.
Windows
.
Forms
.
Keys
.
Control
|
System
.
Windows
.
Forms
.
Keys
.
W
)));
this
.
menuitem_close
.
Size
=
new
System
.
Drawing
.
Size
(
157
,
22
);
this
.
menuitem_close
.
Text
=
"Close"
;
this
.
menuitem_close
.
Click
+=
new
System
.
EventHandler
(
this
.
CloseToolStripMenuItemClick
);
//
// menuitem_closeother
//
this
.
menuitem_closeother
.
Name
=
"menuitem_closeother"
;
this
.
menuitem_closeother
.
Size
=
new
System
.
Drawing
.
Size
(
1
45
,
22
);
this
.
menuitem_closeother
.
Size
=
new
System
.
Drawing
.
Size
(
1
57
,
22
);
this
.
menuitem_closeother
.
Text
=
"Close Other"
;
this
.
menuitem_closeother
.
Click
+=
new
System
.
EventHandler
(
this
.
CloseOtherToolStripMenuItemClick
);
//
// menuitem_closeall
//
this
.
menuitem_closeall
.
Name
=
"menuitem_closeall"
;
this
.
menuitem_closeall
.
Size
=
new
System
.
Drawing
.
Size
(
1
45
,
22
);
this
.
menuitem_closeall
.
Size
=
new
System
.
Drawing
.
Size
(
1
57
,
22
);
this
.
menuitem_closeall
.
Text
=
"Close All"
;
this
.
menuitem_closeall
.
Click
+=
new
System
.
EventHandler
(
this
.
CloseAllToolStripMenuItemClick
);
//
...
...
DataEditorX/MainForm.cs
View file @
85f291e0
...
...
@@ -85,9 +85,6 @@ void Init(string datapath)
#
endregion
#
region
const
public
const
int
CLOSE_ONE
=
1
;
public
const
int
CLOSE_OTHER
=
2
;
public
const
int
CLOSE_ALL
=
3
;
public
const
int
WM_OPEN
=
0x0401
;
public
const
int
WM_OPEN_SCRIPT
=
0x0402
;
public
const
string
TMPFILE
=
"open.tmp"
;
...
...
@@ -205,7 +202,7 @@ protected override void DefWndProc(ref System.Windows.Forms.Message m)
}
#
endregion
#
region
DataEditor
#
region
open
public
void
OpenScript
(
string
file
)
{
if
(!
string
.
IsNullOrEmpty
(
file
)
&&
File
.
Exists
(
file
)){
...
...
@@ -220,6 +217,7 @@ public void OpenScript(string file)
InitCodeEditor
(
funtxt
,
conlua
);
}
cf
.
InitTooltip
(
tooltipDic
,
funList
.
ToArray
(),
conList
.
ToArray
());
//cf.SetIMEMode(ImeMode.Inherit);
cf
.
Show
(
dockPanel1
,
DockState
.
Document
);
}
public
void
Open
(
string
file
)
...
...
@@ -307,13 +305,13 @@ void MainFormFormClosing(object sender, FormClosingEventArgs e)
#
region
windows
void
CloseToolStripMenuItemClick
(
object
sender
,
EventArgs
e
)
{
CloseMdi
(
MainForm
.
CLOSE_ONE
);
dockPanel1
.
ActiveContent
.
DockHandler
.
Close
(
);
}
void
Menuitem_codeeditorClick
(
object
sender
,
EventArgs
e
)
{
OpenScript
(
null
);
}
void
CloseMdi
(
int
type
)
void
CloseMdi
(
bool
isall
)
{
DockContentCollection
contents
=
dockPanel1
.
Contents
;
int
num
=
contents
.
Count
-
1
;
...
...
@@ -322,13 +320,9 @@ void CloseMdi(int type)
{
if
(
contents
[
num
].
DockHandler
.
DockState
==
DockState
.
Document
)
{
if
(
type
==
MainForm
.
CLOSE_ALL
)
if
(
isall
)
contents
[
num
].
DockHandler
.
Close
();
else
if
(
type
==
MainForm
.
CLOSE_ONE
&&
dockPanel1
.
ActiveContent
==
contents
[
num
])
contents
[
num
].
DockHandler
.
Close
();
else
if
(
type
==
MainForm
.
CLOSE_OTHER
&&
dockPanel1
.
ActiveContent
!=
contents
[
num
])
else
if
(
dockPanel1
.
ActiveContent
!=
contents
[
num
])
contents
[
num
].
DockHandler
.
Close
();
}
num
--;
...
...
@@ -337,12 +331,12 @@ void CloseMdi(int type)
}
void
CloseOtherToolStripMenuItemClick
(
object
sender
,
EventArgs
e
)
{
CloseMdi
(
MainForm
.
CLOSE_OTHER
);
CloseMdi
(
false
);
}
void
CloseAllToolStripMenuItemClick
(
object
sender
,
EventArgs
e
)
{
CloseMdi
(
MainForm
.
CLOSE_ALL
);
CloseMdi
(
true
);
}
#
endregion
...
...
DataEditorX/Properties/AssemblyInfo.cs
View file @
85f291e0
...
...
@@ -28,4 +28,4 @@
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[
assembly
:
AssemblyVersion
(
"2.2.2.
0
"
)]
[
assembly
:
AssemblyVersion
(
"2.2.2.
1
"
)]
DataEditorX/chinese/_functions.txt
View file @
85f291e0
...
...
@@ -774,7 +774,7 @@ Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TARGET_CARDS)
将会返回当前连锁发生的位置和对象卡。
●integer Duel.GetCurrentPhase()
返回当前的阶段
●void Duel.SkipPhase
●void Duel.SkipPhase
()
(integer player, integer phase, integer reset_flag, integer reset_count)
跳过玩家player的phase阶段,并在特定的阶段后reset。reset参数和效果相同。
●boolean Duel.IsDamageCalculated()
...
...
DataEditorX/chinese/message.txt
View file @
85f291e0
...
...
@@ -67,4 +67,5 @@
0x42 打开文件
0x43 数据库文件(*.cdb)|*.cdb|脚本文件(*.lua)|*.lua|所有文件(*.*)|*.*
0x44 新建文件
0x45 保存完成
\ No newline at end of file
0x45 保存完成
0x46 是否保存脚本?
\ No newline at end of file
DataEditorX/english/message.txt
View file @
85f291e0
...
...
@@ -67,4 +67,5 @@
0x42 Open File
0x43 DataBase(*.cdb)|*.cdb|Script(*.lua)|*.lua|all files(*.*)|*.*
0x44 New File
0x45 Save OK
\ No newline at end of file
0x45 Save OK
0x46 If Save Script?
\ No newline at end of file
DataEditorX/readme.txt
View file @
85f291e0
[DataEditorX]2.2.2.
0
[DataEditorX]
[DataEditorX]2.2.2.
1
[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★使用前,请关联lua的打开方式,例如记事本,notepad++,等。
...
...
@@ -68,6 +68,10 @@ DataEditorX.exe.config
描述不详细的bug,我修复不了。(都不知道是bug是什么)
★更新历史
2.2.2.1
添加关闭标签快捷键 Ctrl+W
修复lua编辑器打开大文件,无响应
lua内容变动,在关闭提示保存
2.2.2.0
lua编辑器增加根据功能说明搜索函数名
在下面的文本框输入关键字,按Enter
...
...
win32/DataEditorX.exe
View file @
85f291e0
No preview for this file type
win32/FastColoredTextBox.dll
View file @
85f291e0
No preview for this file type
win32/chinese/_functions.txt
View file @
85f291e0
...
...
@@ -774,7 +774,7 @@ Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TARGET_CARDS)
将会返回当前连锁发生的位置和对象卡。
●integer Duel.GetCurrentPhase()
返回当前的阶段
●void Duel.SkipPhase
●void Duel.SkipPhase
()
(integer player, integer phase, integer reset_flag, integer reset_count)
跳过玩家player的phase阶段,并在特定的阶段后reset。reset参数和效果相同。
●boolean Duel.IsDamageCalculated()
...
...
win32/chinese/history.txt
View file @
85f291e0
# history
F:\games\ygocore\cards (2).cdb
F:\games\ygopro\cards.cdb
F:\games\ygocore\script\c126218.lua
F:\games\ygocore\script\utility.lua
F:\games\ygopro\script\c126218.lua
F:\games\ygocore\script\c99995595.lua
F:\games\ygopro\script\c32864.lua
F:\games\ygocore\script\c126218.lua
F:\games\ygocore\script\c131182.lua
F:\games\ygopro\script\c168917.lua
\ No newline at end of file
F:\games\ygocore\script\c900787.lua
F:\games\ygopro\cards.cdb
F:\games\ygopro\script\c168917.lua
F:\games\ygopro\script\c191749.lua
\ No newline at end of file
win32/chinese/message.txt
View file @
85f291e0
...
...
@@ -67,4 +67,5 @@
0x42 打开文件
0x43 数据库文件(*.cdb)|*.cdb|脚本文件(*.lua)|*.lua|所有文件(*.*)|*.*
0x44 新建文件
0x45 保存完成
\ No newline at end of file
0x45 保存完成
0x46 是否保存脚本?
\ No newline at end of file
win32/english/message.txt
View file @
85f291e0
...
...
@@ -67,4 +67,5 @@
0x42 Open File
0x43 DataBase(*.cdb)|*.cdb|Script(*.lua)|*.lua|all files(*.*)|*.*
0x44 New File
0x45 Save OK
\ No newline at end of file
0x45 Save OK
0x46 If Save Script?
\ No newline at end of file
win32/readme.txt
View file @
85f291e0
[DataEditorX]2.2.2.
0
[DataEditorX]
[DataEditorX]2.2.2.
1
[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★使用前,请关联lua的打开方式,例如记事本,notepad++,等。
...
...
@@ -68,6 +68,10 @@ DataEditorX.exe.config
描述不详细的bug,我修复不了。(都不知道是bug是什么)
★更新历史
2.2.2.1
添加关闭标签快捷键 Ctrl+W
修复lua编辑器打开大文件,无响应
lua内容变动,在关闭提示保存
2.2.2.0
lua编辑器增加根据功能说明搜索函数名
在下面的文本框输入关键字,按Enter
...
...
win32/win32.zip
View file @
85f291e0
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment