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
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
mercury233
ygopro2
Commits
7f02a0c3
Commit
7f02a0c3
authored
Apr 10, 2019
by
Szefo09
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change psw
parent
85854d51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
104 additions
and
103 deletions
+104
-103
Assets/SibylSystem/selectServer/SelectServer.cs
Assets/SibylSystem/selectServer/SelectServer.cs
+104
-103
No files found.
Assets/SibylSystem/selectServer/SelectServer.cs
View file @
7f02a0c3
...
@@ -51,80 +51,80 @@ public class SelectServer : WindowServantSP
...
@@ -51,80 +51,80 @@ public class SelectServer : WindowServantSP
switch
(
server
)
switch
(
server
)
{
{
case
"[OCG]Koishi"
:
case
"[OCG]Koishi"
:
{
{
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"koishi.moecube.com"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"koishi.moecube.com"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"7210"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"7210"
;
Config
.
Set
(
"serversPicker"
,
"[OCG]Koishi"
);
Config
.
Set
(
"serversPicker"
,
"[OCG]Koishi"
);
list
.
enabled
=
false
;
//
list.enabled = false;
inputIP_
.
enabled
=
false
;
inputIP_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
break
;
break
;
}
}
case
"[OCG]Mercury233"
:
case
"[OCG]Mercury233"
:
{
{
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"s1.ygo233.com"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"s1.ygo233.com"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"233"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"233"
;
Config
.
Set
(
"serversPicker"
,
"[OCG]Mercury233"
);
Config
.
Set
(
"serversPicker"
,
"[OCG]Mercury233"
);
list
.
enabled
=
false
;
//
list.enabled = false;
inputIP_
.
enabled
=
false
;
inputIP_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
break
;
break
;
}
}
case
"[TCG]Koishi"
:
case
"[TCG]Koishi"
:
{
{
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"koishi.moecube.com"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"koishi.moecube.com"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"1311"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"1311"
;
Config
.
Set
(
"serversPicker"
,
"[TCG]Koishi"
);
Config
.
Set
(
"serversPicker"
,
"[TCG]Koishi"
);
list
.
enabled
=
false
;
//
list.enabled = false;
inputIP_
.
enabled
=
false
;
inputIP_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
break
;
break
;
}
}
case
"[Custom]YGOPro 222DIY"
:
case
"[Custom]YGOPro 222DIY"
:
{
{
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"koishi.moecube.com"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"koishi.moecube.com"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"222"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"222"
;
Config
.
Set
(
"serversPicker"
,
"[Custom]YGOPro 222DIY"
);
Config
.
Set
(
"serversPicker"
,
"[Custom]YGOPro 222DIY"
);
list
.
enabled
=
false
;
//
list.enabled = false;
inputIP_
.
enabled
=
false
;
inputIP_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
break
;
break
;
}
}
case
"[轮抽服]2Pick"
:
case
"[轮抽服]2Pick"
:
{
{
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"2pick.mycard.moe"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"2pick.mycard.moe"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"765"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"765"
;
Config
.
Set
(
"serversPicker"
,
"[轮抽服]2Pick"
);
Config
.
Set
(
"serversPicker"
,
"[轮抽服]2Pick"
);
list
.
enabled
=
false
;
//
list.enabled = false;
inputIP_
.
enabled
=
false
;
inputIP_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
break
;
break
;
}
}
case
"[OCG&TCG]한국서버"
:
case
"[OCG&TCG]한국서버"
:
{
{
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"cygopro.fun25.co.kr"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"cygopro.fun25.co.kr"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"17225"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"17225"
;
Config
.
Set
(
"serversPicker"
,
"[OCG&TCG]한국서버"
);
Config
.
Set
(
"serversPicker"
,
"[OCG&TCG]한국서버"
);
list
.
enabled
=
false
;
//
list.enabled = false;
inputIP_
.
enabled
=
false
;
inputIP_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
break
;
break
;
}
}
default
:
default
:
{
{
Config
.
Set
(
"serversPicker"
,
"[Custom]"
);
Config
.
Set
(
"serversPicker"
,
"[Custom]"
);
list
.
enabled
=
true
;
list
.
enabled
=
true
;
inputIP_
.
enabled
=
true
;
inputIP_
.
enabled
=
true
;
inputPort_
.
enabled
=
true
;
inputPort_
.
enabled
=
true
;
break
;
break
;
}
}
}
}
}
}
...
@@ -139,41 +139,42 @@ public class SelectServer : WindowServantSP
...
@@ -139,41 +139,42 @@ public class SelectServer : WindowServantSP
private
void
readString
(
string
str
)
private
void
readString
(
string
str
)
{
{
str
=
str
.
Substring
(
1
,
str
.
Length
-
1
);
//str = str.Substring(1, str.Length - 1);
string
version
=
""
,
remain
=
""
;
//string version = "", remain = "";
string
[]
splited
;
//string[] splited;
splited
=
str
.
Split
(
")"
);
//splited = str.Split(")");
try
//try
{
//{
version
=
splited
[
0
];
// version = splited[0];
remain
=
splited
[
1
];
// remain = splited[1];
}
//}
catch
(
Exception
)
//catch (Exception)
{
//{
}
//}
splited
=
remain
.
Split
(
":"
);
//splited = remain.Split(":");
string
ip
=
""
;
//string ip = "";
try
//try
{
//{
ip
=
splited
[
0
];
// ip = splited[0];
remain
=
splited
[
1
];
// remain = splited[1];
}
//}
catch
(
Exception
)
//catch (Exception)
{
//{
}
//}
splited
=
remain
.
Split
(
" "
);
//splited = remain.Split(" ");
string
psw
=
""
,
port
=
""
;
//string psw = "", port = "";
try
//try
{
//{
port
=
splited
[
0
];
// port = splited[0];
psw
=
splited
[
1
];
// psw = splited[1];
}
//}
catch
(
Exception
)
//catch (Exception)
{
//{
}
//}
inputIP
.
value
=
ip
;
//inputIP.value = ip;
inputPort
.
value
=
port
;
//inputPort.value = port;
inputPsw
.
value
=
psw
;
//inputPsw.value = psw;
inputPsw
.
value
=
str
;
//inputVersion.value = version;
//inputVersion.value = version;
}
}
...
@@ -194,11 +195,11 @@ public class SelectServer : WindowServantSP
...
@@ -194,11 +195,11 @@ public class SelectServer : WindowServantSP
void
printFile
(
bool
first
)
void
printFile
(
bool
first
)
{
{
list
.
Clear
();
list
.
Clear
();
if
(
File
.
Exists
(
"config/
host
s.conf"
)
==
false
)
if
(
File
.
Exists
(
"config/
password
s.conf"
)
==
false
)
{
{
File
.
Create
(
"config/
host
s.conf"
).
Close
();
File
.
Create
(
"config/
password
s.conf"
).
Close
();
}
}
string
txtString
=
File
.
ReadAllText
(
"config/
host
s.conf"
);
string
txtString
=
File
.
ReadAllText
(
"config/
password
s.conf"
);
string
[]
lines
=
txtString
.
Replace
(
"\r"
,
""
).
Split
(
"\n"
);
string
[]
lines
=
txtString
.
Replace
(
"\r"
,
""
).
Split
(
"\n"
);
for
(
int
i
=
0
;
i
<
lines
.
Length
;
i
++)
for
(
int
i
=
0
;
i
<
lines
.
Length
;
i
++)
{
{
...
@@ -270,11 +271,11 @@ public class SelectServer : WindowServantSP
...
@@ -270,11 +271,11 @@ public class SelectServer : WindowServantSP
{
{
if
(
name
!=
""
)
if
(
name
!=
""
)
{
{
string
fantasty
=
"("
+
versionString
+
")"
+
ipString
+
":"
+
portString
+
" "
+
pswString
;
string
fantasty
=
pswString
;
list
.
items
.
Remove
(
fantasty
);
list
.
items
.
Remove
(
fantasty
);
list
.
items
.
Insert
(
0
,
fantasty
);
list
.
items
.
Insert
(
0
,
fantasty
);
list
.
value
=
fantasty
;
list
.
value
=
fantasty
;
if
(
list
.
items
.
Count
>
5
)
if
(
list
.
items
.
Count
>
5
)
{
{
list
.
items
.
RemoveAt
(
list
.
items
.
Count
-
1
);
list
.
items
.
RemoveAt
(
list
.
items
.
Count
-
1
);
}
}
...
@@ -283,9 +284,9 @@ public class SelectServer : WindowServantSP
...
@@ -283,9 +284,9 @@ public class SelectServer : WindowServantSP
{
{
all
+=
list
.
items
[
i
]
+
"\r\n"
;
all
+=
list
.
items
[
i
]
+
"\r\n"
;
}
}
File
.
WriteAllText
(
"config/
host
s.conf"
,
all
);
File
.
WriteAllText
(
"config/
password
s.conf"
,
all
);
printFile
(
false
);
printFile
(
false
);
(
new
Thread
(()
=>
{
TcpHelper
.
join
(
ipString
,
name
,
portString
,
pswString
,
versionString
);
})).
Start
();
(
new
Thread
(()
=>
{
TcpHelper
.
join
(
ipString
,
name
,
portString
,
pswString
,
versionString
);
})).
Start
();
}
}
else
else
{
{
...
...
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