Commit 820ae940 authored by 神楽坂玲奈's avatar 神楽坂玲奈

remove command.shell, make command line arguments more stable

parent d84dde14
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.IO; using System.IO;
using System.Text; using System.Text;
using UnityEditor;
using UnityEngine; using UnityEngine;
using UnityEngine.Networking; using UnityEngine.Networking;
using Debug = UnityEngine.Debug;
public class Menu : WindowServantSP public class Menu : WindowServantSP
{ {
...@@ -38,11 +37,6 @@ public class Menu : WindowServantSP ...@@ -38,11 +37,6 @@ public class Menu : WindowServantSP
Program.charge(); Program.charge();
} }
public override void hide()
{
base.hide();
}
private IEnumerator checkUpdate() private IEnumerator checkUpdate()
{ {
yield return new WaitForSeconds(1); yield return new WaitForSeconds(1);
...@@ -91,7 +85,6 @@ public class Menu : WindowServantSP ...@@ -91,7 +85,6 @@ public class Menu : WindowServantSP
public override void preFrameFunction() public override void preFrameFunction()
{ {
base.preFrameFunction(); base.preFrameFunction();
checkCommend();
if (Program.noAccess && !msgPermissionShowed) if (Program.noAccess && !msgPermissionShowed)
{ {
msgPermissionShowed = true; msgPermissionShowed = true;
...@@ -112,7 +105,11 @@ public class Menu : WindowServantSP ...@@ -112,7 +105,11 @@ public class Menu : WindowServantSP
Program.I().quit(); Program.I().quit();
Program.Running = false; Program.Running = false;
TcpHelper.SaveRecord(); TcpHelper.SaveRecord();
Process.GetCurrentProcess().Kill(); #if UNITY_EDITOR
EditorApplication.isPlaying = false;
#else
Application.Quit();
#endif
} }
private void onClickOnline() private void onClickOnline()
...@@ -144,111 +141,4 @@ public class Menu : WindowServantSP ...@@ -144,111 +141,4 @@ public class Menu : WindowServantSP
{ {
Program.I().shiftToServant(Program.I().selectDeck); Program.I().shiftToServant(Program.I().selectDeck);
} }
public static void deleteShell()
{
try
{
if (File.Exists("commamd.shell")) File.Delete("commamd.shell");
}
catch (Exception)
{
}
}
public static void checkCommend()
{
if (Program.TimePassed() - lastTime > 1000)
{
lastTime = Program.TimePassed();
if (Program.I().selectDeck == null) return;
if (Program.I().selectReplay == null) return;
if (Program.I().puzzleMode == null) return;
if (Program.I().selectServer == null) return;
try
{
if (File.Exists("commamd.shell") == false) File.Create("commamd.shell").Close();
}
catch (Exception e)
{
Program.noAccess = true;
Debug.Log(e);
}
var all = "";
try
{
all = File.ReadAllText("commamd.shell", Encoding.UTF8);
var parmChars = all.ToCharArray();
var inQuote = false;
for (var index = 0; index < parmChars.Length; index++)
{
if (parmChars[index] == '"')
{
inQuote = !inQuote;
parmChars[index] = '\n';
}
if (!inQuote && parmChars[index] == ' ')
parmChars[index] = '\n';
}
var mats = new string(parmChars).Split(new[] {'\n'}, StringSplitOptions.RemoveEmptyEntries);
if (mats.Length > 0)
switch (mats[0])
{
case "online":
if (mats.Length == 5)
{
UIHelper.iniFaces(); //加载用户头像
Program.I().selectServer.KF_onlineGame(mats[1], mats[2], mats[3], mats[4]);
}
if (mats.Length == 6)
{
UIHelper.iniFaces();
Program.I().selectServer.KF_onlineGame(mats[1], mats[2], mats[3], mats[4], mats[5]);
}
break;
case "edit":
if (mats.Length == 2) Program.I().selectDeck.KF_editDeck(mats[1]); //编辑卡组
break;
case "replay":
if (mats.Length == 2)
{
UIHelper.iniFaces();
Program.I().selectReplay.KF_replay(mats[1]); //编辑录像
}
break;
case "puzzle":
if (mats.Length == 2)
{
UIHelper.iniFaces();
Program.I().puzzleMode.KF_puzzle(mats[1]); //运行残局
}
break;
}
}
catch (Exception e)
{
Program.noAccess = true;
Debug.Log(e);
}
try
{
if (all != "")
if (File.Exists("commamd.shell"))
File.WriteAllText("commamd.shell", "");
}
catch (Exception e)
{
Program.noAccess = true;
Debug.Log(e);
}
}
}
} }
\ No newline at end of file
...@@ -49,6 +49,7 @@ public static class TcpHelper ...@@ -49,6 +49,7 @@ public static class TcpHelper
} }
catch (Exception e) catch (Exception e)
{ {
Debug.LogError(e);
Program.DEBUGLOG("onDisConnected 10"); Program.DEBUGLOG("onDisConnected 10");
} }
...@@ -224,6 +225,14 @@ public static class TcpHelper ...@@ -224,6 +225,14 @@ public static class TcpHelper
} }
} }
// public static void SendSync(Package message)
// {
// if (tcpClient != null && tcpClient.Connected)
// {
// sender(message);
// }
// }
private static void sender(object o) private static void sender(object o)
{ {
try try
...@@ -238,6 +247,7 @@ public static class TcpHelper ...@@ -238,6 +247,7 @@ public static class TcpHelper
b.Write(BitConverter.GetBytes((byte) message.Fuction), 0, 1); b.Write(BitConverter.GetBytes((byte) message.Fuction), 0, 1);
b.Write(data, 0, data.Length); b.Write(data, 0, data.Length);
var s = memstream.ToArray(); var s = memstream.ToArray();
Debug.Log(BitConverter.ToString(s));
tcpClient.Client.Send(s); tcpClient.Client.Send(s);
} }
} }
......
...@@ -28,18 +28,6 @@ public class Ocgcore : ServantWithCardDescription ...@@ -28,18 +28,6 @@ public class Ocgcore : ServantWithCardDescription
private readonly List<gameCard> allCardsInSelectMessage = new List<gameCard>(); private readonly List<gameCard> allCardsInSelectMessage = new List<gameCard>();
public List<GameObject> allChainPanelFixedContainer = new List<GameObject>();
private arrow Arrow;
private autoForceChainHandlerType autoForceChainHandler = autoForceChainHandlerType.manDoAll;
private float camera_max = -17.5f;
private float camera_min = -17.5f;
public bool cantCheckGrave;
public List<gameCard> cards = new List<gameCard>();
private readonly List<gameCard> cardsForConfirm = new List<gameCard>(); private readonly List<gameCard> cardsForConfirm = new List<gameCard>();
private readonly List<gameCard> cardsInChain = new List<gameCard>(); private readonly List<gameCard> cardsInChain = new List<gameCard>();
...@@ -53,6 +41,31 @@ public class Ocgcore : ServantWithCardDescription ...@@ -53,6 +41,31 @@ public class Ocgcore : ServantWithCardDescription
private readonly List<gameCard> cardsSelectable = new List<gameCard>(); private readonly List<gameCard> cardsSelectable = new List<gameCard>();
private readonly List<gameCard> cardsSelected = new List<gameCard>(); private readonly List<gameCard> cardsSelected = new List<gameCard>();
private readonly List<int> ES_searchCode = new List<int>();
private readonly List<sortResult> ES_sortCurrent = new List<sortResult>();
private readonly List<sortResult> ES_sortResult = new List<sortResult>();
private readonly List<int> keys = new List<int>();
private readonly List<linkMask> linkMaskList = new List<linkMask>();
private readonly List<Package> Packages_ALL = new List<Package>();
private readonly List<placeSelector> placeSelectors = new List<placeSelector>();
public List<GameObject> allChainPanelFixedContainer = new List<GameObject>();
private arrow Arrow;
private autoForceChainHandlerType autoForceChainHandler = autoForceChainHandlerType.manDoAll;
private float camera_max = -17.5f;
private float camera_min = -17.5f;
public bool cantCheckGrave;
public List<gameCard> cards = new List<gameCard>();
private bool clearAllShowedB; private bool clearAllShowedB;
private bool clearTimeFlag; private bool clearTimeFlag;
private int code_for_show; private int code_for_show;
...@@ -82,8 +95,6 @@ public class Ocgcore : ServantWithCardDescription ...@@ -82,8 +95,6 @@ public class Ocgcore : ServantWithCardDescription
private string ES_phaseString = ""; private string ES_phaseString = "";
private readonly List<int> ES_searchCode = new List<int>();
private string ES_selectHint = ""; private string ES_selectHint = "";
private int Es_selectMSGHintData; private int Es_selectMSGHintData;
private int Es_selectMSGHintPlayer; private int Es_selectMSGHintPlayer;
...@@ -91,10 +102,6 @@ public class Ocgcore : ServantWithCardDescription ...@@ -91,10 +102,6 @@ public class Ocgcore : ServantWithCardDescription
private string ES_selectUnselectHint = ""; private string ES_selectUnselectHint = "";
private readonly List<sortResult> ES_sortCurrent = new List<sortResult>();
private readonly List<sortResult> ES_sortResult = new List<sortResult>();
private int ES_sortSum; private int ES_sortSum;
private string ES_turnString = ""; private string ES_turnString = "";
...@@ -113,8 +120,6 @@ public class Ocgcore : ServantWithCardDescription ...@@ -113,8 +120,6 @@ public class Ocgcore : ServantWithCardDescription
public bool isFirst; public bool isFirst;
public bool isObserver; public bool isObserver;
private readonly List<int> keys = new List<int>();
private int keysTempCount; private int keysTempCount;
private float lastAlpha; private float lastAlpha;
private int lastExcitedController = -1; private int lastExcitedController = -1;
...@@ -132,8 +137,6 @@ public class Ocgcore : ServantWithCardDescription ...@@ -132,8 +137,6 @@ public class Ocgcore : ServantWithCardDescription
public int life_1; public int life_1;
private readonly List<linkMask> linkMaskList = new List<linkMask>();
public int lpLimit = 8000; public int lpLimit = 8000;
public int MasterRule; public int MasterRule;
...@@ -155,12 +158,9 @@ public class Ocgcore : ServantWithCardDescription ...@@ -155,12 +158,9 @@ public class Ocgcore : ServantWithCardDescription
public string name_1_tag = ""; public string name_1_tag = "";
private List<Package> Packages = new List<Package>(); private List<Package> Packages = new List<Package>();
private readonly List<Package> Packages_ALL = new List<Package>();
public bool paused; public bool paused;
private readonly List<placeSelector> placeSelectors = new List<placeSelector>();
private bool replayShowAll; private bool replayShowAll;
private bool reportShowAll; private bool reportShowAll;
...@@ -2356,8 +2356,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2356,8 +2356,7 @@ public class Ocgcore : ServantWithCardDescription
Program.I().camera_main_2d.ScreenToWorldPoint(point), Program.I().camera_main_2d.ScreenToWorldPoint(point),
new Vector3(0, 0, 0), new Vector3(0, 0, 0),
true, true,
Program.I().ui_main_2d, Program.I().ui_main_2d
true
).GetComponent<lazyWin>(); ).GetComponent<lazyWin>();
} }
else else
...@@ -2368,8 +2367,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2368,8 +2367,7 @@ public class Ocgcore : ServantWithCardDescription
Program.I().camera_main_2d.ScreenToWorldPoint(point), Program.I().camera_main_2d.ScreenToWorldPoint(point),
new Vector3(0, 0, 0), new Vector3(0, 0, 0),
true, true,
Program.I().ui_main_2d, Program.I().ui_main_2d
true
).GetComponent<lazyWin>(); ).GetComponent<lazyWin>();
UIHelper.InterGameObject(winCaculator.gameObject); UIHelper.InterGameObject(winCaculator.gameObject);
winCaculator.input.value = UIHelper.getTimeString(); winCaculator.input.value = UIHelper.getTimeString();
...@@ -6839,7 +6837,6 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6839,7 +6837,6 @@ public class Ocgcore : ServantWithCardDescription
public override void show() public override void show()
{ {
if (isShowed) Menu.deleteShell();
base.show(); base.show();
Program.I().light.transform.eulerAngles = new Vector3(50, -50, 0); Program.I().light.transform.eulerAngles = new Vector3(50, -50, 0);
Program.cameraPosition = new Vector3(0, 23, -18.5f - 3.2f * (Program.fieldSize - 1f) / 0.21f); Program.cameraPosition = new Vector3(0, 23, -18.5f - 3.2f * (Program.fieldSize - 1f) / 0.21f);
......
...@@ -19,8 +19,7 @@ public class Program : MonoBehaviour ...@@ -19,8 +19,7 @@ public class Program : MonoBehaviour
public Light light; public Light light;
public AudioSource audio; public AudioSource audio;
[Header("容器")] [Header("容器")] public GameObject ui_back_ground_2d;
public GameObject ui_back_ground_2d;
public GameObject ui_windows_2d; public GameObject ui_windows_2d;
public GameObject ui_main_2d; public GameObject ui_main_2d;
public GameObject ui_container_3d; public GameObject ui_container_3d;
...@@ -28,31 +27,27 @@ public class Program : MonoBehaviour ...@@ -28,31 +27,27 @@ public class Program : MonoBehaviour
public GameObject ui_main_3d; public GameObject ui_main_3d;
public Camera camera_main_3d; public Camera camera_main_3d;
[Header("ui_back_ground_2d")] [Header("ui_back_ground_2d")] public Camera camera_back_ground_2d;
public Camera camera_back_ground_2d;
public GameObject mod_simple_ngui_background_texture; public GameObject mod_simple_ngui_background_texture;
public GameObject new_ui_cardDescription; public GameObject new_ui_cardDescription;
public GameObject new_ui_search; public GameObject new_ui_search;
public gameInfo new_ui_gameInfo; public gameInfo new_ui_gameInfo;
[Header("ui_windows_2d")] [Header("ui_windows_2d")] public Camera camera_windows_2d;
public Camera camera_windows_2d;
public GameObject new_ui_menu; public GameObject new_ui_menu;
public GameObject remaster_deckManager; public GameObject remaster_deckManager;
public GameObject new_ui_selectServer; public GameObject new_ui_selectServer;
public GameObject remaster_replayManager; public GameObject remaster_replayManager;
public GameObject remaster_puzzleManager; public GameObject remaster_puzzleManager;
public GameObject new_ui_aiRoom; public GameObject new_ui_aiRoom;
[Header("ui_main_2d")] [Header("ui_main_2d")] public Camera camera_main_2d;
public Camera camera_main_2d;
public GameObject new_ui_setting; public GameObject new_ui_setting;
public GameObject new_bar_room; public GameObject new_bar_room;
public GameObject new_ui_searchDetailed; public GameObject new_ui_searchDetailed;
public GameObject new_ui_book; public GameObject new_ui_book;
[Header("其他")] [Header("其他")] public GameObject mouseParticle;
public GameObject mouseParticle;
[Header("Prefab")] public facer face; [Header("Prefab")] public facer face;
public AudioClip zhankai; public AudioClip zhankai;
...@@ -121,7 +116,7 @@ public class Program : MonoBehaviour ...@@ -121,7 +116,7 @@ public class Program : MonoBehaviour
public GameObject mod_ocgcore_ss_p_sum_effect; public GameObject mod_ocgcore_ss_p_sum_effect;
public GameObject mod_ocgcore_ss_dark_hole; public GameObject mod_ocgcore_ss_dark_hole;
public GameObject mod_ocgcore_ss_link_mark; public GameObject mod_ocgcore_ss_link_mark;
public GameObject new_ui_cardOnSearchList; public GameObject new_ui_cardOnSearchList;
public GameObject new_bar_editDeck; public GameObject new_bar_editDeck;
public GameObject new_bar_changeSide; public GameObject new_bar_changeSide;
...@@ -286,17 +281,12 @@ public class Program : MonoBehaviour ...@@ -286,17 +281,12 @@ public class Program : MonoBehaviour
private void initialize() private void initialize()
{ {
// go(1, () =>
// {
UIHelper.iniFaces(); UIHelper.iniFaces();
initializeALLcameras(); initializeALLcameras();
fixALLcamerasPreFrame(); fixALLcamerasPreFrame();
backGroundPic = new BackGroundPic(); backGroundPic = new BackGroundPic();
servants.Add(backGroundPic); servants.Add(backGroundPic);
backGroundPic.fixScreenProblem(); backGroundPic.fixScreenProblem();
// });
// go(300, () =>
// {
InterString.initialize("config/translation.conf"); InterString.initialize("config/translation.conf");
GameTextureManager.initialize(); GameTextureManager.initialize();
Config.initialize("config/config.conf"); Config.initialize("config/config.conf");
...@@ -393,8 +383,6 @@ public class Program : MonoBehaviour ...@@ -393,8 +383,6 @@ public class Program : MonoBehaviour
initializeALLservants(); initializeALLservants();
loadResources(); loadResources();
readParams();
// });
} }
private void readParams() private void readParams()
...@@ -413,8 +401,6 @@ public class Program : MonoBehaviour ...@@ -413,8 +401,6 @@ public class Program : MonoBehaviour
if (args[i].ToLower() == "-n" && args.Length > i + 1) if (args[i].ToLower() == "-n" && args.Length > i + 1)
{ {
nick = args[++i]; nick = args[++i];
if (nick.Contains(" "))
nick = "\"" + nick + "\"";
} }
if (args[i].ToLower() == "-h" && args.Length > i + 1) host = args[++i]; if (args[i].ToLower() == "-h" && args.Length > i + 1) host = args[++i];
...@@ -422,29 +408,21 @@ public class Program : MonoBehaviour ...@@ -422,29 +408,21 @@ public class Program : MonoBehaviour
if (args[i].ToLower() == "-w" && args.Length > i + 1) if (args[i].ToLower() == "-w" && args.Length > i + 1)
{ {
password = args[++i]; password = args[++i];
if (password.Contains(" "))
password = "\"" + password + "\"";
} }
if (args[i].ToLower() == "-d" && args.Length > i + 1) if (args[i].ToLower() == "-d" && args.Length > i + 1)
{ {
deck = args[++i]; deck = args[++i];
if (deck.Contains(" "))
deck = "\"" + deck + "\"";
} }
if (args[i].ToLower() == "-r" && args.Length > i + 1) if (args[i].ToLower() == "-r" && args.Length > i + 1)
{ {
replay = args[++i]; replay = args[++i];
if (replay.Contains(" "))
replay = "\"" + replay + "\"";
} }
if (args[i].ToLower() == "-s" && args.Length > i + 1) if (args[i].ToLower() == "-s" && args.Length > i + 1)
{ {
puzzle = args[++i]; puzzle = args[++i];
if (puzzle.Contains(" "))
puzzle = "\"" + puzzle + "\"";
} }
if (args[i].ToLower() == "-j") if (args[i].ToLower() == "-j")
...@@ -454,32 +432,29 @@ public class Program : MonoBehaviour ...@@ -454,32 +432,29 @@ public class Program : MonoBehaviour
} }
} }
var cmdFile = "commamd.shell";
if (join) if (join)
{ {
File.WriteAllText(cmdFile, "online " + nick + " " + host + " " + port + " 0x233 " + password, shiftToServant(selectServer);
Encoding.UTF8); selectServer.KF_onlineGame(nick, host, port, "0x233", password);
exitOnReturn = true; exitOnReturn = true;
} }
else if (deck != null) else if (deck != null)
{ {
File.WriteAllText(cmdFile, "edit " + deck, Encoding.UTF8); selectDeck.KF_editDeck(deck);
exitOnReturn = true; exitOnReturn = true;
} }
else if (replay != null) else if (replay != null)
{ {
File.WriteAllText(cmdFile, "replay " + replay, Encoding.UTF8); selectReplay.KF_replay(replay);
exitOnReturn = true; exitOnReturn = true;
} }
else if (puzzle != null) else if (puzzle != null)
{ {
File.WriteAllText(cmdFile, "puzzle " + puzzle, Encoding.UTF8); puzzleMode.KF_puzzle(puzzle);
exitOnReturn = true; exitOnReturn = true;
} }
} }
private static int lastChargeTime; private static int lastChargeTime;
public static void charge() public static void charge()
...@@ -799,7 +774,8 @@ public class Program : MonoBehaviour ...@@ -799,7 +774,8 @@ public class Program : MonoBehaviour
// mouseParticle = Instantiate(new_mouse); // mouseParticle = Instantiate(new_mouse);
instance = this; instance = this;
initialize(); initialize();
go(500, () => { gameStart(); }); gameStart();
readParams();
} }
private int preWid; private int preWid;
...@@ -941,7 +917,6 @@ public class Program : MonoBehaviour ...@@ -941,7 +917,6 @@ public class Program : MonoBehaviour
//adeUnityEngine.Debug.Log(e); //adeUnityEngine.Debug.Log(e);
} }
Menu.deleteShell();
foreach (var zip in GameZipManager.Zips) zip.Dispose(); foreach (var zip in GameZipManager.Zips) zip.Dispose();
} }
......
...@@ -15,12 +15,6 @@ public class AIRoom : WindowServantSP ...@@ -15,12 +15,6 @@ public class AIRoom : WindowServantSP
RMSshow_none(InterString.Get("AI模式还在开发中,您在AI模式下遇到的BUG不会在联机的时候出现。")); RMSshow_none(InterString.Get("AI模式还在开发中,您在AI模式下遇到的BUG不会在联机的时候出现。"));
} }
public override void preFrameFunction()
{
base.preFrameFunction();
Menu.checkCommend();
}
#region ui #region ui
private UIselectableList superScrollView; private UIselectableList superScrollView;
......
...@@ -53,7 +53,6 @@ public class Room : WindowServantSP ...@@ -53,7 +53,6 @@ public class Room : WindowServantSP
public override void show() public override void show()
{ {
if (isShowed) Menu.deleteShell();
base.show(); base.show();
Program.I().ocgcore.returnServant = Program.I().selectServer; Program.I().ocgcore.returnServant = Program.I().selectServer;
Program.I().ocgcore.handler = handler; Program.I().ocgcore.handler = handler;
......
...@@ -9,19 +9,17 @@ using YGOSharp.OCGWrapper.Enums; ...@@ -9,19 +9,17 @@ using YGOSharp.OCGWrapper.Enums;
public class selectDeck : WindowServantSP public class selectDeck : WindowServantSP
{ {
private readonly cardPicLoader[] quickCards = new cardPicLoader[200];
private readonly string sort = "sortByTimeDeck";
private UIDeckPanel deckPanel; private UIDeckPanel deckPanel;
private string deckSelected = ""; private string deckSelected = "";
private string preString = ""; private string preString = "";
private readonly cardPicLoader[] quickCards = new cardPicLoader[200];
private UIInput searchInput; private UIInput searchInput;
private readonly string sort = "sortByTimeDeck";
private UIselectableList superScrollView; private UIselectableList superScrollView;
public override void initialize() public override void initialize()
...@@ -74,7 +72,6 @@ public class selectDeck : WindowServantSP ...@@ -74,7 +72,6 @@ public class selectDeck : WindowServantSP
public override void preFrameFunction() public override void preFrameFunction()
{ {
base.preFrameFunction(); base.preFrameFunction();
Menu.checkCommend();
if (searchInput.value != preString) if (searchInput.value != preString)
{ {
preString = searchInput.value; preString = searchInput.value;
......
...@@ -28,12 +28,6 @@ public class puzzleMode : WindowServantSP ...@@ -28,12 +28,6 @@ public class puzzleMode : WindowServantSP
selectedString = superScrollView.selectedString; selectedString = superScrollView.selectedString;
} }
public override void preFrameFunction()
{
base.preFrameFunction();
Menu.checkCommend();
}
public void KF_puzzle(string name) public void KF_puzzle(string name)
{ {
launch("puzzle/" + name + ".lua"); launch("puzzle/" + name + ".lua");
......
...@@ -8,13 +8,12 @@ using GameMessage = YGOSharp.OCGWrapper.Enums.GameMessage; ...@@ -8,13 +8,12 @@ using GameMessage = YGOSharp.OCGWrapper.Enums.GameMessage;
public class selectReplay : WindowServantSP public class selectReplay : WindowServantSP
{ {
private readonly string sort = "sortByTimeReplay";
private bool opYRP; private bool opYRP;
private PrecyOcg precy; private PrecyOcg precy;
private string selectedTrace = ""; private string selectedTrace = "";
private readonly string sort = "sortByTimeReplay";
private UIselectableList superScrollView; private UIselectableList superScrollView;
public override void initialize() public override void initialize()
...@@ -340,12 +339,6 @@ public class selectReplay : WindowServantSP ...@@ -340,12 +339,6 @@ public class selectReplay : WindowServantSP
selectedTrace = superScrollView.selectedString; selectedTrace = superScrollView.selectedString;
} }
public override void preFrameFunction()
{
base.preFrameFunction();
Menu.checkCommend();
}
public void KF_replay(string name, bool god = false) public void KF_replay(string name, bool god = false)
{ {
try try
......
...@@ -77,12 +77,6 @@ public class SelectServer : WindowServantSP ...@@ -77,12 +77,6 @@ public class SelectServer : WindowServantSP
Program.charge(); Program.charge();
} }
public override void preFrameFunction()
{
base.preFrameFunction();
Menu.checkCommend();
}
private void printFile(bool first) private void printFile(bool first)
{ {
list.Clear(); list.Clear();
...@@ -143,7 +137,7 @@ public class SelectServer : WindowServantSP ...@@ -143,7 +137,7 @@ public class SelectServer : WindowServantSP
for (var i = 0; i < list.items.Count; i++) all += list.items[i] + "\r\n"; for (var i = 0; i < list.items.Count; i++) all += list.items[i] + "\r\n";
File.WriteAllText("config/hosts.conf", all); File.WriteAllText("config/hosts.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
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment