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
1
Issues
1
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
nanahira
DataEditorX
Commits
715a9175
Commit
715a9175
authored
Jun 03, 2014
by
247321453
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
9efdeef1
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
143 additions
and
455 deletions
+143
-455
DataEditorX/Core/DataBase.cs
DataEditorX/Core/DataBase.cs
+27
-6
DataEditorX/Data/ygopro.txt
DataEditorX/Data/ygopro.txt
+0
-1
DataEditorX/DataEditForm.cs
DataEditorX/DataEditForm.cs
+101
-27
DataEditorX/DataEditorX.csproj
DataEditorX/DataEditorX.csproj
+0
-14
DataEditorX/MyUpdate.cs
DataEditorX/MyUpdate.cs
+0
-123
DataEditorX/Program.cs
DataEditorX/Program.cs
+6
-16
DataEditorX/Properties/AssemblyInfo.cs
DataEditorX/Properties/AssemblyInfo.cs
+1
-1
DataEditorX/UpdateForm.Designer.cs
DataEditorX/UpdateForm.Designer.cs
+0
-65
DataEditorX/UpdateForm.cs
DataEditorX/UpdateForm.cs
+0
-71
DataEditorX/UpdateForm.resx
DataEditorX/UpdateForm.resx
+0
-120
DataEditorX/readme.txt
DataEditorX/readme.txt
+4
-0
DataEditorX/update.txt
DataEditorX/update.txt
+0
-5
win32/Data/ygopro.txt
win32/Data/ygopro.txt
+0
-1
win32/DataEditorX.exe
win32/DataEditorX.exe
+0
-0
win32/readme.txt
win32/readme.txt
+4
-0
win32/update.txt
win32/update.txt
+0
-5
No files found.
DataEditorX/Core/DataBase.cs
View file @
715a9175
...
...
@@ -303,6 +303,12 @@ public static int CopyDB(string DB, bool ignore,params Card[] cards)
#
region
SQL
语句
#
region
查询
static
string
toInt
(
long
l
)
{
unchecked
{
return
((
int
)
l
).
ToString
();
}
}
public
static
string
GetSelectSQL
(
Card
c
)
{
StringBuilder
sb
=
new
StringBuilder
();
...
...
@@ -311,20 +317,35 @@ public static string GetSelectSQL(Card c)
sb
.
Append
(
" and texts.name like '%"
+
c
.
name
+
"%' "
);
if
(!
string
.
IsNullOrEmpty
(
c
.
desc
))
sb
.
Append
(
" and texts.desc like '%"
+
c
.
desc
+
"%' "
);
unchecked
{
/*
if(c.setcode>0)
{
string temp;
temp=toInt(c.setcode);
sb.Append(" and ( datas.setcode & "+temp+"="+temp);
temp=toInt(c.setcode<<0x10);
if(temp!="0")
sb.Append(" or datas.setcode & "+temp+"="+temp);
temp=toInt(c.setcode<<0x20);
if(temp!="0")
sb.Append(" or datas.setcode & "+temp+"="+temp);
temp=toInt(c.setcode<<0x30);
if(temp!="0")
sb.Append(" or datas.setcode & "+temp+"="+temp);
sb.Append(" ) ");
}*/
if
(
c
.
ot
>
0
)
sb
.
Append
(
" and datas.ot & "
+
c
.
ot
.
ToString
()+
" = "
+
c
.
ot
.
ToString
());
if
(
c
.
attribute
>
0
)
sb
.
Append
(
" and datas.attribute & "
+
c
.
attribute
.
ToString
()+
" = "
+
c
.
attribute
.
ToString
());
if
(
c
.
level
>
0
)
sb
.
Append
(
" and datas.level & "
+
((
int
)
c
.
level
).
ToString
()+
" = "
+((
int
)
c
.
level
).
ToString
(
));
sb
.
Append
(
" and datas.level & "
+
toInt
(
c
.
level
)+
" = "
+
toInt
(
c
.
level
));
if
(
c
.
race
>
0
)
sb
.
Append
(
" and datas.race & "
+
((
int
)
c
.
race
).
ToString
()+
" = "
+((
int
)
c
.
race
).
ToString
(
));
sb
.
Append
(
" and datas.race & "
+
toInt
(
c
.
race
)+
" = "
+
toInt
(
c
.
race
));
if
(
c
.
type
>
0
)
sb
.
Append
(
" and datas.type & "
+
((
int
)
c
.
type
).
ToString
()+
" = "
+((
int
)
c
.
type
).
ToString
(
));
sb
.
Append
(
" and datas.type & "
+
toInt
(
c
.
type
)+
" = "
+
toInt
(
c
.
type
));
if
(
c
.
category
>
0
)
sb
.
Append
(
" and datas.category & "
+((
int
)
c
.
category
).
ToString
()+
" = "
+((
int
)
c
.
category
).
ToString
());
}
sb
.
Append
(
" and datas.category & "
+
toInt
(
c
.
category
)+
" = "
+
toInt
(
c
.
category
));
if
(
c
.
id
>
0
&&
c
.
alias
<
0
)
sb
.
Append
(
" and datas.id >= "
+
c
.
id
.
ToString
());
else
if
(
c
.
id
>
0
&&
c
.
alias
>
0
)
...
...
DataEditorX/Data/ygopro.txt
deleted
100644 → 0
View file @
9efdeef1
F:\game\YGOPRO
\ No newline at end of file
DataEditorX/DataEditForm.cs
View file @
715a9175
...
...
@@ -10,6 +10,7 @@
using
System.Drawing
;
using
System.Globalization
;
using
System.IO
;
using
System.Net
;
using
System.Text
;
using
System.Windows.Forms
;
...
...
@@ -23,6 +24,7 @@ public partial class DataEditForm : Form
string
GAMEPATH
,
PICPATH
,
LUAPTH
;
readonly
string
GITURL
=
"https://github.com/247321453/DataEcitorX"
;
string
VERURL
=
"http://hi.baidu.com/247321453"
;
string
HEAD
=
"[DataEditorX]"
;
Card
oldCard
=
new
Card
(
0
);
Card
srcCard
=
new
Card
(
0
);
ImageForm
imgform
=
new
ImageForm
();
...
...
@@ -49,8 +51,26 @@ public partial class DataEditForm : Form
string
conftype
=
"card-type.txt"
;
string
confcategory
=
"card-category.txt"
;
string
confcover
=
"cover.jpg"
;
void
SetCDB
(
string
cdb
)
{
this
.
nowCdbFile
=
cdb
;
this
.
Text
=
nowCdbFile
+
"-"
+
title
;
char
SEP
=
Path
.
DirectorySeparatorChar
;
int
l
=
nowCdbFile
.
LastIndexOf
(
SEP
);
GAMEPATH
=(
l
>
0
)?
nowCdbFile
.
Substring
(
0
,
l
+
1
):
cdb
;
PICPATH
=
Path
.
Combine
(
GAMEPATH
,
"pics"
);
if
(!
Directory
.
Exists
(
PICPATH
))
Directory
.
CreateDirectory
(
PICPATH
);
LUAPTH
=
Path
.
Combine
(
GAMEPATH
,
"script"
);
if
(!
Directory
.
Exists
(
LUAPTH
))
Directory
.
CreateDirectory
(
LUAPTH
);
}
#
endregion
#
region
界面初始化
public
DataEditForm
(
string
cdbfile
)
{
...
...
@@ -66,7 +86,7 @@ public DataEditForm()
void
DataEditFormLoad
(
object
sender
,
EventArgs
e
)
{
InitListRows
();
Version
ver
=
new
Version
(
Application
.
ProductVersion
);
Version
ver
=
new
Version
(
Application
.
ProductVersion
);
string
strVer
=
ver
.
ToString
();
#
if
DEBUG
this
.
Text
=
this
.
Text
+
"(DEBUG)"
;
...
...
@@ -81,7 +101,7 @@ void DataEditFormLoad(object sender, EventArgs e)
//set null card
oldCard
=
new
Card
(
0
);
SetCard
(
oldCard
);
if
(
!
string
.
IsNullOrEmpty
(
nowCdbFile
))
if
(
File
.
Exists
(
nowCdbFile
))
Open
(
nowCdbFile
);
}
...
...
@@ -89,15 +109,7 @@ void InitPath()
{
GAMEPATH
=
Application
.
StartupPath
;
string
datapath
=
Path
.
Combine
(
Application
.
StartupPath
,
"data"
);
string
txt
=
Path
.
Combine
(
datapath
,
"ygopro.txt"
);
if
(
File
.
Exists
(
txt
))
{
string
[]
lines
=
File
.
ReadAllLines
(
txt
,
Encoding
.
UTF8
);
if
(
Directory
.
Exists
(
lines
[
0
]))
GAMEPATH
=(
lines
.
Length
>
0
)?
lines
[
0
]:
Application
.
StartupPath
;
else
MyMsg
.
Warning
(
string
.
Format
(
"游戏目录不存在,请重新设置。\n{0}\n设置文件:\n{0}"
,
lines
[
0
],
txt
));
}
string
urltxt
=
Path
.
Combine
(
datapath
,
"update.txt"
);
if
(
File
.
Exists
(
urltxt
))
{
...
...
@@ -105,8 +117,6 @@ void InitPath()
if
(
lines
.
Length
>
0
)
VERURL
=
lines
[
0
];
}
PICPATH
=
Path
.
Combine
(
GAMEPATH
,
"pics"
);
LUAPTH
=
Path
.
Combine
(
GAMEPATH
,
"script"
);
confrule
=
Path
.
Combine
(
datapath
,
"card-rule.txt"
);
confattribute
=
Path
.
Combine
(
datapath
,
"card-attribute.txt"
);
...
...
@@ -381,7 +391,7 @@ long GetCheck(FlowLayoutPanel fpl)
return
number
;
}
#
endregion
#
region
卡片列表
void
Lv_cardlistSelectedIndexChanged
(
object
sender
,
EventArgs
e
)
{
...
...
@@ -493,8 +503,7 @@ public bool Open(string cdbFile)
MyMsg
.
Error
(
string
.
Format
(
"文件不存在!\n{0}"
,
cdbFile
));
return
false
;
}
nowCdbFile
=
cdbFile
;
this
.
Text
=
cdbFile
+
"-"
+
title
;
SetCDB
(
cdbFile
);
cardlist
.
Clear
();
SetCards
(
DataBase
.
Read
(
cdbFile
,
true
,
""
),
false
);
...
...
@@ -664,7 +673,18 @@ public bool OpenScript()
{
if
(
MyMsg
.
Question
(
string
.
Format
(
"是否创建脚本?\n{0}"
,
lua
)))
{
File
.
Create
(
lua
);
if
(!
Directory
.
Exists
(
LUAPTH
))
Directory
.
CreateDirectory
(
LUAPTH
);
using
(
FileStream
fs
=
new
FileStream
(
lua
,
FileMode
.
OpenOrCreate
,
FileAccess
.
Write
))
{
StreamWriter
sw
=
new
StreamWriter
(
fs
,
new
UTF8Encoding
(
false
));
sw
.
WriteLine
(
"--"
+
tb_cardname
.
Text
);
sw
.
Close
();
fs
.
Close
();
}
}
}
if
(
File
.
Exists
(
lua
))
...
...
@@ -796,18 +816,72 @@ void Menuitem_aboutClick(object sender, EventArgs e)
void
Menuitem_checkupdateClick
(
object
sender
,
EventArgs
e
)
{
if
(
MyMsg
.
Question
(
"进入更新模式,需要重新启动程序,确认?"
))
string
newver
=
CheckUpdate
(
VERURL
);
int
iver
,
iver2
;
int
.
TryParse
(
Application
.
ProductVersion
.
Replace
(
"."
,
""
),
out
iver
);
int
.
TryParse
(
newver
.
Replace
(
"."
,
""
),
out
iver2
);
if
(
iver2
>
iver
)
{
if
(
MyMsg
.
Question
(
"发现新版本:"
+
newver
+
"\n是否打开下载页面?"
))
{
System
.
Diagnostics
.
Process
.
Start
(
VERURL
);
}
}
else
{
MyMsg
.
Show
(
"已经是最新版本!"
);
}
}
string
CheckUpdate
(
string
url
)
{
string
urlver
=
"0.0.0.0"
;
string
html
=
GetHtmlContentByUrl
(
VERURL
);
if
(!
string
.
IsNullOrEmpty
(
html
))
{
string
updateexe
=
Application
.
StartupPath
+
"update.exe"
;
File
.
Copy
(
Application
.
ExecutablePath
,
updateexe
,
true
);
System
.
Diagnostics
.
Process
p
=
new
System
.
Diagnostics
.
Process
();
p
.
StartInfo
.
FileName
=
updateexe
;
p
.
StartInfo
.
Arguments
=
" update"
;
p
.
StartInfo
.
WorkingDirectory
=
Application
.
StartupPath
;
p
.
Start
();
Application
.
Exit
();
int
t
,
w
;
t
=
html
.
IndexOf
(
HEAD
);
w
=(
t
>
0
)?
html
.
IndexOf
(
HEAD
,
t
+
HEAD
.
Length
):
0
;
if
(
w
>
0
)
{
urlver
=
html
.
Substring
(
t
+
HEAD
.
Length
,
w
-
t
-
HEAD
.
Length
);
}
}
return
urlver
;
}
#
region
获取网址内容
string
GetHtmlContentByUrl
(
string
url
)
{
string
htmlContent
=
string
.
Empty
;
try
{
HttpWebRequest
httpWebRequest
=
(
HttpWebRequest
)
WebRequest
.
Create
(
url
);
httpWebRequest
.
Timeout
=
5000
;
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
void
Menuitem_githubClick
(
object
sender
,
EventArgs
e
)
{
System
.
Diagnostics
.
Process
.
Start
(
GITURL
);
...
...
@@ -879,7 +953,7 @@ void CopyTo(bool onlyselect)
else
DataBase
.
CopyDB
(
dlg
.
FileName
,
true
,
cards
.
ToArray
());
}
}
}
}
void
Menuitem_readydkClick
(
object
sender
,
EventArgs
e
)
{
...
...
DataEditorX/DataEditorX.csproj
View file @
715a9175
...
...
@@ -66,13 +66,8 @@
<DependentUpon>
ImageForm.cs
</DependentUpon>
</Compile>
<Compile
Include=
"MyMsg.cs"
/>
<Compile
Include=
"MyUpdate.cs"
/>
<Compile
Include=
"Program.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
<Compile
Include=
"UpdateForm.cs"
/>
<Compile
Include=
"UpdateForm.Designer.cs"
>
<DependentUpon>
UpdateForm.cs
</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource
Include=
"DataEditForm.resx"
>
...
...
@@ -81,9 +76,6 @@
<EmbeddedResource
Include=
"ImageForm.resx"
>
<DependentUpon>
ImageForm.cs
</DependentUpon>
</EmbeddedResource>
<EmbeddedResource
Include=
"UpdateForm.resx"
>
<DependentUpon>
UpdateForm.cs
</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Folder
Include=
"Data"
/>
...
...
@@ -117,15 +109,9 @@
<None
Include=
"Data\update.txt"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Data\ygopro.txt"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"readme.txt"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"update.txt"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
</Project>
\ No newline at end of file
DataEditorX/MyUpdate.cs
deleted
100644 → 0
View file @
9efdeef1
/*
* 由SharpDevelop创建。
* 用户: Acer
* 日期: 5月21 星期三
* 时间: 10:10
*
*/
using
System
;
using
System.IO
;
using
System.Text
;
using
System.Net
;
using
System.Windows.Forms
;
namespace
DataEditorX
{
/// <summary>
/// Description of MyUpdate.
/// </summary>
public
static
class
MyUpdate
{
static
string
downloadURL
=
""
;
static
string
Head
=
"[DataEditorX]"
;
static
string
Vhead
=
"v"
;
static
string
Thead
=
"t"
;
static
string
Dhead
=
"d"
;
/*更新格式
* <v>1.1.0.3<v>
* <t>2014-5-21 11:50<t>
* <d>http://a.zip http://b.zip<d>
* */
public
static
bool
CheckUpdate
(
string
url
)
{
string
ver
,
lasttime
,
verurl
;
int
t
,
w
;
string
html
=
GetHtmlContentByUrl
(
url
);
if
(
string
.
IsNullOrEmpty
(
html
))
{
MyMsg
.
Error
(
"无法获取版本!"
);
return
false
;
}
t
=
html
.
IndexOf
(
Head
);
w
=(
t
>=
0
)?
html
.
IndexOf
(
Head
,
t
+
1
):
0
;
if
(
w
<=
0
)
{
MyMsg
.
Error
(
"无法解释网址内容!\n"
+
url
);
return
false
;
}
verurl
=
html
.
Substring
(
t
+
Head
.
Length
,
w
-
t
-
Head
.
Length
);
if
(!
verurl
.
StartsWith
(
"http://"
,
StringComparison
.
OrdinalIgnoreCase
))
verurl
=
"http://"
+
verurl
;
#
if
DEBUG
MyMsg
.
Show
(
verurl
);
#
endif
html
=
GetHtmlContentByUrl
(
verurl
);
if
(
string
.
IsNullOrEmpty
(
html
))
{
MyMsg
.
Error
(
"无法解释网址内容!\n"
+
verurl
);
return
false
;
}
w
=
0
;
t
=
html
.
IndexOf
(
"<"
+
Vhead
+
">"
,
w
);
w
=(
t
>=
0
)?
html
.
IndexOf
(
"<"
+
Vhead
+
">"
,
t
+
1
):
0
;
ver
=(
w
>
0
)?
html
.
Substring
(
t
+
Vhead
.
Length
+
2
,
w
-
t
-
Vhead
.
Length
-
2
):
"?.?.?.?"
;
t
=
html
.
IndexOf
(
"<"
+
Thead
+
">"
,
w
);
w
=(
t
>=
0
)?
html
.
IndexOf
(
"<"
+
Thead
+
">"
,
t
+
1
):
0
;
lasttime
=(
w
>
0
)?
html
.
Substring
(
t
+
Thead
.
Length
+
2
,
w
-
t
-
Thead
.
Length
-
2
):
"????-??-?? ??:??"
;
t
=
html
.
IndexOf
(
"<"
+
Dhead
+
">"
,
w
);
w
=(
t
>=
0
)?
html
.
IndexOf
(
"<"
+
Dhead
+
">"
,
t
+
1
):
0
;
downloadURL
=(
w
>
0
)?
html
.
Substring
(
t
+
Dhead
.
Length
+
2
,
w
-
t
-
Dhead
.
Length
-
2
):
""
;
if
(!
string
.
IsNullOrEmpty
(
downloadURL
))
{
downloadURL
=
downloadURL
.
Replace
(
" http://"
,
"\nhttp://"
);
Clipboard
.
SetText
(
downloadURL
);
}
MyMsg
.
Show
(
"当前版本:"
+
Application
.
ProductVersion
+
"\n最新版本:"
+
ver
+
"\n最后更新时间:"
+
lasttime
+
"\n下载地址:(已经复制到粘贴板)\n"
+
downloadURL
);
return
false
;
}
/// <summary>
///根据url获取网站html内容 /// </summary>
/// <param name="url">网址</param> /// <returns>获取网站html内容</returns>
public
static
string
GetHtmlContentByUrl
(
string
url
)
{
string
htmlContent
=
string
.
Empty
;
try
{
HttpWebRequest
httpWebRequest
=
(
HttpWebRequest
)
WebRequest
.
Create
(
url
);
httpWebRequest
.
Timeout
=
5000
;
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
""
;
}
}
}
DataEditorX/Program.cs
View file @
715a9175
...
...
@@ -6,6 +6,7 @@
*
*/
using
System
;
using
System.IO
;
using
System.Windows.Forms
;
namespace
DataEditorX
...
...
@@ -23,23 +24,12 @@ private static void Main(string[] args)
{
Application
.
EnableVisualStyles
();
Application
.
SetCompatibleTextRenderingDefault
(
false
);
if
(
args
.
Length
==
1
)
string
arg
=
""
;
if
(
args
.
Length
>
0
)
{
if
(
args
[
0
]==
"update"
)
//进入更新模式
{
Application
.
Run
(
new
UpdateForm
(
Application
.
ProductVersion
));
}
else
if
(
args
[
0
]==
"updated"
)
//更新完成,删除更新文件
{
if
(
args
.
Length
>
1
)
System
.
IO
.
File
.
Delete
(
args
[
1
]);
Application
.
Run
(
new
DataEditForm
());
}
else
Application
.
Run
(
new
DataEditForm
(
args
[
0
]));
arg
=
args
[
0
];
}
else
Application
.
Run
(
new
DataEditForm
());
}
Application
.
Run
(
new
DataEditForm
(
arg
));
}
}
}
DataEditorX/Properties/AssemblyInfo.cs
View file @
715a9175
...
...
@@ -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
(
"1.2.
0
.1"
)]
[
assembly
:
AssemblyVersion
(
"1.2.
1
.1"
)]
DataEditorX/UpdateForm.Designer.cs
deleted
100644 → 0
View file @
9efdeef1
/*
* 由SharpDevelop创建。
* 用户: Acer
* 日期: 5月21 星期三
* 时间: 16:21
*
*/
namespace
DataEditorX
{
partial
class
UpdateForm
{
/// <summary>
/// Designer variable used to keep track of non-visual components.
/// </summary>
private
System
.
ComponentModel
.
IContainer
components
=
null
;
/// <summary>
/// Disposes resources used by the form.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected
override
void
Dispose
(
bool
disposing
)
{
if
(
disposing
)
{
if
(
components
!=
null
)
{
components
.
Dispose
();
}
}
base
.
Dispose
(
disposing
);
}
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private
void
InitializeComponent
()
{
this
.
btn_check
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
SuspendLayout
();
//
// btn_check
//
this
.
btn_check
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
12
);
this
.
btn_check
.
Name
=
"btn_check"
;
this
.
btn_check
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
btn_check
.
TabIndex
=
0
;
this
.
btn_check
.
Text
=
"检查更新"
;
this
.
btn_check
.
UseVisualStyleBackColor
=
true
;
this
.
btn_check
.
Click
+=
new
System
.
EventHandler
(
this
.
Btn_checkClick
);
//
// UpdateForm
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
497
,
315
);
this
.
Controls
.
Add
(
this
.
btn_check
);
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
Fixed3D
;
this
.
MaximizeBox
=
false
;
this
.
Name
=
"UpdateForm"
;
this
.
Text
=
"DataEditorX更新"
;
this
.
ResumeLayout
(
false
);
}
private
System
.
Windows
.
Forms
.
Button
btn_check
;
}
}
DataEditorX/UpdateForm.cs
deleted
100644 → 0
View file @
9efdeef1
/*
* 由SharpDevelop创建。
* 用户: Acer
* 日期: 5月21 星期三
* 时间: 16:21
*
*/
using
System
;
using
System.Drawing
;
using
System.IO
;
using
System.Text
;
using
System.Net
;
using
System.Windows.Forms
;
namespace
DataEditorX
{
/// <summary>
/// Description of UpdateForm.
/// </summary>
public
partial
class
UpdateForm
:
Form
{
string
Ver
;
public
UpdateForm
()
{
Ver
=
Application
.
ProductVersion
;
InitializeComponent
();
}
public
UpdateForm
(
string
ver
)
{
Ver
=
ver
;
InitializeComponent
();
}
void
Btn_checkClick
(
object
sender
,
EventArgs
e
)
{
}
#
region
获取网址内容
string
GetHtmlContentByUrl
(
string
url
)
{
string
htmlContent
=
string
.
Empty
;
try
{
HttpWebRequest
httpWebRequest
=
(
HttpWebRequest
)
WebRequest
.
Create
(
url
);
httpWebRequest
.
Timeout
=
5000
;
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
}
}
DataEditorX/UpdateForm.resx
deleted
100644 → 0
View file @
9efdeef1
<?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>
\ No newline at end of file
DataEditorX/readme.txt
View file @
715a9175
...
...
@@ -21,6 +21,10 @@ data\ygopro.txt
★更新历史
1.2.1.1
自动把游戏目录设为cdb的目录
1.2.1.0
更改检查更新网址为我的百度空间
1.2.0.0
添加检查新版本
修复setname
DataEditorX/update.txt
deleted
100644 → 0
View file @
9efdeef1
<ver>1.2.0.1</ver>
<time>2014-5-21 16:00</time>
<file>readme.txt</file>
<file>DataEditorX.exe</file>
<file>data\update.txt</file>
\ No newline at end of file
win32/Data/ygopro.txt
deleted
100644 → 0
View file @
9efdeef1
F:\game\YGOPRO
\ No newline at end of file
win32/DataEditorX.exe
View file @
715a9175
No preview for this file type
win32/readme.txt
View file @
715a9175
...
...
@@ -21,6 +21,10 @@ data\ygopro.txt
★更新历史
1.2.1.1
自动把游戏目录设为cdb的目录
1.2.1.0
更改检查更新网址为我的百度空间
1.2.0.0
添加检查新版本
修复setname
win32/update.txt
deleted
100644 → 0
View file @
9efdeef1
<ver>1.2.0.1</ver>
<time>2014-5-21 16:00</time>
<file>readme.txt</file>
<file>DataEditorX.exe</file>
<file>data\update.txt</file>
\ No newline at end of file
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