{"id":2261,"date":"2018-04-13T06:58:22","date_gmt":"2018-04-12T21:58:22","guid":{"rendered":"http:\/\/okamurax.com\/?p=2261"},"modified":"2018-04-13T06:59:17","modified_gmt":"2018-04-12T21:59:17","slug":"c-cd%e7%ad%89%e4%b8%80%e6%8b%ac%e3%83%aa%e3%83%8d%e3%83%bc%e3%83%a0","status":"publish","type":"post","link":"https:\/\/appbay.org\/?p=2261","title":{"rendered":"C# CD\u7b49\u4e00\u89a7\u306e\u4e00\u62ec\u30ea\u30cd\u30fc\u30e0"},"content":{"rendered":"<p>\u5927\u91cf\u306e\u30ea\u30cd\u30fc\u30e0\u304c\u3042\u3063\u305f\u306e\u3067amazon\u7b49\u304b\u3089\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u6301\u3063\u3066\u304d\u3066\u5229\u7528\u3057\u305f\u3002<\/p>\n<pre class=\"lang:c# decode:true\">using System;\r\nusing System.Windows.Forms;\r\n\r\nnamespace cd_ren\r\n{\r\n    public partial class Form1 : Form\r\n    {\r\n        public Form1()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        private void listBox1_DragEnter(object sender, DragEventArgs e)\r\n        {\r\n            if (e.Data.GetDataPresent(DataFormats.FileDrop))\r\n            {\r\n                e.Effect = DragDropEffects.Copy;\r\n            }\r\n            else\r\n            {\r\n                e.Effect = DragDropEffects.None;\r\n            }\r\n        }\r\n\r\n        private void button3_Click(object sender, EventArgs e)\r\n        {\r\n            int i = listBox1.SelectedIndex;\r\n            if (i &lt;= 0) return;\r\n            var o = listBox1.SelectedItem;\r\n            listBox1.Items.RemoveAt(i);\r\n            listBox1.Items.Insert(i - 1, o);\r\n            listBox1.SelectedIndex = i - 1;\r\n        }\r\n\r\n        private void button1_Click(object sender, EventArgs e)\r\n        {\r\n            int i = listBox1.SelectedIndex;\r\n            if (listBox1.Items.Count - 1 == i) return;\r\n            var o = listBox1.SelectedItem;\r\n            listBox1.Items.RemoveAt(i);\r\n            listBox1.Items.Insert(i + 1, o);\r\n            listBox1.SelectedIndex = i + 1;\r\n        }\r\n\r\n        private void listBox1_DragDrop(object sender, DragEventArgs e)\r\n        {\r\n            string[] file_names = (string[])e.Data.GetData(DataFormats.FileDrop, false);\r\n            listBox1.Items.AddRange(file_names);\r\n        }\r\n\r\n        private void button2_Click(object sender, EventArgs e)\r\n        {\r\n            for(int r = 0; r &lt; listBox1.Items.Count; r++ )\r\n            {\r\n                if (textBox1.Lines.Length - 1 &lt; r || textBox1.Lines[r] == \"\") return;\r\n\r\n                var original_full_path = listBox1.Items[r].ToString();\r\n                var new_full_path = System.IO.Path.GetDirectoryName(listBox1.Items[r].ToString()) + @\"\\\" + textBox1.Lines[r].ToString() + \".mp3\";\r\n                System.IO.File.Copy(original_full_path, new_full_path);\r\n            }\r\n        }\r\n\r\n    }\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5927\u91cf\u306e\u30ea\u30cd\u30fc\u30e0\u304c\u3042\u3063\u305f\u306e\u3067amazon\u7b49\u304b\u3089\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u6301\u3063\u3066\u304d\u3066\u5229\u7528\u3057\u305f\u3002 using System; using System.Windows.Forms; namespace cd_ren { public p &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/appbay.org\/?p=2261\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;C# CD\u7b49\u4e00\u89a7\u306e\u4e00\u62ec\u30ea\u30cd\u30fc\u30e0&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[9],"class_list":["post-2261","post","type-post","status-publish","format-standard","hentry","category-1","tag-c-net"],"_links":{"self":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/2261","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2261"}],"version-history":[{"count":2,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/2261\/revisions"}],"predecessor-version":[{"id":2263,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/2261\/revisions\/2263"}],"wp:attachment":[{"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}