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
赤子奈落
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
...
@@ -14,7 +14,6 @@ public class Menu : WindowServantSP
//GameObject screen;
//GameObject screen;
public
override
void
initialize
()
public
override
void
initialize
()
{
{
string
hint
=
File
.
ReadAllText
(
"config/hint.conf"
);
createWindow
(
Program
.
I
().
new_ui_menu
);
createWindow
(
Program
.
I
().
new_ui_menu
);
UIHelper
.
registEvent
(
gameObject
,
"setting_"
,
onClickSetting
);
UIHelper
.
registEvent
(
gameObject
,
"setting_"
,
onClickSetting
);
UIHelper
.
registEvent
(
gameObject
,
"deck_"
,
onClickSelectDeck
);
UIHelper
.
registEvent
(
gameObject
,
"deck_"
,
onClickSelectDeck
);
...
...
Assets/SibylSystem/selectServer/SelectServer.cs
View file @
c44377fc
...
@@ -3,6 +3,7 @@ using System;
...
@@ -3,6 +3,7 @@ using System;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.IO
;
using
System.Threading
;
using
System.Threading
;
using
System.Text.RegularExpressions
;
public
class
SelectServer
:
WindowServantSP
public
class
SelectServer
:
WindowServantSP
{
{
...
@@ -13,21 +14,23 @@ public class SelectServer : WindowServantSP
...
@@ -13,21 +14,23 @@ public class SelectServer : WindowServantSP
UIInput
inputPsw
;
UIInput
inputPsw
;
UIInput
inputVersion
;
UIInput
inputVersion
;
public
string
name
=
""
;
public
override
void
initialize
()
public
override
void
initialize
()
{
{
createWindow
(
Program
.
I
().
new_ui_selectServer
);
createWindow
(
Program
.
I
().
new_ui_selectServer
);
UIHelper
.
registEvent
(
gameObject
,
"exit_"
,
onClickExit
);
UIHelper
.
registEvent
(
gameObject
,
"exit_"
,
onClickExit
);
UIHelper
.
registEvent
(
gameObject
,
"face_"
,
onClickFace
);
UIHelper
.
registEvent
(
gameObject
,
"face_"
,
onClickFace
);
UIHelper
.
registEvent
(
gameObject
,
"join_"
,
onClickJoin
);
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_"
);
list
=
UIHelper
.
getByName
<
UIPopupList
>(
gameObject
,
"history_"
);
UIHelper
.
registEvent
(
gameObject
,
"history_"
,
onSelected
);
UIHelper
.
registEvent
(
gameObject
,
"history_"
,
onSelected
);
name
=
Config
.
Get
(
"name"
,
"一秒一喵机会"
);
inputIP
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
);
inputIP
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
);
inputPort
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
);
inputPort
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
);
inputPsw
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"psw_"
);
inputPsw
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"psw_"
);
inputVersion
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"version_"
);
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
();
SetActiveFalse
();
}
}
...
@@ -41,20 +44,10 @@ public class SelectServer : WindowServantSP
...
@@ -41,20 +44,10 @@ public class SelectServer : WindowServantSP
private
void
readString
(
string
str
)
private
void
readString
(
string
str
)
{
{
str
=
str
.
Substring
(
1
,
str
.
Length
-
1
)
;
str
ing
remain
=
""
;
string
version
=
""
,
remain
=
""
;
string
ip
=
""
,
port
=
""
,
psw
=
""
;
string
[]
splited
;
string
[]
splited
;
splited
=
str
.
Split
(
")"
);
splited
=
str
.
Split
(
":"
);
try
{
version
=
splited
[
0
];
remain
=
splited
[
1
];
}
catch
(
Exception
)
{
}
splited
=
remain
.
Split
(
":"
);
string
ip
=
""
;
try
try
{
{
ip
=
splited
[
0
];
ip
=
splited
[
0
];
...
@@ -64,7 +57,6 @@ public class SelectServer : WindowServantSP
...
@@ -64,7 +57,6 @@ public class SelectServer : WindowServantSP
{
{
}
}
splited
=
remain
.
Split
(
" "
);
splited
=
remain
.
Split
(
" "
);
string
psw
=
""
,
port
=
""
;
try
try
{
{
port
=
splited
[
0
];
port
=
splited
[
0
];
...
@@ -76,7 +68,6 @@ public class SelectServer : WindowServantSP
...
@@ -76,7 +68,6 @@ public class SelectServer : WindowServantSP
inputIP
.
value
=
ip
;
inputIP
.
value
=
ip
;
inputPort
.
value
=
port
;
inputPort
.
value
=
port
;
inputPsw
.
value
=
psw
;
inputPsw
.
value
=
psw
;
//inputVersion.value = version;
}
}
public
override
void
show
()
public
override
void
show
()
...
@@ -104,6 +95,7 @@ public class SelectServer : WindowServantSP
...
@@ -104,6 +95,7 @@ public class SelectServer : WindowServantSP
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
++)
{
{
lines
[
i
]
=
Regex
.
Replace
(
lines
[
i
],
"^\\(.*\\)"
,
""
);
// remove old version
if
(
i
==
0
)
if
(
i
==
0
)
{
{
if
(
first
)
if
(
first
)
...
@@ -127,11 +119,6 @@ public class SelectServer : WindowServantSP
...
@@ -127,11 +119,6 @@ public class SelectServer : WindowServantSP
}
}
}
}
public
void
set_version
(
string
str
)
{
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"version_"
).
value
=
str
;
}
void
onClickJoin
()
void
onClickJoin
()
{
{
if
(!
isShowed
)
if
(!
isShowed
)
...
@@ -150,7 +137,7 @@ public class SelectServer : WindowServantSP
...
@@ -150,7 +137,7 @@ public class SelectServer : WindowServantSP
{
{
name
=
Name
;
name
=
Name
;
Config
.
Set
(
"name"
,
name
);
Config
.
Set
(
"name"
,
name
);
if
(
ipString
==
""
||
portString
==
""
||
versionString
==
""
)
if
(
ipString
==
""
||
portString
==
""
)
{
{
RMSshow_onlyYes
(
""
,
InterString
.
Get
(
"非法输入!请检查输入的主机名。"
),
null
);
RMSshow_onlyYes
(
""
,
InterString
.
Get
(
"非法输入!请检查输入的主机名。"
),
null
);
}
}
...
@@ -158,7 +145,7 @@ public class SelectServer : WindowServantSP
...
@@ -158,7 +145,7 @@ public class SelectServer : WindowServantSP
{
{
if
(
name
!=
""
)
if
(
name
!=
""
)
{
{
string
fantasty
=
"("
+
versionString
+
")"
+
ipString
+
":"
+
portString
+
" "
+
pswString
;
string
fantasty
=
ipString
+
":"
+
portString
+
" "
+
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
;
...
@@ -184,8 +171,6 @@ public class SelectServer : WindowServantSP
...
@@ -184,8 +171,6 @@ public class SelectServer : WindowServantSP
GameObject
faceShow
=
null
;
GameObject
faceShow
=
null
;
public
string
name
=
""
;
void
onClickFace
()
void
onClickFace
()
{
{
name
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"name_"
).
value
;
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