diff --git a/unimarc/.vs/unimarc/FileContentIndex/5cb773e0-eca0-4c5a-8cf2-d9c2071057e4.vsidx b/unimarc/.vs/unimarc/FileContentIndex/5cb773e0-eca0-4c5a-8cf2-d9c2071057e4.vsidx
new file mode 100644
index 0000000..a99a582
Binary files /dev/null and b/unimarc/.vs/unimarc/FileContentIndex/5cb773e0-eca0-4c5a-8cf2-d9c2071057e4.vsidx differ
diff --git a/unimarc/.vs/unimarc/FileContentIndex/6dd2f0b8-07a9-4453-aee5-5bd62c17b2e4.vsidx b/unimarc/.vs/unimarc/FileContentIndex/6dd2f0b8-07a9-4453-aee5-5bd62c17b2e4.vsidx
new file mode 100644
index 0000000..2702446
Binary files /dev/null and b/unimarc/.vs/unimarc/FileContentIndex/6dd2f0b8-07a9-4453-aee5-5bd62c17b2e4.vsidx differ
diff --git a/unimarc/.vs/unimarc/FileContentIndex/96c0044e-f26c-4c19-815c-2b43691aea9b.vsidx b/unimarc/.vs/unimarc/FileContentIndex/96c0044e-f26c-4c19-815c-2b43691aea9b.vsidx
new file mode 100644
index 0000000..daccd80
Binary files /dev/null and b/unimarc/.vs/unimarc/FileContentIndex/96c0044e-f26c-4c19-815c-2b43691aea9b.vsidx differ
diff --git a/unimarc/.vs/unimarc/FileContentIndex/bedaddd2-a207-45d9-8c04-25efe81849f7.vsidx b/unimarc/.vs/unimarc/FileContentIndex/bedaddd2-a207-45d9-8c04-25efe81849f7.vsidx
new file mode 100644
index 0000000..62f185d
Binary files /dev/null and b/unimarc/.vs/unimarc/FileContentIndex/bedaddd2-a207-45d9-8c04-25efe81849f7.vsidx differ
diff --git a/unimarc/.vs/unimarc/FileContentIndex/read.lock b/unimarc/.vs/unimarc/FileContentIndex/read.lock
new file mode 100644
index 0000000..e69de29
diff --git a/unimarc/.vs/unimarc/v16/.suo b/unimarc/.vs/unimarc/v16/.suo
index ccbe54c..bdc4ab9 100644
Binary files a/unimarc/.vs/unimarc/v16/.suo and b/unimarc/.vs/unimarc/v16/.suo differ
diff --git a/unimarc/.vs/unimarc/v17/.suo b/unimarc/.vs/unimarc/v17/.suo
index e26ad3e..3ac0e30 100644
Binary files a/unimarc/.vs/unimarc/v17/.suo and b/unimarc/.vs/unimarc/v17/.suo differ
diff --git a/unimarc/UpgradeLog2.htm b/unimarc/UpgradeLog2.htm
new file mode 100644
index 0000000..4d93ae2
--- /dev/null
+++ b/unimarc/UpgradeLog2.htm
@@ -0,0 +1,273 @@
+
+
+
+ 마이그레이션 보고서
+
+ 마이그레이션 보고서 -
개요
솔루션 및 프로젝트
Setup_UniMarc
| Setup_UniMarc\Setup_UniMarc.vdproj:
+ 이 프로젝트 형식을 기반으로 하는 애플리케이션을 찾지 못했습니다. 추가 정보를 보려면 이 링크를 확인하십시오. 54435603-dbb4-11d2-8724-00a0c9a8b90c |
솔루션
\ No newline at end of file
diff --git a/unimarc/unimarc.sln b/unimarc/unimarc.sln
index 39fd7c7..f7a8d5e 100644
--- a/unimarc/unimarc.sln
+++ b/unimarc/unimarc.sln
@@ -1,14 +1,12 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.30114.105
+# Visual Studio Version 17
+VisualStudioVersion = 17.3.32804.467
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniMarc", "UniMarc\UniMarc.csproj", "{4FCAFD58-3A8E-4E08-85E2-05329866193A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Factory_Client", "Factory_Client\Factory_Client.csproj", "{380772D6-8825-4008-9F46-AE9F8AA8EE7B}"
EndProject
-Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Setup_UniMarc", "Setup_UniMarc\Setup_UniMarc.vdproj", "{D4608F60-4B75-4DC2-9254-22E69A62213C}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -23,8 +21,6 @@ Global
{380772D6-8825-4008-9F46-AE9F8AA8EE7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{380772D6-8825-4008-9F46-AE9F8AA8EE7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{380772D6-8825-4008-9F46-AE9F8AA8EE7B}.Release|Any CPU.Build.0 = Release|Any CPU
- {D4608F60-4B75-4DC2-9254-22E69A62213C}.Debug|Any CPU.ActiveCfg = Debug
- {D4608F60-4B75-4DC2-9254-22E69A62213C}.Release|Any CPU.ActiveCfg = Release
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/unimarc/unimarc/Login.Designer.cs b/unimarc/unimarc/Login.Designer.cs
index 68d4be4..8aea6d6 100644
--- a/unimarc/unimarc/Login.Designer.cs
+++ b/unimarc/unimarc/Login.Designer.cs
@@ -35,6 +35,7 @@
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.chk_Save = new System.Windows.Forms.CheckBox();
+ this.lbl_IP = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// ID_text
@@ -62,7 +63,7 @@
this.button1.TabIndex = 3;
this.button1.Text = "Login";
this.button1.UseVisualStyleBackColor = true;
- this.button1.Click += new System.EventHandler(this.button1_Click);
+ this.button1.Click += new System.EventHandler(this.Login_Click);
//
// button2
//
@@ -72,7 +73,7 @@
this.button2.TabIndex = 4;
this.button2.Text = "Exit";
this.button2.UseVisualStyleBackColor = true;
- this.button2.Click += new System.EventHandler(this.button2_Click);
+ this.button2.Click += new System.EventHandler(this.Btn_Close_Click);
//
// label1
//
@@ -102,6 +103,15 @@
this.chk_Save.Text = "ID / PW 저장";
this.chk_Save.UseVisualStyleBackColor = true;
//
+ // lbl_IP
+ //
+ this.lbl_IP.AutoSize = true;
+ this.lbl_IP.Location = new System.Drawing.Point(12, 198);
+ this.lbl_IP.Name = "lbl_IP";
+ this.lbl_IP.Size = new System.Drawing.Size(40, 12);
+ this.lbl_IP.TabIndex = 2;
+ this.lbl_IP.Text = "IPv4 : ";
+ //
// login
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
@@ -110,6 +120,7 @@
this.ControlBox = false;
this.Controls.Add(this.chk_Save);
this.Controls.Add(this.label2);
+ this.Controls.Add(this.lbl_IP);
this.Controls.Add(this.label1);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
@@ -133,5 +144,6 @@
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.CheckBox chk_Save;
+ private System.Windows.Forms.Label lbl_IP;
}
}
\ No newline at end of file
diff --git a/unimarc/unimarc/Login.cs b/unimarc/unimarc/Login.cs
index e1ebd2d..25f00c9 100644
--- a/unimarc/unimarc/Login.cs
+++ b/unimarc/unimarc/Login.cs
@@ -8,6 +8,8 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
+using System.Net;
+using System.Net.Sockets;
namespace WindowsFormsApp1
{
@@ -21,6 +23,8 @@ namespace WindowsFormsApp1
private void login_Load(object sender, EventArgs e)
{
+ lbl_IP.Text = String.Format("{0}", GetIP);
+
this.ActiveControl = ID_text;
if (CreateFile()) {
@@ -31,37 +35,98 @@ namespace WindowsFormsApp1
db.DBcon();
}
- private void button1_Click(object sender, EventArgs e)
+ private void Login_Click(object sender, EventArgs e)
{
db.DBcon();
string cmd = db.DB_Search("User_Data", "id", ID_text.Text);
string db_res = db.DB_Send_CMD_Search(cmd);
string[] result = db_res.Split('|');
((Main)(this.Owner)).User_Name = ID_text.Text;
- if (db_res == "") {
+ if (db_res == "")
+ {
MessageBox.Show("아이디 혹은 비밀번호가 정확하지않습니다.");
return;
}
- if (ID_text.Text == result[1]) {
+ if (ID_text.Text == result[1])
+ {
if (PW_text.Text == result[2])
{
if (chk_Save.Checked)
if (!CreateFile())
WriteFile();
+ if (!CheckIP(lbl_IP.Text, result[4]))
+ {
+ MessageBox.Show("저장된 아이피가 다릅니다!");
+ return;
+ }
this.DialogResult = DialogResult.OK;
this.Close();
}
- else {
+ else
+ {
MessageBox.Show("아이디 혹은 비밀번호가 정확하지않습니다.");
}
}
- else {
+ else
+ {
MessageBox.Show("아이디 혹은 비밀번호가 정확하지않습니다.");
- // MessageBox.Show("ID : [" + result[1] + "] PW : [" + result[2] + "]");
}
}
+ #region CheckIP
+
+ ///
+ /// 해당 ID와 IP대조
+ ///
+ /// 현재 IP의 아이피
+ ///
+ public bool CheckIP(string IP, string compName)
+ {
+ string cmd = String.Format("SELECT `{0}` FROM {1} WHERE `{2}` = \"{3}\"", "IP", "Comp_IP", "comp", compName);
+ string res = db.DB_Send_CMD_Search(cmd);
+ string[] ary = res.Split('|');
+
+ foreach (string item in ary)
+ {
+ if (item == IP)
+ return true;
+
+ if (item == "ALL")
+ return true;
+ }
+
+ return false;
+ }
+
+ ///
+ /// 현 PC의 외부아이피를 가져옴
+ /// 프로그램에서 가져올 방법이 딱히 없어 꼼수로 웹사이트 크롤링을 통해 가져옴
+ ///
+ public static string GetIP
+ {
+ get
+ {
+ string url = "http://checkip.dyndns.org/";
+ HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
+ request.Method = "GET";
+
+ string resResult = string.Empty;
+ using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
+ {
+ StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8, true);
+ resResult = reader.ReadToEnd();
+ }
+ string realip = Parsing(Parsing(resResult, "Current IP Address:")[1], "