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
b6da4134
Commit
b6da4134
authored
Jun 10, 2014
by
247321453
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.3.2.0
parent
f9899a86
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
121 additions
and
47 deletions
+121
-47
DataEditorX/CheckUpdate.cs
DataEditorX/CheckUpdate.cs
+11
-39
DataEditorX/DataEditForm.Designer.cs
DataEditorX/DataEditForm.Designer.cs
+9
-0
DataEditorX/DataEditForm.cs
DataEditorX/DataEditForm.cs
+81
-3
DataEditorX/DataEditForm.resx
DataEditorX/DataEditForm.resx
+3
-0
DataEditorX/Properties/AssemblyInfo.cs
DataEditorX/Properties/AssemblyInfo.cs
+1
-1
DataEditorX/app.config
DataEditorX/app.config
+1
-1
DataEditorX/chs/language.txt
DataEditorX/chs/language.txt
+2
-1
DataEditorX/readme.txt
DataEditorX/readme.txt
+5
-0
win32/DataEditorX.exe
win32/DataEditorX.exe
+0
-0
win32/DataEditorX.exe.config
win32/DataEditorX.exe.config
+1
-1
win32/chs/language.txt
win32/chs/language.txt
+2
-1
win32/readme.txt
win32/readme.txt
+5
-0
No files found.
DataEditorX/CheckUpdate.cs
View file @
b6da4134
...
...
@@ -18,32 +18,10 @@ namespace DataEditorX
/// </summary>
public
class
CheckUpdate
{
static
string
URL
=
""
;
public
static
string
URL
=
""
;
static
string
HEAD
=
"[DataEditorX]"
,
HEAD2
=
"[URL]"
;
public
static
void
UpdateTip
(
string
VERURL
)
{
string
newver
=
Check
(
VERURL
);
int
iver
,
iver2
;
int
.
TryParse
(
Application
.
ProductVersion
.
Replace
(
"."
,
""
),
out
iver
);
int
.
TryParse
(
newver
.
Replace
(
"."
,
""
),
out
iver2
);
if
(
iver2
>
iver
)
{
if
(
MyMsg
.
Question
(
string
.
Format
(
MyMsg
.
GetString
(
"have a new version.{0}version:{1}"
),
"\n"
,
newver
)))
{
if
(
DownLoad
(
URL
,
Path
.
Combine
(
Application
.
StartupPath
,
newver
+
".update.zip"
),
null
))
{
MyMsg
.
Show
(
"Download succeed."
);
}
}
}
else
if
(
iver2
>
0
)
MyMsg
.
Show
(
string
.
Format
(
MyMsg
.
GetString
(
"Is Last Version.{0}Version:{1}"
),
"\n"
,
newver
));
else
MyMsg
.
Error
(
MyMsg
.
GetString
(
"Check update fail!"
));
}
public
static
bool
isOK
=
false
;
public
static
string
Check
(
string
VERURL
)
{
string
urlver
=
"0.0.0.0"
;
...
...
@@ -99,41 +77,35 @@ public static string GetHtmlContentByUrl(string url)
}
#
endregion
public
static
bool
DownLoad
(
string
URL
,
string
filename
,
System
.
Windows
.
Forms
.
ProgressBar
prog
)
public
static
void
DownLoad
(
string
filename
)
{
try
{
HttpWebRequest
Myrq
=
(
HttpWebRequest
)
System
.
Net
.
HttpWebRequest
.
Create
(
URL
);
HttpWebResponse
myrp
=
(
HttpWebResponse
)
Myrq
.
GetResponse
();
long
totalBytes
=
myrp
.
ContentLength
;
if
(
prog
!=
null
)
{
prog
.
Maximum
=
(
int
)
totalBytes
;
}
System
.
IO
.
Stream
st
=
myrp
.
GetResponseStream
();
System
.
IO
.
Stream
so
=
new
System
.
IO
.
FileStream
(
filename
,
System
.
IO
.
FileMode
.
Create
);
Stream
st
=
myrp
.
GetResponseStream
();
Stream
so
=
new
System
.
IO
.
FileStream
(
filename
+
".tmp"
,
FileMode
.
Create
);
long
totalDownloadedByte
=
0
;
byte
[]
by
=
new
byte
[
1024
];
byte
[]
by
=
new
byte
[
2048
];
int
osize
=
st
.
Read
(
by
,
0
,
(
int
)
by
.
Length
);
while
(
osize
>
0
)
{
totalDownloadedByte
=
osize
+
totalDownloadedByte
;
System
.
Windows
.
Forms
.
Application
.
DoEvents
();
so
.
Write
(
by
,
0
,
osize
);
if
(
prog
!=
null
)
{
prog
.
Value
=
(
int
)
totalDownloadedByte
;
}
osize
=
st
.
Read
(
by
,
0
,
(
int
)
by
.
Length
);
}
so
.
Close
();
st
.
Close
();
File
.
Move
(
filename
+
".tmp"
,
filename
);
}
catch
(
System
.
Exception
)
{
return
false
;
isOK
=
false
;
}
return
true
;
isOK
=
true
;
}
}
}
DataEditorX/DataEditForm.Designer.cs
View file @
b6da4134
...
...
@@ -96,6 +96,7 @@ private void InitializeComponent()
this
.
pl_image
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
lb_types
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lb_tiptexts
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
backgroundWorker1
=
new
System
.
ComponentModel
.
BackgroundWorker
();
this
.
menuStrip1
.
SuspendLayout
();
this
.
SuspendLayout
();
//
...
...
@@ -680,6 +681,13 @@ private void InitializeComponent()
this
.
lb_tiptexts
.
Text
=
"Tips Texts"
;
this
.
lb_tiptexts
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
//
// backgroundWorker1
//
this
.
backgroundWorker1
.
WorkerReportsProgress
=
true
;
this
.
backgroundWorker1
.
WorkerSupportsCancellation
=
true
;
this
.
backgroundWorker1
.
DoWork
+=
new
System
.
ComponentModel
.
DoWorkEventHandler
(
this
.
BackgroundWorker1DoWork
);
this
.
backgroundWorker1
.
RunWorkerCompleted
+=
new
System
.
ComponentModel
.
RunWorkerCompletedEventHandler
(
this
.
BackgroundWorker1RunWorkerCompleted
);
//
// DataEditForm
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
...
...
@@ -743,6 +751,7 @@ private void InitializeComponent()
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
}
private
System
.
ComponentModel
.
BackgroundWorker
backgroundWorker1
;
private
System
.
Windows
.
Forms
.
Panel
pl_image
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
menuitem_copyselectto
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
menuitem_github
;
...
...
DataEditorX/DataEditForm.cs
View file @
b6da4134
...
...
@@ -29,7 +29,9 @@ public partial class DataEditForm : Form
int
MaxRow
=
20
;
int
page
=
1
,
pageNum
=
1
;
int
cardcount
;
bool
isdownload
;
bool
isbgcheck
;
string
NEWVER
=
"0.0.0.0"
;
List
<
Card
>
cardlist
=
new
List
<
Card
>();
Image
m_cover
;
...
...
@@ -97,10 +99,14 @@ void DataEditFormLoad(object sender, EventArgs e)
//set null card
oldCard
=
new
Card
(
0
);
SetCard
(
oldCard
);
isbgcheck
=
true
;
isdownload
=
false
;
//Menuitem_checkupdateClick(null,null);
if
(
File
.
Exists
(
nowCdbFile
))
Open
(
nowCdbFile
);
}
void
InitString
()
{
btn_add
.
Text
=
MyMsg
.
GetString
(
"Add"
);
...
...
@@ -869,7 +875,13 @@ void Menuitem_aboutClick(object sender, EventArgs e)
void
Menuitem_checkupdateClick
(
object
sender
,
EventArgs
e
)
{
CheckUpdate
.
UpdateTip
(
ConfigurationManager
.
AppSettings
[
"updateURL"
]);
if
(!
backgroundWorker1
.
IsBusy
)
{
isdownload
=
false
;
isbgcheck
=
false
;
backgroundWorker1
.
RunWorkerAsync
();
}
}
...
...
@@ -981,5 +993,71 @@ void Menuitem_quitClick(object sender, EventArgs e)
}
#
endregion
void
BackgroundWorker1DoWork
(
object
sender
,
System
.
ComponentModel
.
DoWorkEventArgs
e
)
{
if
(
isdownload
)
CheckUpdate
.
DownLoad
(
Path
.
Combine
(
Application
.
StartupPath
,
NEWVER
+
".zip"
));
else
{
NEWVER
=
CheckUpdate
.
Check
(
ConfigurationManager
.
AppSettings
[
"updateURL"
]);
}
}
void
BackgroundWorker1RunWorkerCompleted
(
object
sender
,
System
.
ComponentModel
.
RunWorkerCompletedEventArgs
e
)
{
if
(
isdownload
)
{
if
(
CheckUpdate
.
isOK
)
MyMsg
.
Show
(
MyMsg
.
GetString
(
"Download succeed."
));
else
MyMsg
.
Show
(
MyMsg
.
GetString
(
"Download fail."
)+
"\n"
+
CheckUpdate
.
URL
);
}
else
{
string
newver
=
NEWVER
;
int
iver
,
iver2
;
int
.
TryParse
(
Application
.
ProductVersion
.
Replace
(
"."
,
""
),
out
iver
);
int
.
TryParse
(
newver
.
Replace
(
"."
,
""
),
out
iver2
);
if
(
iver2
>
iver
)
{
if
(
MyMsg
.
Question
(
string
.
Format
(
MyMsg
.
GetString
(
"have a new version.{0}version:{1}"
),
"\n"
,
newver
)))
{
if
(!
backgroundWorker1
.
IsBusy
)
{
isdownload
=
true
;
isbgcheck
=
false
;
backgroundWorker1
.
RunWorkerAsync
();
}
}
}
else
if
(
iver2
>
0
)
{
if
(!
isbgcheck
)
{
if
(
MyMsg
.
Question
(
string
.
Format
(
MyMsg
.
GetString
(
"Is Last Version.{0}Version:{1}"
),
"\n"
,
newver
+
"\n"
)))
{
if
(!
backgroundWorker1
.
IsBusy
)
{
isdownload
=
true
;
isbgcheck
=
false
;
backgroundWorker1
.
RunWorkerAsync
();
}
}
}
}
else
{
if
(!
isbgcheck
)
MyMsg
.
Error
(
MyMsg
.
GetString
(
"Check update fail!"
));
}
}
}
}
}
DataEditorX/DataEditForm.resx
View file @
b6da4134
...
...
@@ -120,6 +120,9 @@
<metadata
name=
"menuStrip1.TrayLocation"
type=
"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>
<value>
17, 17
</value>
</metadata>
<metadata
name=
"backgroundWorker1.TrayLocation"
type=
"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>
<value>
130, 17
</value>
</metadata>
<metadata
name=
"$this.TrayHeight"
type=
"System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
>
<value>
25
</value>
</metadata>
...
...
DataEditorX/Properties/AssemblyInfo.cs
View file @
b6da4134
...
...
@@ -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.3.
1
.0"
)]
[
assembly
:
AssemblyVersion
(
"1.3.
2
.0"
)]
DataEditorX/app.config
View file @
b6da4134
...
...
@@ -13,6 +13,6 @@
<
add
key
=
"language"
value
=
"chs"
/>
<
add
key
=
"sourceURL"
value
=
"https://github.com/247321453/DataEditorX"
/>
<
add
key
=
"updateURL"
value
=
"https://github.com/247321453/DataEditorX/tree/master/win32"
/>
<
add
key
=
"updateURL"
value
=
"https://github.com/247321453/DataEditorX/tree/master/win32
/readme.txt
"
/>
</
appSettings
>
</
configuration
>
DataEditorX/chs/language.txt
View file @
b6da4134
...
...
@@ -35,10 +35,11 @@ All Now Copy To 当前所有卡片复制到...
Quit 退出
Is Last Version.{0}Version:{1} 已经是最新版本!{0}版本号:{1}
Is Last Version.{0}Version:{1} 已经是最新版本!{0}版本号:{1}
是否重新下载?
Check update fail! 查询失败!
have a new version.{0}version:{1} 发现一个新版本。是否下载?{0}版本号{1}
Download succeed. 下载成功。
Download fail. 下载失败。
Please select a DataBase! 请打开一个数据库!
File is not exists! 文件不存在!
...
...
DataEditorX/readme.txt
View file @
b6da4134
...
...
@@ -14,6 +14,11 @@
★更新历史
1.3.2.0
修复
1.3.1.0
自动检查更新
添加下载文件
1.3.0.1
分文件夹
1.3.0.0
...
...
win32/DataEditorX.exe
View file @
b6da4134
No preview for this file type
win32/DataEditorX.exe.config
View file @
b6da4134
...
...
@@ -13,6 +13,6 @@
<
add
key
=
"language"
value
=
"chs"
/>
<
add
key
=
"sourceURL"
value
=
"https://github.com/247321453/DataEditorX"
/>
<
add
key
=
"updateURL"
value
=
"https://github.com/247321453/DataEditorX/tree/master/win32"
/>
<
add
key
=
"updateURL"
value
=
"https://github.com/247321453/DataEditorX/tree/master/win32
/readme.txt
"
/>
</
appSettings
>
</
configuration
>
win32/chs/language.txt
View file @
b6da4134
...
...
@@ -35,10 +35,11 @@ All Now Copy To 当前所有卡片复制到...
Quit 退出
Is Last Version.{0}Version:{1} 已经是最新版本!{0}版本号:{1}
Is Last Version.{0}Version:{1} 已经是最新版本!{0}版本号:{1}
是否重新下载?
Check update fail! 查询失败!
have a new version.{0}version:{1} 发现一个新版本。是否下载?{0}版本号{1}
Download succeed. 下载成功。
Download fail. 下载失败。
Please select a DataBase! 请打开一个数据库!
File is not exists! 文件不存在!
...
...
win32/readme.txt
View file @
b6da4134
...
...
@@ -14,6 +14,11 @@
★更新历史
1.3.2.0
修复
1.3.1.0
自动检查更新
添加下载文件
1.3.0.1
分文件夹
1.3.0.0
...
...
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