diff --git a/Client/Client.csproj b/Client/Client.csproj
index d4f0c02..5df9c6a 100644
--- a/Client/Client.csproj
+++ b/Client/Client.csproj
@@ -27,7 +27,7 @@
http://www.ygh.kr/ost/
true
index.html
- 3
+ 4
1.0.0.%2a
false
true
diff --git a/Client/Forms/FormLogin.cs b/Client/Forms/FormLogin.cs
index 3149a3f..daa199c 100644
--- a/Client/Forms/FormLogin.cs
+++ b/Client/Forms/FormLogin.cs
@@ -101,7 +101,7 @@ private void btnLogin_Click(object sender, EventArgs e)
}
else
{
- lblResult.Style = MetroFramework.MetroColorStyle.Red;
+ lblResult.Style = MetroColorStyle.Red;
lblResult.Text = "서버와 연결 되어있지 않습니다.";
}
}
@@ -154,7 +154,7 @@ public void EndConnect(IAsyncResult result)
MetroColorStyle.Red;
lblResult.Text = resultText;
- if (savedLoginInfo.Contains("\n"))
+ if (Program.client.Connected && savedLoginInfo.Contains("\n"))
{
txtEmpId.Text = savedLoginInfo.Split('\n')[0];
txtPassword.Text = savedLoginInfo.Split('\n')[1];
diff --git a/Client/Program.cs b/Client/Program.cs
index f2e2a3b..38ac37e 100644
--- a/Client/Program.cs
+++ b/Client/Program.cs
@@ -16,7 +16,7 @@ static class Program
public static object locker = new object(); // 송신 뮤택스
public static TcpClient client; // 서버와 연결된 TCP 소켓
public static NetworkStream ns; // 네트워크 스트림
- public static readonly string hostname = "127.0.0.1"; // 접속할 서버 주소
+ public static string hostname; // 접속할 서버 주소
public static readonly ushort port = 6756; // 접속할 서버 포트
public static Thread recvThread; // 서버로부터 수신을 대기하는 스레드
public static Dictionary> callback; // 타입에 따른 콜백 메소드
@@ -33,6 +33,10 @@ static void Main()
recvThread = new Thread(new ThreadStart(Recieve));
callback = new Dictionary>();
+ string[] args = Environment.GetCommandLineArgs();
+ hostname = args.Length > 1 ? args[1] : "www.ygh.kr";
+
+
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(formMain = new FormMain());