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
2
Issues
2
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
b2cb06c2
Commit
b2cb06c2
authored
Jun 08, 2020
by
JoyJ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix update
parent
54d8021c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
27 deletions
+20
-27
DataEditorX/Common/CheckUpdate.cs
DataEditorX/Common/CheckUpdate.cs
+10
-15
DataEditorX/Core/TaskHelper.cs
DataEditorX/Core/TaskHelper.cs
+1
-1
DataEditorX/DataEditForm.Designer.cs
DataEditorX/DataEditForm.Designer.cs
+3
-1
DataEditorX/DataEditForm.cs
DataEditorX/DataEditForm.cs
+0
-4
DataEditorX/DataEditForm.resx
DataEditorX/DataEditForm.resx
+5
-5
DataEditorX/Properties/AssemblyInfo.cs
DataEditorX/Properties/AssemblyInfo.cs
+1
-1
No files found.
DataEditorX/Common/CheckUpdate.cs
View file @
b2cb06c2
...
...
@@ -8,6 +8,7 @@
using
System.IO
;
using
System.Net
;
using
System.Text
;
using
System.Text.RegularExpressions
;
namespace
DataEditorX.Common
{
...
...
@@ -30,7 +31,7 @@ static CheckUpdate()
/// </summary>
const
string
HEAD
=
"[DataEditorX]"
;
const
string
HEAD2
=
"[URL]"
;
public
const
string
DEFA
LU
T
=
"0.0.0.0"
;
public
const
string
DEFA
UL
T
=
"0.0.0.0"
;
#
region
检查版本
/// <summary>
...
...
@@ -40,24 +41,18 @@ static CheckUpdate()
/// <returns>版本号</returns>
public
static
string
GetNewVersion
(
string
VERURL
)
{
string
urlver
=
DEFA
LU
T
;
string
urlver
=
DEFA
UL
T
;
string
html
=
GetHtmlContentByUrl
(
VERURL
);
if
(!
string
.
IsNullOrEmpty
(
html
))
{
int
t
,
w
;
t
=
html
.
IndexOf
(
HEAD
);
w
=
(
t
>
0
)
?
html
.
IndexOf
(
HEAD
,
t
+
HEAD
.
Length
)
:
0
;
if
(
w
>
0
)
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
))
{
//获取版本
urlver
=
html
.
Substring
(
t
+
HEAD
.
Length
,
w
-
t
-
HEAD
.
Length
);
}
t
=
html
.
IndexOf
(
HEAD2
);
w
=
(
t
>
0
)
?
html
.
IndexOf
(
HEAD2
,
t
+
HEAD2
.
Length
)
:
0
;
if
(
w
>
0
)
{
//获取下载地址
URL
=
html
.
Substring
(
t
+
HEAD2
.
Length
,
w
-
t
-
HEAD2
.
Length
);
Match
mVer
=
ver
.
Match
(
html
);
Match
mUrl
=
url
.
Match
(
html
);
URL
=
mUrl
.
Groups
[
1
].
Value
;
return
$"
{
mVer
.
Groups
[
1
].
Value
}
"
;
}
}
return
urlver
;
...
...
DataEditorX/Core/TaskHelper.cs
View file @
b2cb06c2
...
...
@@ -138,7 +138,7 @@ public void ToImg(string img, string saveimg1)
public
static
void
CheckVersion
(
bool
showNew
)
{
string
newver
=
CheckUpdate
.
GetNewVersion
(
MyConfig
.
ReadString
(
MyConfig
.
TAG_UPDATE_URL
));
if
(
newver
==
CheckUpdate
.
DEFA
LU
T
)
if
(
newver
==
CheckUpdate
.
DEFA
UL
T
)
{
//检查失败
if
(!
showNew
)
{
...
...
DataEditorX/DataEditForm.Designer.cs
View file @
b2cb06c2
...
...
@@ -142,6 +142,7 @@ private void InitializeComponent()
this
.
mainMenu
.
SuspendLayout
();
this
.
pl_bottom
.
SuspendLayout
();
this
.
pl_main
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
splitContainer
)).
BeginInit
();
this
.
splitContainer
.
Panel1
.
SuspendLayout
();
this
.
splitContainer
.
Panel2
.
SuspendLayout
();
this
.
splitContainer
.
SuspendLayout
();
...
...
@@ -1249,7 +1250,7 @@ private void InitializeComponent()
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
Text
=
"DataEditorX"
;
this
.
FormClosing
+=
new
System
.
Windows
.
Forms
.
FormClosingEventHandler
(
this
.
DataEditFormFormClosing
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
DataEditForm
_
Load
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
DataEditFormLoad
);
this
.
SizeChanged
+=
new
System
.
EventHandler
(
this
.
DataEditFormSizeChanged
);
this
.
Enter
+=
new
System
.
EventHandler
(
this
.
DataEditFormEnter
);
this
.
KeyDown
+=
new
System
.
Windows
.
Forms
.
KeyEventHandler
(
this
.
DataEditForm_KeyDown
);
...
...
@@ -1261,6 +1262,7 @@ private void InitializeComponent()
this
.
splitContainer
.
Panel1
.
ResumeLayout
(
false
);
this
.
splitContainer
.
Panel2
.
ResumeLayout
(
false
);
this
.
splitContainer
.
Panel2
.
PerformLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
splitContainer
)).
EndInit
();
this
.
splitContainer
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
...
...
DataEditorX/DataEditForm.cs
View file @
b2cb06c2
...
...
@@ -1166,10 +1166,6 @@ public void CheckUpdate(bool showNew)
{
if
(!
this
.
isRun
())
{
if
(
this
.
tasker
==
null
)
{
this
.
tasker
=
new
TaskHelper
(
""
,
new
System
.
ComponentModel
.
BackgroundWorker
(),
null
);
}
this
.
tasker
.
SetTask
(
MyTask
.
CheckUpdate
,
null
,
showNew
.
ToString
());
this
.
Run
(
LanguageHelper
.
GetMsg
(
LMSG
.
checkUpdate
));
}
...
...
DataEditorX/DataEditForm.resx
View file @
b2cb06c2
...
...
@@ -112,18 +112,18 @@
<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>
<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=
2
.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
<value>
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=
4
.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
</resheader>
<metadata
name=
"mainMenu.TrayLocation"
type=
"System.Drawing.Point, System.Drawing, Version=
2
.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>
<metadata
name=
"mainMenu.TrayLocation"
type=
"System.Drawing.Point, System.Drawing, Version=
4
.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>
<value>
135, 17
</value>
</metadata>
<metadata
name=
"bgWorker1.TrayLocation"
type=
"System.Drawing.Point, System.Drawing, Version=
2
.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>
<metadata
name=
"bgWorker1.TrayLocation"
type=
"System.Drawing.Point, System.Drawing, Version=
4
.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>
<value>
17, 17
</value>
</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=
4
.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
>
<value>
25
</value>
</metadata>
</root>
\ No newline at end of file
DataEditorX/Properties/AssemblyInfo.cs
View file @
b2cb06c2
...
...
@@ -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.4.3.6
"
)]
[
assembly
:
AssemblyVersion
(
"
3.0.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