{"id":22100574,"url":"https://github.com/juseounghyun/restful_api","last_synced_at":"2026-05-06T08:32:01.985Z","repository":{"id":205164958,"uuid":"713461655","full_name":"JUSEOUNGHYUN/RESTFul_API","owner":"JUSEOUNGHYUN","description":"주체관제 RESTFul API 테스트 프로그램 (Windows Forms)","archived":false,"fork":false,"pushed_at":"2023-11-09T17:47:06.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-04T21:06:02.327Z","etag":null,"topics":["csharp","csv-file","microsoft-office-interop-excel","multi-threading","postgresql","restful-api","winforms","worksheets"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JUSEOUNGHYUN.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-11-02T15:10:13.000Z","updated_at":"2023-11-02T21:16:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"b20ac969-1280-4aa3-80fc-e3ed2f9a36e4","html_url":"https://github.com/JUSEOUNGHYUN/RESTFul_API","commit_stats":null,"previous_names":["juseounghyun/restful_api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JUSEOUNGHYUN/RESTFul_API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JUSEOUNGHYUN%2FRESTFul_API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JUSEOUNGHYUN%2FRESTFul_API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JUSEOUNGHYUN%2FRESTFul_API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JUSEOUNGHYUN%2FRESTFul_API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JUSEOUNGHYUN","download_url":"https://codeload.github.com/JUSEOUNGHYUN/RESTFul_API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JUSEOUNGHYUN%2FRESTFul_API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32684622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T02:33:58.958Z","status":"ssl_error","status_checked_at":"2026-05-06T02:33:39.611Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","csv-file","microsoft-office-interop-excel","multi-threading","postgresql","restful-api","winforms","worksheets"],"created_at":"2024-12-01T05:14:48.758Z","updated_at":"2026-05-06T08:32:01.969Z","avatar_url":"https://github.com/JUSEOUNGHYUN.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"### 0. 기본 화면\n\n📍 화면 구성\n1. Parking RESTFul(Test)\n2. PreGate\n3. InGate(Main(IN))\n4. OutGate(Main(OUT))\n5. Excel Page\n6. Auto_IN, Auto_OUT(Multi Threading)\n\n![화면 캡처 2023-10-31 232743](https://github.com/JUSEOUNGHYUN/JUSEOUNGHYUN/assets/80812790/23cb2005-5dba-4344-acd1-f3da6e74fe13)\n\n### 1. Excel Open\n\n![Excel open](https://github.com/JUSEOUNGHYUN/JUSEOUNGHYUN/assets/80812790/ccd1d8a3-0e75-4f04-9d8d-1777c317a318)\n\n#### 1.1 ParseExelOpenData()\n         private List\u003cstring\u003e ParseExelOpenData(string strSheetName)\n         {\n             List\u003cstring\u003e InList = new List\u003cstring\u003e();\n             if (m_strFileName != \"\")\n             {\n                 Microsoft.Office.Interop.Excel.Application application = new Microsoft.Office.Interop.Excel.Application();\n                 Workbook workbook = application.Workbooks.Open(Filename: m_strFileName);\n                 if (workbook != null)\n                 {\n                     Worksheet worksheet1 = workbook.Worksheets.get_Item(strSheetName);\n                     application.Visible = false;\n                     Range range = worksheet1.UsedRange;\n                     String data = string.Empty;\n                     string str = string.Empty;\n         \n                     m_nRowCnt = range.Rows.Count;\n                     m_nColCnt = range.Columns.Count;\n         \n                     for (int i = 1; i \u003c= range.Rows.Count; ++i)\n                     {\n                         for (int j = 1; j \u003c= range.Columns.Count; ++j)\n                         {\n                             if (((range.Cells[i, j] as Range).Value2 == null))\n                             {\n                                 str = \" \";\n                             }\n                             else\n                             {\n                                 str = ((range.Cells[i, j] as Range).Value2.ToString() + \" \");\n                             }\n                             data += str;\n                         }\n                         InList = data.Split(' ').ToList();\n                     }\n                     InList.RemoveAt(InList.Count - 1);\n         \n                     workbook.Close(Filename: m_strFileName);\n                     DeleteObject(workbook);\n                     DeleteObject(worksheet1);\n                     application.Quit();\n                     DeleteObject(application);\n                 }\n                 else\n                 {\n                     MessageBox.Show(\"workbook이 null임.\");\n                 }\n             }\n             else\n             {\n                 MessageBox.Show(\"Failed to read file.\");\n             }\n         \n             return InList;\n         }\n### 2. Main InGate(RESTFul)\n\nhttps://github.com/JUSEOUNGHYUN/JUSEOUNGHYUN/assets/80812790/4545ad25-6dc0-4789-915f-6de52e130fa7\n\n#### 2.1 DoHttpWebRequest()\n        private bool DoHttpWebRequest()\n        {\n            if (m_Request != null)\n            {\n                m_Request.Abort();\n                m_Request = null;\n            }\n            m_URL = \"http://\" + IPADDRESS_textBox.Text + \":\" + PORTNUMBER_textBox.Text + \"/api/InOutCar\";\n            // 예외처리 IP와 PORT번호를 입력하지 않았을 때\n            if (IPADDRESS_textBox.Text != string.Empty \u0026\u0026 PORTNUMBER_textBox.Text != string.Empty)\n            {\n                try\n                {\n                    // HTTP Websocket Communication\n                    m_Request = (HttpWebRequest)WebRequest.Create(m_URL);\n                    m_Request.Method = \"POST\"; // method \n                    m_Request.ContentType = \"application/json\"; // ContentType\n\n                    m_IsIpPort = true;\n                }\n                catch (Exception e)\n                {\n                    MessageBox.Show(e.Message);\n                }\n            }\n            else\n            {\n                m_IsIpPort = false;\n            }\n            return m_IsIpPort;\n        }\n\n\n#### 2.2 SendOrResultJson()\n    private void SendOrResultJson(JObject obj)\n    {\n        if (DoHttpWebRequest())\n        {\n            m_StreamWriter = new StreamWriter(m_Request.GetRequestStream());\n            m_StreamWriter.Write(obj);\n            m_StreamWriter.Flush();\n            m_StreamWriter.Close();\n            SetFileWriteMsg(\"SendMessage\");\n            OutputJson(obj);\n    \n            try\n            {\n                HttpWebResponse httpResponse = (HttpWebResponse)m_Request.GetResponse();\n                using (StreamReader streamReader = new StreamReader(httpResponse.GetResponseStream()))\n                {\n                    SetFileWriteMsg(\"ResponseMessage\");\n                    string result = streamReader.ReadToEnd();\n                    ResultJson(result);\n                    streamReader.Close();\n                }\n            }\n            catch (Exception ex) // Error\n            {\n                Console.WriteLine(ex.Message);\n            }\n        }\n    }\n\n### 3. Auto IN (Multi Threading)\n- Gate 101 102, 103(PreGate), 201, 202, 203(InGate) 301, 302, 303(OutGate) each Thread\n\nhttps://github.com/JUSEOUNGHYUN/JUSEOUNGHYUN/assets/80812790/435249f9-0d7e-41be-b1ad-06fe5bea67dd\n\n### 4. TextBox_TextChanged(UI)\n- 컨테이너 사이즈가 40이 넘으면 안됨\n- 첫 번째 문자는 N,L, 숫자만 가능\n\nhttps://github.com/JUSEOUNGHYUN/JUSEOUNGHYUN/assets/80812790/6fc8260b-9ef2-4f33-b69e-b5d9f61b2aca\n\n### 5. TabControl Design(DrawItem)\n\nhttps://github.com/JUSEOUNGHYUN/JUSEOUNGHYUN/assets/80812790/4b0450d8-29cb-4cd4-b2d6-35319d5cecc0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuseounghyun%2Frestful_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuseounghyun%2Frestful_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuseounghyun%2Frestful_api/lists"}