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
857ccd03
Commit
857ccd03
authored
Jun 14, 2020
by
JoyJ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a effect creator form(incompleted)
parent
0fa3f82a
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1060 additions
and
254 deletions
+1060
-254
DataEditorX/CodeEditForm.Designer.cs
DataEditorX/CodeEditForm.Designer.cs
+15
-2
DataEditorX/CodeEditForm.cs
DataEditorX/CodeEditForm.cs
+6
-0
DataEditorX/Common/CheckUpdate.cs
DataEditorX/Common/CheckUpdate.cs
+153
-153
DataEditorX/Controls/MySyntaxHighlighter.cs
DataEditorX/Controls/MySyntaxHighlighter.cs
+99
-99
DataEditorX/DataEditorX.csproj
DataEditorX/DataEditorX.csproj
+12
-0
DataEditorX/EffectCreatorForm.Designer.cs
DataEditorX/EffectCreatorForm.Designer.cs
+119
-0
DataEditorX/EffectCreatorForm.cs
DataEditorX/EffectCreatorForm.cs
+85
-0
DataEditorX/EffectCreatorForm.resx
DataEditorX/EffectCreatorForm.resx
+120
-0
DataEditorX/data/effect_creator_settings.txt
DataEditorX/data/effect_creator_settings.txt
+451
-0
No files found.
DataEditorX/CodeEditForm.Designer.cs
View file @
857ccd03
...
...
@@ -54,6 +54,7 @@ private void InitializeComponent()
this
.
menuitem_about
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
menuitem_tools
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
menuitem_testlua
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
effectCreatorToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
tb_input
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
backgroundWorker1
=
new
System
.
ComponentModel
.
BackgroundWorker
();
this
.
toolTip1
=
new
System
.
Windows
.
Forms
.
ToolTip
(
this
.
components
);
...
...
@@ -184,14 +185,15 @@ private void InitializeComponent()
// menuitem_about
//
this
.
menuitem_about
.
Name
=
"menuitem_about"
;
this
.
menuitem_about
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
22
);
this
.
menuitem_about
.
Size
=
new
System
.
Drawing
.
Size
(
1
11
,
22
);
this
.
menuitem_about
.
Text
=
"About"
;
this
.
menuitem_about
.
Click
+=
new
System
.
EventHandler
(
this
.
AboutToolStripMenuItemClick
);
//
// menuitem_tools
//
this
.
menuitem_tools
.
DropDownItems
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
this
.
menuitem_testlua
});
this
.
menuitem_testlua
,
this
.
effectCreatorToolStripMenuItem
});
this
.
menuitem_tools
.
Name
=
"menuitem_tools"
;
this
.
menuitem_tools
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
21
);
this
.
menuitem_tools
.
Text
=
"Tools(&T)"
;
...
...
@@ -204,6 +206,15 @@ private void InitializeComponent()
this
.
menuitem_testlua
.
Text
=
"Syntax Check"
;
this
.
menuitem_testlua
.
Click
+=
new
System
.
EventHandler
(
this
.
menuitem_testlua_Click
);
//
// effectCreatorToolStripMenuItem
//
this
.
effectCreatorToolStripMenuItem
.
Name
=
"effectCreatorToolStripMenuItem"
;
this
.
effectCreatorToolStripMenuItem
.
ShortcutKeys
=
System
.
Windows
.
Forms
.
Keys
.
F3
;
this
.
effectCreatorToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
180
,
22
);
this
.
effectCreatorToolStripMenuItem
.
Text
=
"Effect Creator"
;
this
.
effectCreatorToolStripMenuItem
.
Visible
=
false
;
this
.
effectCreatorToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
effectCreatorToolStripMenuItem_Click
);
//
// tb_input
//
this
.
tb_input
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
...
...
@@ -300,6 +311,7 @@ private void InitializeComponent()
this
.
MainMenuStrip
=
this
.
mainMenu
;
this
.
Name
=
"CodeEditForm"
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
TabText
=
"CodeEditor"
;
this
.
Text
=
"CodeEditor"
;
this
.
FormClosing
+=
new
System
.
Windows
.
Forms
.
FormClosingEventHandler
(
this
.
CodeEditFormFormClosing
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
CodeEditFormLoad
);
...
...
@@ -333,5 +345,6 @@ private void InitializeComponent()
private
System
.
Windows
.
Forms
.
ToolTip
toolTip1
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
menuitem_tools
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
menuitem_testlua
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
effectCreatorToolStripMenuItem
;
}
}
DataEditorX/CodeEditForm.cs
View file @
857ccd03
...
...
@@ -628,5 +628,11 @@ private void menuitem_testlua_Click(object sender, EventArgs e)
MyMsg
.
Show
(
LMSG
.
syntaxCheckPassed
);
}
}
private
void
effectCreatorToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
EffectCreatorForm
form
=
new
EffectCreatorForm
();
form
.
Show
();
}
}
}
DataEditorX/Common/CheckUpdate.cs
View file @
857ccd03
...
...
@@ -12,166 +12,166 @@
namespace
DataEditorX.Common
{
/// <summary>
/// 检查更新
/// </summary>
public
static
class
CheckUpdate
{
static
CheckUpdate
()
{
//连接数
ServicePointManager
.
DefaultConnectionLimit
=
255
;
}
/// <summary>
/// 下载URL
/// </summary>
public
static
string
URL
=
""
;
/// <summary>
/// 从HEAD获取版本号
/// </summary>
public
const
string
DEFAULT
=
"0.0.0.0"
;
/// <summary>
/// 检查更新
/// </summary>
public
static
class
CheckUpdate
{
static
CheckUpdate
()
{
//连接数
ServicePointManager
.
DefaultConnectionLimit
=
255
;
}
/// <summary>
/// 下载URL
/// </summary>
public
static
string
URL
=
""
;
/// <summary>
/// 从HEAD获取版本号
/// </summary>
public
const
string
DEFAULT
=
"0.0.0.0"
;
#
region
检查版本
/// <summary>
/// 获取新版本
/// </summary>
/// <param name="VERURL">链接</param>
/// <returns>版本号</returns>
public
static
string
GetNewVersion
(
string
VERURL
)
{
string
urlver
=
DEFAULT
;
string
html
=
GetHtmlContentByUrl
(
VERURL
);
if
(!
string
.
IsNullOrEmpty
(
html
))
{
Regex
ver
=
new
Regex
(
@"\[DataEditorX\]([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\[DataEditorX\]"
);
Regex
url
=
new
Regex
(
@"\[URL\]([^\[]+?)\[URL\]"
);
if
(
ver
.
IsMatch
(
html
)
&&
url
.
IsMatch
(
html
))
{
Match
mVer
=
ver
.
Match
(
html
);
Match
mUrl
=
url
.
Match
(
html
);
URL
=
mUrl
.
Groups
[
1
].
Value
;
return
$"
{
mVer
.
Groups
[
1
].
Value
}
"
;
}
}
return
urlver
;
}
/// <summary>
/// 检查版本号,格式0.0.0.0
/// </summary>
/// <param name="ver">0.0.0.0</param>
/// <param name="oldver">0.0.0.0</param>
/// <returns>是否有新版本</returns>
public
static
bool
CheckVersion
(
string
ver
,
string
oldver
)
{
bool
hasNew
=
false
;
#
region
检查版本
/// <summary>
/// 获取新版本
/// </summary>
/// <param name="VERURL">链接</param>
/// <returns>版本号</returns>
public
static
string
GetNewVersion
(
string
VERURL
)
{
string
urlver
=
DEFAULT
;
string
html
=
GetHtmlContentByUrl
(
VERURL
);
if
(!
string
.
IsNullOrEmpty
(
html
))
{
Regex
ver
=
new
Regex
(
@"\[DataEditorX\]([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\[DataEditorX\]"
);
Regex
url
=
new
Regex
(
@"\[URL\]([^\[]+?)\[URL\]"
);
if
(
ver
.
IsMatch
(
html
)
&&
url
.
IsMatch
(
html
))
{
Match
mVer
=
ver
.
Match
(
html
);
Match
mUrl
=
url
.
Match
(
html
);
URL
=
mUrl
.
Groups
[
1
].
Value
;
return
$"
{
mVer
.
Groups
[
1
].
Value
}
"
;
}
}
return
urlver
;
}
/// <summary>
/// 检查版本号,格式0.0.0.0
/// </summary>
/// <param name="ver">0.0.0.0</param>
/// <param name="oldver">0.0.0.0</param>
/// <returns>是否有新版本</returns>
public
static
bool
CheckVersion
(
string
ver
,
string
oldver
)
{
bool
hasNew
=
false
;
#if DEBUG
System
.
Windows
.
Forms
.
MessageBox
.
Show
(
oldver
+
"=>"
+
ver
);
#endif
string
[]
vers
=
ver
.
Split
(
'.'
);
string
[]
oldvers
=
oldver
.
Split
(
'.'
);
if
(
vers
.
Length
==
oldvers
.
Length
)
{
//从左到右比较数字
for
(
int
i
=
0
;
i
<
oldvers
.
Length
;
i
++)
{
int
.
TryParse
(
vers
[
i
],
out
int
j
);
int
.
TryParse
(
oldvers
[
i
],
out
int
k
);
if
(
j
>
k
)
//新的版本号大于旧的
{
hasNew
=
true
;
break
;
}
else
if
(
j
<
k
)
{
hasNew
=
false
;
break
;
}
}
}
return
hasNew
;
}
#
endregion
string
[]
vers
=
ver
.
Split
(
'.'
);
string
[]
oldvers
=
oldver
.
Split
(
'.'
);
if
(
vers
.
Length
==
oldvers
.
Length
)
{
//从左到右比较数字
for
(
int
i
=
0
;
i
<
oldvers
.
Length
;
i
++)
{
int
.
TryParse
(
vers
[
i
],
out
int
j
);
int
.
TryParse
(
oldvers
[
i
],
out
int
k
);
if
(
j
>
k
)
//新的版本号大于旧的
{
hasNew
=
true
;
break
;
}
else
if
(
j
<
k
)
{
hasNew
=
false
;
break
;
}
}
}
return
hasNew
;
}
#
endregion
#
region
获取网址内容
/// <summary>
/// 获取网址内容
/// </summary>
/// <param name="url">网址</param>
/// <returns>内容</returns>
public
static
string
GetHtmlContentByUrl
(
string
url
)
{
string
htmlContent
=
string
.
Empty
;
try
{
HttpWebRequest
httpWebRequest
=
(
HttpWebRequest
)
WebRequest
.
Create
(
url
);
httpWebRequest
.
Timeout
=
15000
;
using
(
HttpWebResponse
httpWebResponse
=
(
HttpWebResponse
)
httpWebRequest
.
GetResponse
())
{
using
(
Stream
stream
=
httpWebResponse
.
GetResponseStream
())
{
using
(
StreamReader
streamReader
=
new
StreamReader
(
stream
,
Encoding
.
UTF8
))
{
htmlContent
=
streamReader
.
ReadToEnd
();
streamReader
.
Close
();
}
stream
.
Close
();
}
httpWebResponse
.
Close
();
}
return
htmlContent
;
}
catch
{
#
region
获取网址内容
/// <summary>
/// 获取网址内容
/// </summary>
/// <param name="url">网址</param>
/// <returns>内容</returns>
public
static
string
GetHtmlContentByUrl
(
string
url
)
{
string
htmlContent
=
string
.
Empty
;
try
{
HttpWebRequest
httpWebRequest
=
(
HttpWebRequest
)
WebRequest
.
Create
(
url
);
httpWebRequest
.
Timeout
=
15000
;
using
(
HttpWebResponse
httpWebResponse
=
(
HttpWebResponse
)
httpWebRequest
.
GetResponse
())
{
using
(
Stream
stream
=
httpWebResponse
.
GetResponseStream
())
{
using
(
StreamReader
streamReader
=
new
StreamReader
(
stream
,
Encoding
.
UTF8
))
{
htmlContent
=
streamReader
.
ReadToEnd
();
streamReader
.
Close
();
}
stream
.
Close
();
}
httpWebResponse
.
Close
();
}
return
htmlContent
;
}
catch
{
}
return
""
;
}
#
endregion
}
return
""
;
}
#
endregion
#
region
下载文件
/// <summary>
/// 下载文件
/// </summary>
/// <param name="filename">保存文件路径</param>
/// <returns>是否下载成功</returns>
public
static
bool
DownLoad
(
string
filename
)
{
try
{
if
(
File
.
Exists
(
filename
))
{
File
.
Delete
(
filename
);
}
#
region
下载文件
/// <summary>
/// 下载文件
/// </summary>
/// <param name="filename">保存文件路径</param>
/// <returns>是否下载成功</returns>
public
static
bool
DownLoad
(
string
filename
)
{
try
{
if
(
File
.
Exists
(
filename
))
{
File
.
Delete
(
filename
);
}
HttpWebRequest
Myrq
=
(
HttpWebRequest
)
WebRequest
.
Create
(
URL
);
HttpWebResponse
myrp
=
(
HttpWebResponse
)
Myrq
.
GetResponse
();
long
totalBytes
=
myrp
.
ContentLength
;
HttpWebRequest
Myrq
=
(
HttpWebRequest
)
WebRequest
.
Create
(
URL
);
HttpWebResponse
myrp
=
(
HttpWebResponse
)
Myrq
.
GetResponse
();
long
totalBytes
=
myrp
.
ContentLength
;
Stream
st
=
myrp
.
GetResponseStream
();
Stream
so
=
new
FileStream
(
filename
+
".tmp"
,
FileMode
.
Create
);
long
totalDownloadedByte
=
0
;
byte
[]
by
=
new
byte
[
1024
*
512
];
int
osize
=
st
.
Read
(
by
,
0
,
by
.
Length
);
while
(
osize
>
0
)
{
totalDownloadedByte
=
osize
+
totalDownloadedByte
;
System
.
Windows
.
Forms
.
Application
.
DoEvents
();
so
.
Write
(
by
,
0
,
osize
);
osize
=
st
.
Read
(
by
,
0
,
by
.
Length
);
}
so
.
Close
();
st
.
Close
();
File
.
Move
(
filename
+
".tmp"
,
filename
);
}
catch
(
System
.
Exception
)
{
return
false
;
}
return
true
;
}
#
endregion
}
Stream
st
=
myrp
.
GetResponseStream
();
Stream
so
=
new
FileStream
(
filename
+
".tmp"
,
FileMode
.
Create
);
long
totalDownloadedByte
=
0
;
byte
[]
by
=
new
byte
[
1024
*
512
];
int
osize
=
st
.
Read
(
by
,
0
,
by
.
Length
);
while
(
osize
>
0
)
{
totalDownloadedByte
=
osize
+
totalDownloadedByte
;
System
.
Windows
.
Forms
.
Application
.
DoEvents
();
so
.
Write
(
by
,
0
,
osize
);
osize
=
st
.
Read
(
by
,
0
,
by
.
Length
);
}
so
.
Close
();
st
.
Close
();
File
.
Move
(
filename
+
".tmp"
,
filename
);
}
catch
(
System
.
Exception
)
{
return
false
;
}
return
true
;
}
#
endregion
}
}
DataEditorX/Controls/MySyntaxHighlighter.cs
View file @
857ccd03
This diff is collapsed.
Click to expand it.
DataEditorX/DataEditorX.csproj
View file @
857ccd03
...
...
@@ -155,6 +155,12 @@
<Compile
Include=
"DataEditForm.Designer.cs"
>
<DependentUpon>
DataEditForm.cs
</DependentUpon>
</Compile>
<Compile
Include=
"EffectCreatorForm.cs"
>
<SubType>
Form
</SubType>
</Compile>
<Compile
Include=
"EffectCreatorForm.Designer.cs"
>
<DependentUpon>
EffectCreatorForm.cs
</DependentUpon>
</Compile>
<Compile
Include=
"Language\LanguageHelper.cs"
/>
<Compile
Include=
"Language\LMsg.cs"
/>
<Compile
Include=
"Language\MyMsg.cs"
/>
...
...
@@ -171,6 +177,9 @@
<Content
Include=
"changed.txt"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<Content
Include=
"data\effect_creator_settings.txt"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<Content
Include=
"data\mse_Chinese-Traditional.txt"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
...
...
@@ -234,6 +243,9 @@
<EmbeddedResource
Include=
"DataEditForm.resx"
>
<DependentUpon>
DataEditForm.cs
</DependentUpon>
</EmbeddedResource>
<EmbeddedResource
Include=
"EffectCreatorForm.resx"
>
<DependentUpon>
EffectCreatorForm.cs
</DependentUpon>
</EmbeddedResource>
<EmbeddedResource
Include=
"MainForm.resx"
>
<DependentUpon>
MainForm.cs
</DependentUpon>
</EmbeddedResource>
...
...
DataEditorX/EffectCreatorForm.Designer.cs
0 → 100644
View file @
857ccd03
namespace
DataEditorX
{
partial
class
EffectCreatorForm
{
/// <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
Windows
Form
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
.
textBox1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
listEffectCode
=
new
System
.
Windows
.
Forms
.
CheckedListBox
();
this
.
gbSpecialOptions
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
checkEnableReviveLimit
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
gbEffectType
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
gbSpecialOptions
.
SuspendLayout
();
this
.
gbEffectType
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// textBox1
//
this
.
textBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
textBox1
.
Location
=
new
System
.
Drawing
.
Point
(
721
,
12
);
this
.
textBox1
.
Multiline
=
true
;
this
.
textBox1
.
Name
=
"textBox1"
;
this
.
textBox1
.
Size
=
new
System
.
Drawing
.
Size
(
293
,
441
);
this
.
textBox1
.
TabIndex
=
0
;
//
// listEffectCode
//
this
.
listEffectCode
.
FormattingEnabled
=
true
;
this
.
listEffectCode
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
20
);
this
.
listEffectCode
.
Name
=
"listEffectCode"
;
this
.
listEffectCode
.
Size
=
new
System
.
Drawing
.
Size
(
251
,
132
);
this
.
listEffectCode
.
TabIndex
=
1
;
//
// gbSpecialOptions
//
this
.
gbSpecialOptions
.
Controls
.
Add
(
this
.
checkEnableReviveLimit
);
this
.
gbSpecialOptions
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
12
);
this
.
gbSpecialOptions
.
Name
=
"gbSpecialOptions"
;
this
.
gbSpecialOptions
.
Size
=
new
System
.
Drawing
.
Size
(
148
,
54
);
this
.
gbSpecialOptions
.
TabIndex
=
2
;
this
.
gbSpecialOptions
.
TabStop
=
false
;
this
.
gbSpecialOptions
.
Text
=
"特殊选项"
;
//
// checkEnableReviveLimit
//
this
.
checkEnableReviveLimit
.
AutoSize
=
true
;
this
.
checkEnableReviveLimit
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
20
);
this
.
checkEnableReviveLimit
.
Name
=
"checkEnableReviveLimit"
;
this
.
checkEnableReviveLimit
.
Size
=
new
System
.
Drawing
.
Size
(
96
,
16
);
this
.
checkEnableReviveLimit
.
TabIndex
=
0
;
this
.
checkEnableReviveLimit
.
Text
=
"开启召唤限制"
;
this
.
checkEnableReviveLimit
.
UseVisualStyleBackColor
=
true
;
//
// gbEffectType
//
this
.
gbEffectType
.
Controls
.
Add
(
this
.
listEffectCode
);
this
.
gbEffectType
.
Location
=
new
System
.
Drawing
.
Point
(
166
,
12
);
this
.
gbEffectType
.
Name
=
"gbEffectType"
;
this
.
gbEffectType
.
Size
=
new
System
.
Drawing
.
Size
(
263
,
173
);
this
.
gbEffectType
.
TabIndex
=
3
;
this
.
gbEffectType
.
TabStop
=
false
;
this
.
gbEffectType
.
Text
=
"效果种类"
;
//
// EffectCreatorForm
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1026
,
465
);
this
.
Controls
.
Add
(
this
.
gbEffectType
);
this
.
Controls
.
Add
(
this
.
gbSpecialOptions
);
this
.
Controls
.
Add
(
this
.
textBox1
);
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
FixedToolWindow
;
this
.
Name
=
"EffectCreatorForm"
;
this
.
TabText
=
"Effect Creator"
;
this
.
Text
=
"Effect Creator"
;
this
.
TopMost
=
true
;
this
.
Load
+=
new
System
.
EventHandler
(
this
.
EffectCreatorForm_Load
);
this
.
gbSpecialOptions
.
ResumeLayout
(
false
);
this
.
gbSpecialOptions
.
PerformLayout
();
this
.
gbEffectType
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
}
#
endregion
private
System
.
Windows
.
Forms
.
TextBox
textBox1
;
private
System
.
Windows
.
Forms
.
CheckedListBox
listEffectCode
;
private
System
.
Windows
.
Forms
.
GroupBox
gbSpecialOptions
;
private
System
.
Windows
.
Forms
.
CheckBox
checkEnableReviveLimit
;
private
System
.
Windows
.
Forms
.
GroupBox
gbEffectType
;
}
}
\ No newline at end of file
DataEditorX/EffectCreatorForm.cs
0 → 100644
View file @
857ccd03
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
WeifenLuo.WinFormsUI.Docking
;
namespace
DataEditorX
{
public
partial
class
EffectCreatorForm
:
DockContent
{
public
EffectCreatorForm
()
{
this
.
InitializeComponent
();
}
class
EffectCreatorItem
{
public
string
Key
;
public
string
Value
;
public
string
Hint
;
public
EffectCreatorItem
(
string
key
,
string
value
)
{
this
.
Key
=
key
??
throw
new
ArgumentNullException
(
nameof
(
key
));
this
.
Value
=
value
;
}
public
EffectCreatorItem
(
string
key
,
string
value
,
string
hint
)
:
this
(
key
,
value
)
{
this
.
Hint
=
hint
;
}
public
override
string
ToString
()
{
return
Value
;
}
}
Dictionary
<
string
,
List
<
EffectCreatorItem
>>
itemDic
=
new
Dictionary
<
string
,
List
<
EffectCreatorItem
>>();
private
void
EffectCreatorForm_Load
(
object
sender
,
EventArgs
e
)
{
string
config
=
$"data
{
Path
.
DirectorySeparatorChar
}
effect_creator_settings.txt"
;
if
(!
File
.
Exists
(
config
))
{
return
;
}
char
[]
sepChars
=
new
char
[]{
' '
,
'\t'
,
' '
};
FileStream
fs
=
new
FileStream
(
config
,
FileMode
.
Open
);
StreamReader
sr
=
new
StreamReader
(
fs
);
string
nowType
=
""
;
for
(
string
line
=
sr
.
ReadLine
();
line
!=
null
;
line
=
sr
.
ReadLine
())
{
line
=
line
.
Trim
();
if
(
line
.
StartsWith
(
"!"
))
{
nowType
=
line
.
Substring
(
1
);
if
(!
itemDic
.
ContainsKey
(
nowType
))
{
itemDic
.
Add
(
nowType
,
new
List
<
EffectCreatorItem
>());
}
continue
;
}
if
(
line
.
StartsWith
(
"#"
))
{
continue
;
}
string
[]
split
=
line
.
Split
(
sepChars
,
StringSplitOptions
.
RemoveEmptyEntries
);
if
(
split
.
Length
==
2
)
{
itemDic
[
nowType
].
Add
(
new
EffectCreatorItem
(
split
[
0
],
split
[
1
]));
}
if
(
split
.
Length
==
3
)
{
itemDic
[
nowType
].
Add
(
new
EffectCreatorItem
(
split
[
0
],
split
[
1
],
split
[
2
]));
}
}
foreach
(
var
item
in
itemDic
[
"EFFECT_CODES"
])
{
listEffectCode
.
Items
.
Add
(
item
);
}
foreach
(
var
item
in
itemDic
[
"EVENT_CODES"
])
{
listEffectCode
.
Items
.
Add
(
item
);
}
}
}
}
DataEditorX/EffectCreatorForm.resx
0 → 100644
View file @
857ccd03
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema
id=
"root"
xmlns=
""
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
xmlns:msdata=
"urn:schemas-microsoft-com:xml-msdata"
>
<xsd:import
namespace=
"http://www.w3.org/XML/1998/namespace"
/>
<xsd:element
name=
"root"
msdata:IsDataSet=
"true"
>
<xsd:complexType>
<xsd:choice
maxOccurs=
"unbounded"
>
<xsd:element
name=
"metadata"
>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name=
"value"
type=
"xsd:string"
minOccurs=
"0"
/>
</xsd:sequence>
<xsd:attribute
name=
"name"
use=
"required"
type=
"xsd:string"
/>
<xsd:attribute
name=
"type"
type=
"xsd:string"
/>
<xsd:attribute
name=
"mimetype"
type=
"xsd:string"
/>
<xsd:attribute
ref=
"xml:space"
/>
</xsd:complexType>
</xsd:element>
<xsd:element
name=
"assembly"
>
<xsd:complexType>
<xsd:attribute
name=
"alias"
type=
"xsd:string"
/>
<xsd:attribute
name=
"name"
type=
"xsd:string"
/>
</xsd:complexType>
</xsd:element>
<xsd:element
name=
"data"
>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name=
"value"
type=
"xsd:string"
minOccurs=
"0"
msdata:Ordinal=
"1"
/>
<xsd:element
name=
"comment"
type=
"xsd:string"
minOccurs=
"0"
msdata:Ordinal=
"2"
/>
</xsd:sequence>
<xsd:attribute
name=
"name"
type=
"xsd:string"
use=
"required"
msdata:Ordinal=
"1"
/>
<xsd:attribute
name=
"type"
type=
"xsd:string"
msdata:Ordinal=
"3"
/>
<xsd:attribute
name=
"mimetype"
type=
"xsd:string"
msdata:Ordinal=
"4"
/>
<xsd:attribute
ref=
"xml:space"
/>
</xsd:complexType>
</xsd:element>
<xsd:element
name=
"resheader"
>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name=
"value"
type=
"xsd:string"
minOccurs=
"0"
msdata:Ordinal=
"1"
/>
</xsd:sequence>
<xsd:attribute
name=
"name"
type=
"xsd:string"
use=
"required"
/>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader
name=
"resmimetype"
>
<value>
text/microsoft-resx
</value>
</resheader>
<resheader
name=
"version"
>
<value>
2.0
</value>
</resheader>
<resheader
name=
"reader"
>
<value>
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
</resheader>
<resheader
name=
"writer"
>
<value>
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
</resheader>
</root>
\ No newline at end of file
DataEditorX/data/effect_creator_settings.txt
0 → 100644
View file @
857ccd03
This diff is collapsed.
Click to expand it.
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