{"id":21777,"date":"2025-05-02T09:30:00","date_gmt":"2025-05-02T00:30:00","guid":{"rendered":"https:\/\/itport.cloud\/?p=21777"},"modified":"2025-05-01T17:31:35","modified_gmt":"2025-05-01T08:31:35","slug":"post-21777","status":"publish","type":"post","link":"https:\/\/itport.cloud\/?p=21777","title":{"rendered":"\uff08\u7b2c\u4e94\u56de\uff09C# Windows\u30d5\u30a9\u30fc\u30e0\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067 \u30e6\u30fc\u30b6\u30fc\u767b\u9332\u753b\u9762\u3092\u4f5c\u6210\u3059\u308b"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"e79baee6aca1-1\">\u76ee\u6b21<\/h2>\n\n\n\n<p><a href=\"#1\" data-type=\"internal\" data-id=\"#1\">\u524d\u56de\u306e\u304a\u3055\u3089\u3044<\/a><br><a href=\"#2\" data-type=\"internal\" data-id=\"#2\">\u4fdd\u5b58\u51e6\u7406<\/a><br> <a href=\"#3\" data-type=\"internal\" data-id=\"#3\">\u5b9f\u969b\u306e\u5024\u4fdd\u5b58\u51e6\u7406 <\/a><br><a href=\"#4\" data-type=\"internal\" data-id=\"#4\">\u307e\u3068\u3081<\/a><br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"1\">\u524d\u56de\u306e\u304a\u3055\u3089\u3044<\/h2>\n\n\n\n<p>\u524d\u56de\u306f\u30a4\u30d9\u30f3\u30c8\u51e6\u7406\u3068\u30d1\u30cd\u30eb\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306b\u3064\u3044\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<br>\u4eca\u56de\u306f\u5b9f\u969b\u306b\u5165\u529b\u3057\u305f\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u51e6\u7406\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"2\">\u4fdd\u5b58\u51e6\u7406<\/h2>\n\n\n\n<p>\u4fdd\u5b58\u3057\u305f\u65e8\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3060\u3051\u3067\u306f\u306a\u304f\u3001\u5b9f\u969b\u306b\u4fdd\u5b58\u3059\u308b\u51e6\u7406\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002<br>\u4e0b\u8a18\u306e\u30b3\u30fc\u30c9\u306e  \u300cStatusText.Text = &#8220;\u4fdd\u5b58\u3057\u307e\u3057\u305f&#8221;; \u300d\u90e8\u5206\u3092\u4e8c\u3064\u76ee\u306e\u30b3\u30fc\u30c9\u306e\u5185\u5bb9\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>private void SaveButton_Click(object sender, EventArgs e)\n        {\n            DialogResult result = MessageBox.Show(\"\u4fdd\u5b58\u3057\u307e\u3059\u304b\uff1f\", \"\u78ba\u8a8d\", MessageBoxButtons.YesNo, MessageBoxIcon.Question);\n            if (result == DialogResult.Yes)\n            {\n                StatusText.Text = \"\u4fdd\u5b58\u3057\u307e\u3057\u305f\";\n            }<\/code><\/pre>\n\n\n\n<p>\u4e0b\u8a18\u306e\u30b3\u30fc\u30c9\u306b\u5909\u66f4<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>using (var sw = new System.IO.StreamWriter(\"save.txt\", true, System.Text.Encoding.GetEncoding(\"shift_jis\")))\n                {\n                    sw.Write(\"\u66f8\u304d\u307e\u3057\u305f\");\n                }<\/code><\/pre>\n\n\n\n<p>\u5909\u66f4\u5f8c\u306b\u5b9f\u884c\u3057\u3001\u767b\u9332\u753b\u9762\u3067\u300c\u4fdd\u5b58\u300d\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u4e0b\u306e\u753b\u50cf\u306e\u3088\u3046\u306b\u300c\u66f8\u304d\u307e\u3057\u305f\u300d\u3068\u66f8\u304b\u308c\u305f\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u304c\u4fdd\u5b58\u3055\u308c\u307e\u3057\u305f\u3002<br>\u3053\u3061\u3089\u306f\u8ffd\u52a0\u3057\u305f\u30b3\u30fc\u30c9\u306b\u3066\u300csave.txt\u300d\u306b\u300c\u66f8\u304d\u307e\u3057\u305f\u300d\u3068\u3044\u3046\u6587\u5b57\u3092\u4fdd\u5b58\u3059\u308b\u51e6\u7406\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002<br>\u6700\u5f8c\u306b\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u5f15\u6570\u306b\u3057\u3066\u3044\u307e\u3059\u3002<br>\u6587\u5b57\u30b3\u30fc\u30c9\u306f\u30d5\u30a1\u30a4\u30eb\u3092\u66f8\u304f\u3068\u304d\u306b\u3069\u306e\u3088\u3046\u306a\u5f62\u614b\u3067\u66f8\u304f\u304b\u306e\u7d04\u675f\u4e8b\u3067\u3059\u3002<br>\u66f8\u304f\u5074\u3068\u8aad\u3080\u5074\u3067\u4e00\u81f4\u3057\u3066\u3044\u306a\u3044\u3068\u6b63\u3057\u304f\u8aad\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002<br>\u901a\u5e38\u65e5\u672c\u8a9e\u3068\u82f1\u8a9e\u3057\u304b\u6271\u308f\u306a\u3044\u5834\u5408\u306fShift-jis\u3067\u554f\u984c\u306a\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"530\" height=\"200\" src=\"https:\/\/itport.cloud\/wp-content\/uploads\/2025\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2025-04-30-175447.png\" alt=\"\" class=\"wp-image-21778\" srcset=\"https:\/\/itport.cloud\/wp-content\/uploads\/2025\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2025-04-30-175447.png 530w, https:\/\/itport.cloud\/wp-content\/uploads\/2025\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2025-04-30-175447-300x113.png 300w, https:\/\/itport.cloud\/wp-content\/uploads\/2025\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2025-04-30-175447-450x170.png 450w\" sizes=\"auto, (max-width: 530px) 100vw, 530px\" \/><\/figure>\n\n\n\n<p>\u300csw.Write(\u201c\u66f8\u304d\u307e\u3057\u305f\u201d);\u300d\u306e\u90e8\u5206\u3067\u5b9f\u969b\u306b\u30d5\u30a1\u30a4\u30eb\u3078\u66f8\u304d\u8fbc\u3093\u3067\u3044\u307e\u3059\u3002<br>\u3053\u306e\u72b6\u614b\u3067\u4fdd\u5b58\u3092\u884c\u3046\u3068save.txt\u30d5\u30a1\u30a4\u30eb\u306b\u300c\u66f8\u304d\u307e\u3057\u305f\u300d\u3068\u4fdd\u5b58\u3055\u308c\u307e\u3059\u3002<br>save.txt\u30d5\u30a1\u30a4\u30eb\u306f\u4e0b\u8a18\u306e\u30d5\u30a9\u30eb\u30c0\u30fc\u306b\u751f\u6210\u3055\u308c\u307e\u3057\u305f\u3002<br>\u3010\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u3042\u308b\u30d5\u30a9\u30eb\u30c0\u30fc\u3011\\bin\\Debug<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"3\">\u5b9f\u969b\u306e\u5024\u4fdd\u5b58\u51e6\u7406<\/h2>\n\n\n\n<p>\u30d5\u30a1\u30a4\u30eb\u3078\u306e\u66f8\u304d\u8fbc\u307f\u304c\u78ba\u8a8d\u3067\u304d\u305f\u306e\u3067\u3001\u5b9f\u969b\u306e\u5024\u3092\u4fdd\u5b58\u3059\u308b\u51e6\u7406\u306b\u66f8\u304d\u63db\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>using (var sw = new System.IO.StreamWriter(\"save.csv\", true, System.Text.Encoding.GetEncoding(\"shift_jis\")))\n                {\n                    sw.Write(IdTextBox.Text + \",\");\n                    sw.Write(MailCheckBox.Checked + \",\");\n                    sw.Write(MailAdressTextBox.Text + \",\");\n                    if (MenRadioButton.Checked)\n                    {\n                        sw.Write(\"\u7537\u6027\" + \",\");\n                    }\n                    else\n                    {\n                        sw.Write(\"\u5973\u6027\" + \",\");\n                    }\n\n                    sw.Write(EnableComboBox.Text);\n                    sw.WriteLine(\"\");\n                }<\/code><\/pre>\n\n\n\n<p>\u753b\u9762\u306e\u9805\u76ee\u3092\u300c,\u300d\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067\u7e4b\u3052\u30661\u884c\u5206\u306e\u30c7\u30fc\u30bf\u306b\u3057\u3066\u3044\u307e\u3059\u3002<br>\u30ab\u30f3\u30de\u533a\u5207\u308a\u306ecsv\u5f62\u5f0f\u3067\u4fdd\u5b58\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u62e1\u5f35\u5b50\u3092\u300c.txt\u300d\u304b\u3089\u300c.csv\u300d\u306b\u5909\u66f4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"504\" height=\"368\" src=\"https:\/\/itport.cloud\/wp-content\/uploads\/2025\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2025-05-01-161828.png\" alt=\"\" class=\"wp-image-21780\" srcset=\"https:\/\/itport.cloud\/wp-content\/uploads\/2025\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2025-05-01-161828.png 504w, https:\/\/itport.cloud\/wp-content\/uploads\/2025\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2025-05-01-161828-300x219.png 300w, https:\/\/itport.cloud\/wp-content\/uploads\/2025\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2025-05-01-161828-438x320.png 438w\" sizes=\"auto, (max-width: 504px) 100vw, 504px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"502\" height=\"366\" src=\"https:\/\/itport.cloud\/wp-content\/uploads\/2025\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2025-05-01-161752.png\" alt=\"\" class=\"wp-image-21782\" srcset=\"https:\/\/itport.cloud\/wp-content\/uploads\/2025\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2025-05-01-161752.png 502w, https:\/\/itport.cloud\/wp-content\/uploads\/2025\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2025-05-01-161752-300x219.png 300w, https:\/\/itport.cloud\/wp-content\/uploads\/2025\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2025-05-01-161752-439x320.png 439w\" sizes=\"auto, (max-width: 502px) 100vw, 502px\" \/><\/figure>\n\n\n\n<p>\u4e0a\u8a18\u306e2\u30e6\u30fc\u30b6\u30fc\u3092\u5b9f\u969b\u306b\u767b\u9332\u3057\u3066\u307f\u308b\u3068\u300csave.csv\u300d\u3068\u3044\u3046\u540d\u524d\u306ecsv\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<br>\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3044\u3066\u307f\u308b\u3068\u2026<br>\u4e0b\u306e\u753b\u50cf\u306e\u3088\u3046\u306bcsv\u5f62\u5f0f\u3067\u5024\u304c\u51fa\u529b\u3055\u308c\u3066\u3044\u308b\u306e\u304c\u5206\u304b\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"371\" height=\"93\" src=\"https:\/\/itport.cloud\/wp-content\/uploads\/2025\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2025-05-01-162142.png\" alt=\"\" class=\"wp-image-21783\" srcset=\"https:\/\/itport.cloud\/wp-content\/uploads\/2025\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2025-05-01-162142.png 371w, https:\/\/itport.cloud\/wp-content\/uploads\/2025\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2025-05-01-162142-300x75.png 300w\" sizes=\"auto, (max-width: 371px) 100vw, 371px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"4\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p>\u4eca\u56de\u306f\u767b\u9332\u753b\u9762\u3067\u767b\u9332\u3057\u305f\u30c7\u30fc\u30bf\u3092csv\u5f62\u5f0f\u3067\u30d5\u30a1\u30a4\u30eb\u51fa\u529b\u3059\u308b\u90e8\u5206\u3092\u884c\u3044\u307e\u3057\u305f\u3002<br>\u6b21\u56de\u306f\u30c7\u30fc\u30bf\u306e\u4e00\u89a7\u8868\u793a\u3092\u3059\u308b\u90e8\u5206\u3068\u753b\u9762\u9077\u79fb\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u76ee\u6b21 \u524d\u56de\u306e\u304a\u3055\u3089\u3044\u4fdd\u5b58\u51e6\u7406 \u5b9f\u969b\u306e\u5024\u4fdd\u5b58\u51e6\u7406 \u307e\u3068\u3081 \u524d\u56de\u306e\u304a\u3055\u3089\u3044 \u524d\u56de\u306f\u30a4\u30d9\u30f3\u30c8\u51e6\u7406\u3068\u30d1\u30cd\u30eb\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306b\u3064\u3044\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002\u4eca\u56de\u306f\u5b9f\u969b\u306b\u5165\u529b\u3057\u305f\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u51e6\u7406\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002 \u4fdd\u5b58\u51e6\u7406 \u4fdd\u5b58\u3057\u305f\u65e8\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3060\u3051\u3067\u306f\u306a\u304f\u3001\u5b9f\u969b\u306b\u4fdd\u5b58\u3059\u308b\u51e6\u7406\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002\u4e0b\u8a18\u306e\u30b3\u30fc\u30c9\u306e \u300cStatusText.Text = &#8220;\u4fdd\u5b58\u3057\u307e\u3057\u305f&#8221;; \u300d\u90e8\u5206\u3092\u4e8c\u3064\u76ee\u306e\u30b3\u30fc\u30c9\u306e\u5185\u5bb9\u306b\u5909\u66f4\u3057\u307e\u3059\u3002 private void SaveButton_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show(&#8220;\u4fdd\u5b58\u3057\u307e\u3059\u304b\uff1f&#8221;, &#8220;\u78ba\u8a8d&#8221;, MessageBoxB&hellip;","protected":false},"author":38,"featured_media":21786,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[162],"tags":[169],"class_list":{"0":"post-21777","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-windows","8":"tag-season58"},"_links":{"self":[{"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/posts\/21777","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/users\/38"}],"replies":[{"embeddable":true,"href":"https:\/\/itport.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=21777"}],"version-history":[{"count":3,"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/posts\/21777\/revisions"}],"predecessor-version":[{"id":21785,"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/posts\/21777\/revisions\/21785"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/media\/21786"}],"wp:attachment":[{"href":"https:\/\/itport.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=21777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itport.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itport.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}