Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro2
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
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
ygopro2
Commits
ca953ac8
Commit
ca953ac8
authored
May 15, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
terminate old thread when requesting
parent
d6256184
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
Assets/SibylSystem/MyCard/MyCard.cs
Assets/SibylSystem/MyCard/MyCard.cs
+8
-3
No files found.
Assets/SibylSystem/MyCard/MyCard.cs
View file @
ca953ac8
...
...
@@ -7,7 +7,7 @@ using System.Threading;
public
class
MyCard
:
WindowServantSP
{
public
bool
isMatching
=
false
;
public
bool
isRequesting
;
public
bool
isRequesting
=
false
;
const
string
mycard_ip
=
"tiramisu.mycard.moe"
;
const
string
athletic_port
=
"8911"
;
const
string
entertain_port
=
"7911"
;
...
...
@@ -99,7 +99,7 @@ public class MyCard : WindowServantSP
if
(
e
.
GetType
()
!=
typeof
(
ThreadAbortException
))
{
Program
.
PrintToChat
(
InterString
.
Get
(
"未知错误: "
)
+
e
.
Message
);
}
else
{
Program
.
PrintToChat
(
"匹配已中断。"
);
Program
.
PrintToChat
(
InterString
.
Get
(
"匹配已中断。"
)
);
}
isRequesting
=
false
;
}
...
...
@@ -112,9 +112,14 @@ public class MyCard : WindowServantSP
{
RMSshow_onlyYes
(
""
,
InterString
.
Get
(
"用户名或密码为空。"
),
null
);
return
;
}
if
(
isRequesting
)
{
terminateThread
();
}
saveUser
();
isRequesting
=
true
;
Program
.
PrintToChat
(
InterString
.
Get
(
"已开始匹配。"
));
requestThread
=
new
Thread
(()
=>
{
matchThread
(
username
,
password
,
match_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