Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOProUnity_V2
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
perfectdicky
YGOProUnity_V2
Commits
c44377fc
Commit
c44377fc
authored
Aug 22, 2020
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update config
parent
c92b462b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
28 deletions
+12
-28
Assets/SibylSystem/Menu/Menu.cs
Assets/SibylSystem/Menu/Menu.cs
+0
-1
Assets/SibylSystem/selectServer/SelectServer.cs
Assets/SibylSystem/selectServer/SelectServer.cs
+12
-27
No files found.
Assets/SibylSystem/Menu/Menu.cs
View file @
c44377fc
...
...
@@ -14,7 +14,6 @@ public class Menu : WindowServantSP
//GameObject screen;
public
override
void
initialize
()
{
string
hint
=
File
.
ReadAllText
(
"config/hint.conf"
);
createWindow
(
Program
.
I
().
new_ui_menu
);
UIHelper
.
registEvent
(
gameObject
,
"setting_"
,
onClickSetting
);
UIHelper
.
registEvent
(
gameObject
,
"deck_"
,
onClickSelectDeck
);
...
...
Assets/SibylSystem/selectServer/SelectServer.cs
View file @
c44377fc
...
...
@@ -3,6 +3,7 @@ using System;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Threading
;
using
System.Text.RegularExpressions
;
public
class
SelectServer
:
WindowServantSP
{
...
...
@@ -13,21 +14,23 @@ public class SelectServer : WindowServantSP
UIInput
inputPsw
;
UIInput
inputVersion
;
public
string
name
=
""
;
public
override
void
initialize
()
{
createWindow
(
Program
.
I
().
new_ui_selectServer
);
UIHelper
.
registEvent
(
gameObject
,
"exit_"
,
onClickExit
);
UIHelper
.
registEvent
(
gameObject
,
"face_"
,
onClickFace
);
UIHelper
.
registEvent
(
gameObject
,
"join_"
,
onClickJoin
);
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"name_"
).
value
=
Config
.
Get
(
"name"
,
"一秒一喵机会"
);
name
=
Config
.
Get
(
"name"
,
"一秒一喵机会"
);
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"name_"
).
value
=
name
;
list
=
UIHelper
.
getByName
<
UIPopupList
>(
gameObject
,
"history_"
);
UIHelper
.
registEvent
(
gameObject
,
"history_"
,
onSelected
);
name
=
Config
.
Get
(
"name"
,
"一秒一喵机会"
);
inputIP
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
);
inputPort
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
);
inputPsw
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"psw_"
);
inputVersion
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"version_"
);
set_version
(
"0x"
+
String
.
Format
(
"{0:X}"
,
Config
.
ClientVersion
)
);
inputVersion
.
value
=
"0x"
+
String
.
Format
(
"{0:X}"
,
Config
.
ClientVersion
);
SetActiveFalse
();
}
...
...
@@ -41,20 +44,10 @@ public class SelectServer : WindowServantSP
private
void
readString
(
string
str
)
{
str
=
str
.
Substring
(
1
,
str
.
Length
-
1
)
;
string
version
=
""
,
remain
=
""
;
str
ing
remain
=
""
;
string
ip
=
""
,
port
=
""
,
psw
=
""
;
string
[]
splited
;
splited
=
str
.
Split
(
")"
);
try
{
version
=
splited
[
0
];
remain
=
splited
[
1
];
}
catch
(
Exception
)
{
}
splited
=
remain
.
Split
(
":"
);
string
ip
=
""
;
splited
=
str
.
Split
(
":"
);
try
{
ip
=
splited
[
0
];
...
...
@@ -64,7 +57,6 @@ public class SelectServer : WindowServantSP
{
}
splited
=
remain
.
Split
(
" "
);
string
psw
=
""
,
port
=
""
;
try
{
port
=
splited
[
0
];
...
...
@@ -76,7 +68,6 @@ public class SelectServer : WindowServantSP
inputIP
.
value
=
ip
;
inputPort
.
value
=
port
;
inputPsw
.
value
=
psw
;
//inputVersion.value = version;
}
public
override
void
show
()
...
...
@@ -104,6 +95,7 @@ public class SelectServer : WindowServantSP
string
[]
lines
=
txtString
.
Replace
(
"\r"
,
""
).
Split
(
"\n"
);
for
(
int
i
=
0
;
i
<
lines
.
Length
;
i
++)
{
lines
[
i
]
=
Regex
.
Replace
(
lines
[
i
],
"^\\(.*\\)"
,
""
);
// remove old version
if
(
i
==
0
)
{
if
(
first
)
...
...
@@ -127,11 +119,6 @@ public class SelectServer : WindowServantSP
}
}
public
void
set_version
(
string
str
)
{
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"version_"
).
value
=
str
;
}
void
onClickJoin
()
{
if
(!
isShowed
)
...
...
@@ -150,7 +137,7 @@ public class SelectServer : WindowServantSP
{
name
=
Name
;
Config
.
Set
(
"name"
,
name
);
if
(
ipString
==
""
||
portString
==
""
||
versionString
==
""
)
if
(
ipString
==
""
||
portString
==
""
)
{
RMSshow_onlyYes
(
""
,
InterString
.
Get
(
"非法输入!请检查输入的主机名。"
),
null
);
}
...
...
@@ -158,7 +145,7 @@ public class SelectServer : WindowServantSP
{
if
(
name
!=
""
)
{
string
fantasty
=
"("
+
versionString
+
")"
+
ipString
+
":"
+
portString
+
" "
+
pswString
;
string
fantasty
=
ipString
+
":"
+
portString
+
" "
+
pswString
;
list
.
items
.
Remove
(
fantasty
);
list
.
items
.
Insert
(
0
,
fantasty
);
list
.
value
=
fantasty
;
...
...
@@ -184,8 +171,6 @@ public class SelectServer : WindowServantSP
GameObject
faceShow
=
null
;
public
string
name
=
""
;
void
onClickFace
()
{
name
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"name_"
).
value
;
...
...
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