From a1ddcad9dbf09f9b77960e7b076d3eea6f37c2ec Mon Sep 17 00:00:00 2001 From: yuuAn Date: Fri, 11 Apr 2014 13:11:33 +0900 Subject: [PATCH 1/1] =?utf8?q?=E3=81=A8=E3=82=8A=E3=81=82=E3=81=88?= =?utf8?q?=E3=81=9A=E3=82=B3=E3=83=9F=E3=83=83=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- ClassifyVCF.sln | 20 +++ ClassifyVCF/ClassifyVCF.csproj | 105 ++++++++++++ ClassifyVCF/ClassifyVCF_TemporaryKey.pfx | Bin 0 -> 1660 bytes ClassifyVCF/Form1.Designer.cs | 246 +++++++++++++++++++++++++++ ClassifyVCF/Form1.cs | 103 +++++++++++ ClassifyVCF/Form1.resx | 132 ++++++++++++++ ClassifyVCF/Program.cs | 19 +++ ClassifyVCF/Properties/AssemblyInfo.cs | 33 ++++ ClassifyVCF/Properties/Resources.Designer.cs | 64 +++++++ ClassifyVCF/Properties/Resources.resx | 117 +++++++++++++ ClassifyVCF/Properties/Settings.Designer.cs | 28 +++ ClassifyVCF/Properties/Settings.settings | 7 + ClassifyVCF/Properties/app.manifest | 11 ++ 13 files changed, 885 insertions(+) create mode 100644 ClassifyVCF.sln create mode 100644 ClassifyVCF/ClassifyVCF.csproj create mode 100644 ClassifyVCF/ClassifyVCF_TemporaryKey.pfx create mode 100644 ClassifyVCF/Form1.Designer.cs create mode 100644 ClassifyVCF/Form1.cs create mode 100644 ClassifyVCF/Form1.resx create mode 100644 ClassifyVCF/Program.cs create mode 100644 ClassifyVCF/Properties/AssemblyInfo.cs create mode 100644 ClassifyVCF/Properties/Resources.Designer.cs create mode 100644 ClassifyVCF/Properties/Resources.resx create mode 100644 ClassifyVCF/Properties/Settings.Designer.cs create mode 100644 ClassifyVCF/Properties/Settings.settings create mode 100644 ClassifyVCF/Properties/app.manifest diff --git a/ClassifyVCF.sln b/ClassifyVCF.sln new file mode 100644 index 0000000..79656c2 --- /dev/null +++ b/ClassifyVCF.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassifyVCF", "ClassifyVCF\ClassifyVCF.csproj", "{4DDABCA3-B063-49F2-9110-D49394FD5BFD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4DDABCA3-B063-49F2-9110-D49394FD5BFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4DDABCA3-B063-49F2-9110-D49394FD5BFD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4DDABCA3-B063-49F2-9110-D49394FD5BFD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4DDABCA3-B063-49F2-9110-D49394FD5BFD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/ClassifyVCF/ClassifyVCF.csproj b/ClassifyVCF/ClassifyVCF.csproj new file mode 100644 index 0000000..367f920 --- /dev/null +++ b/ClassifyVCF/ClassifyVCF.csproj @@ -0,0 +1,105 @@ + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {4DDABCA3-B063-49F2-9110-D49394FD5BFD} + WinExe + Properties + ClassifyVCF + ClassifyVCF + E9BAC6221BF6A74EB93A3C242115E8E22DB333D1 + ClassifyVCF_TemporaryKey.pfx + true + LocalIntranet + true + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 1.0.0.%2a + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + Form + + + Form1.cs + + + + + Designer + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + False + .NET Framework 2.0 + true + + + + + \ No newline at end of file diff --git a/ClassifyVCF/ClassifyVCF_TemporaryKey.pfx b/ClassifyVCF/ClassifyVCF_TemporaryKey.pfx new file mode 100644 index 0000000000000000000000000000000000000000..50ef27a41a88da0b75bcc00fb6076368eb521ebe GIT binary patch literal 1660 zcmY+Dc{J2(7{}jPHQ5_m8e_T4B;jX_EwW4o31Jkebh?(w$RyR&SW^lDyE(%99 zmNb&Ij8Y^wS*Nt1LW>p+N!K!0?oa35I-Tb{@B4i|&-=dT{p0yUF#Z4XkaBj8Z@q!*~-cj5kEE9t30Re`;YwSQv8_!9_?G;1&P7rL-7@E{4(d5R9&cNchG7 zW8`ra?4p!vhF-H+CPAYWy0I|&I3ugkAlZ_p<5npvu-VH9{ipYjyB3 zV+}kLwRvssG1!)q>Iu*4Peg_$Z92oKV;coeE>|G0<&Cn_tW!dwMdpQT*@w{Z->PPDIG;`B-zhz`C|M{Z=-$;~1n&+8tUq64U5jeldpLkU}<}-(2rB zhWl_EMaKPVpiQ9_EJ=Ct`DD`NiH1U_(qn?N7ljqRE$-AqMD-5RsT?OGtlIF#+uS1I zn}ibAafvZ~>#KYLL99Bb-goh1dMC3id*(t;--NgG%Jz!P=;Oens5KuSZoE2SIO(KH zN`YQqzq{g!=frZCO|+=33SM!6cgm`l^+q}`gEn}a?X}~3a&!_b$%WUYYd_&4S6Q?q zHY6)pW)u%m2B*Wm+D{i^x?7ah6>liL57-%-6U3{YreN-LG)u&+>W)qHVXk)jwlB*! zj%%%(39V+~h8@3fv(q(SxJit(V;8p)LXMk{sR@;eBxE8li>A^?P+T2qmq_EH20p58tXAo)wPm89RqA`rjEL^nZnPHKi_Dy%+oLLrez1EpE}ykk>{IQ zONV{NC8Bm;4VG&SW=Od{J?5a7=&j_R5v|e~x5Yd`)!($X^PPbcgL;2;aYTdav-H8| zr*_Myy)W}jA5h1`U;MFUsZacMDy=OK+r%xviKxY0=Vy*i9)hR0cO@oX-OyZ^RvNL# zQ_BrzZhv(65aiFg?WTT)l629jsMGNE-gheA*$uX-0+a3yO6&bxN{l^iI3^_~xkFlZ zR>?gO@%xw)G_CMhED8VsZTLKm1F z5^jjHK{OpX?Esj7fhY(G52Tj}ZN(GJ@F*+_wo^x0`IG&CFNg-=ARg=jdytF*dw~I9 zA?pI+0ya{uK{Ox4A#4{?$Aj&N-tq000r3BJj)zncAQHqQPTcnW_X>E#oc;*%L8Ab& zF@JPWKiL((VAmCgu2g#JNtzezdKgCQu;u9mN9IEYTKVHkpv=t=zm%2JI{B{Fv)r%= zOc-V~g;Mu$RPXNZ;>YurSqc{h{Bn15qhEM;jB+-yHI&T_Cs)rkCsE)5E0WKuwZZyX z2fU`ZVpW#>hOK9wd8whwQ^v$4gYJkW{p=c(a{i+ag5Jr1E4d7=GliuXH#T8==I*C! zgF^4~75Z5tq@jvkG}Ul)z@8Q7PFybyseDqAp`<$%sWRCppFP3AjGp&0sN46Tc$v21 ztvSQox%;bFvU;h2qq`nnpW8}YBFDYWyO}DRn6b~I!RB^0rSO9-J9XRK>@A|^XvS~m zZQJ6_;*8i);H4%tgwI_1nq0zjxt6OJvQkphxytC0_gVTY9`&VJkX>q`qvmu7QL0vR zk{9dyI>`C)=^Ty~pWnyVwknrlcHFgpkRUbom(O{fjxueEe9x>JRvDnWyIkq;(6LE( zw*M-6cj27dn7E;WFK+*`W1g9rx9(HaI}2@M%4v2#_GTI}pmMjXu*Kb|&2Mcju9E2R zwP~iLo~oArn-Dlsj+{ByQ6$gN4sFd3UX&O%y6#1EZWCEN?Fi+!G{REgVhtaPMSmXUl; zkwD0ZBkil5xiz&dgG-`VT#Zro`$ekbJN%n_?buYIIIe6NL*k0kf + /// 必要なデザイナ変数です。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 使用中のリソースをすべてクリーンアップします。 + /// + /// マネージ リソースが破棄される場合 true、破棄されない場合は false です。 + protected override void Dispose(bool disposing) { + if (disposing && (components != null)) { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows フォーム デザイナで生成されたコード + + /// + /// デザイナ サポートに必要なメソッドです。このメソッドの内容を + /// コード エディタで変更しないでください。 + /// + private void InitializeComponent() { + this.textBox1 = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.button1 = new System.Windows.Forms.Button(); + this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); + this.label1 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.button2 = new System.Windows.Forms.Button(); + this.folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog(); + this.label4 = new System.Windows.Forms.Label(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.button3 = new System.Windows.Forms.Button(); + this.buttonClose = new System.Windows.Forms.Button(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.linkLabel1 = new System.Windows.Forms.LinkLabel(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // textBox1 + // + this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.textBox1.Font = new System.Drawing.Font("MS UI Gothic", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); + this.textBox1.Location = new System.Drawing.Point(24, 48); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(360, 20); + this.textBox1.TabIndex = 3; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("MS UI Gothic", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128))); + this.label2.Location = new System.Drawing.Point(8, 24); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(248, 12); + this.label2.TabIndex = 1; + this.label2.Text = "1. 読み込む vCard ファイル(.vcf) を選択してください"; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button1.Location = new System.Drawing.Point(392, 48); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(56, 24); + this.button1.TabIndex = 2; + this.button1.Text = "選択..."; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // openFileDialog + // + this.openFileDialog.DefaultExt = "vcf"; + this.openFileDialog.Filter = "vCard ファイル|*.vcf"; + this.openFileDialog.RestoreDirectory = true; + this.openFileDialog.Title = "vCard ファイルの選択"; + // + // label1 + // + this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label1.Font = new System.Drawing.Font("MS UI Gothic", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); + this.label1.Location = new System.Drawing.Point(8, 16); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(456, 40); + this.label1.TabIndex = 0; + this.label1.Text = "以下の手順に従って、vCard ファイルに記述されたアドレスデータを、グループごとのファイルに分割して保存します。"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("MS UI Gothic", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128))); + this.label3.Location = new System.Drawing.Point(8, 88); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(223, 12); + this.label3.TabIndex = 4; + this.label3.Text = "2. 分割したファイルの出力先を指定してください"; + // + // textBox2 + // + this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBox2.Font = new System.Drawing.Font("MS UI Gothic", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); + this.textBox2.Location = new System.Drawing.Point(24, 112); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(360, 20); + this.textBox2.TabIndex = 6; + // + // button2 + // + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button2.Location = new System.Drawing.Point(392, 112); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(56, 24); + this.button2.TabIndex = 5; + this.button2.Text = "選択..."; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // folderBrowserDialog + // + this.folderBrowserDialog.Description = "出力先フォルダの選択"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("MS UI Gothic", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128))); + this.label4.Location = new System.Drawing.Point(8, 152); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(349, 12); + this.label4.TabIndex = 7; + this.label4.Text = "3. 「開始」ボタンを押すと、vCardファイルを解析しグループごとに出力します"; + // + // checkBox1 + // + this.checkBox1.AutoSize = true; + this.checkBox1.Checked = true; + this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBox1.Location = new System.Drawing.Point(144, 184); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(154, 16); + this.checkBox1.TabIndex = 9; + this.checkBox1.Text = "保存時に上書き確認をする"; + this.checkBox1.UseVisualStyleBackColor = true; + // + // button3 + // + this.button3.Location = new System.Drawing.Point(24, 176); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(104, 24); + this.button3.TabIndex = 8; + this.button3.Text = "開始"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // buttonClose + // + this.buttonClose.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonClose.Location = new System.Drawing.Point(360, 276); + this.buttonClose.Name = "buttonClose"; + this.buttonClose.Size = new System.Drawing.Size(104, 24); + this.buttonClose.TabIndex = 12; + this.buttonClose.Text = "閉じる"; + this.buttonClose.UseVisualStyleBackColor = true; + this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.textBox1); + this.groupBox1.Controls.Add(this.button3); + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.checkBox1); + this.groupBox1.Controls.Add(this.button1); + this.groupBox1.Controls.Add(this.label4); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Controls.Add(this.button2); + this.groupBox1.Controls.Add(this.textBox2); + this.groupBox1.Location = new System.Drawing.Point(8, 48); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(456, 216); + this.groupBox1.TabIndex = 10; + this.groupBox1.TabStop = false; + // + // linkLabel1 + // + this.linkLabel1.ActiveLinkColor = System.Drawing.Color.DeepPink; + this.linkLabel1.AutoSize = true; + this.linkLabel1.Cursor = System.Windows.Forms.Cursors.Hand; + this.linkLabel1.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.linkLabel1.Location = new System.Drawing.Point(8, 280); + this.linkLabel1.Name = "linkLabel1"; + this.linkLabel1.Size = new System.Drawing.Size(131, 14); + this.linkLabel1.TabIndex = 11; + this.linkLabel1.TabStop = true; + this.linkLabel1.Text = "©2010-2011 yuuAn"; + this.linkLabel1.UseMnemonic = false; + this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.buttonClose; + this.ClientSize = new System.Drawing.Size(472, 311); + this.Controls.Add(this.linkLabel1); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.buttonClose); + this.Controls.Add(this.label1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.MaximizeBox = false; + this.Name = "Form1"; + this.Text = "Classify vCards by Group v.1.1"; + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.OpenFileDialog openFileDialog; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.CheckBox checkBox1; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button buttonClose; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.LinkLabel linkLabel1; + } +} + diff --git a/ClassifyVCF/Form1.cs b/ClassifyVCF/Form1.cs new file mode 100644 index 0000000..3430eb1 --- /dev/null +++ b/ClassifyVCF/Form1.cs @@ -0,0 +1,103 @@ +using System; +using System.Windows.Forms; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Diagnostics; + +namespace ClassifyVCF +{ + public partial class Form1 : Form + { + public Form1() { + InitializeComponent(); + } + + private void buttonClose_Click(object sender, EventArgs e) { + this.Close(); + } + + private void button1_Click(object sender, EventArgs e) { + if (openFileDialog.ShowDialog(this) == DialogResult.OK) { + textBox1.Text = openFileDialog.FileName; + } + } + + private void button2_Click(object sender, EventArgs e) { + if (folderBrowserDialog.ShowDialog(this) == DialogResult.OK) { + textBox2.Text = folderBrowserDialog.SelectedPath; + } + } + + private void button3_Click(object sender, EventArgs e) { + if (!File.Exists(textBox1.Text)) { + MessageBox.Show(this, "Žw’肳‚ꂽ vCard ƒtƒ@ƒCƒ‹ ‚ªŒ©‚‚©‚è‚Ü‚¹‚ñB", "“ǂݍž‚݃Gƒ‰[", MessageBoxButtons.OK, MessageBoxIcon.Error); + button1.Focus(); + return; + } + + if (!Directory.Exists(textBox2.Text)) { + MessageBox.Show(this, "Žw’肳‚ꂽo—͐æƒtƒHƒ‹ƒ_‚ªŒ©‚‚©‚è‚Ü‚¹‚ñB", "“ǂݍž‚݃Gƒ‰[", MessageBoxButtons.OK, MessageBoxIcon.Error); + button2.Focus(); + return; + } + + string vcf = ""; + try { + vcf = File.ReadAllText(textBox1.Text, Encoding.GetEncoding("shift_jis")); + } catch { + MessageBox.Show(this, "ƒtƒ@ƒCƒ‹‚̓ǂݍž‚Ý‚ÉŽ¸”s‚µ‚Ü‚µ‚½Bˆ—‚ð’†’f‚µ‚Ü‚·B", "ƒGƒ‰[", MessageBoxButtons.OK, MessageBoxIcon.Error); + button3.Focus(); + return; + } + vcf = vcf.Replace("@;;;;", ";;;;"); + + Hashtable vcfs = new Hashtable(); + Regex r_vcard = new Regex(@"BEGIN:VCARD(.*?)END:VCARD\r?\n", RegexOptions.IgnoreCase | RegexOptions.Singleline | RegexOptions.Multiline); + Match m_vcard = r_vcard.Match(vcf); + + while (m_vcard.Success) { + string vcard = m_vcard.Value; + + Regex r_group = new Regex(@"X-GN(?:;CHARSET=SHIFT_JIS)?:(.+?)\r?\n", RegexOptions.IgnoreCase); + Match m_group = r_group.Match(vcard); + if (m_group.Success) { + vcfs[m_group.Groups[1].Value] += vcard; + } + else { + vcfs["undef"] += vcard; + } + + m_vcard = m_vcard.NextMatch(); + } + + int i = 1; + foreach (string key in vcfs.Keys) { + string file = textBox2.Text + '\\' + "vcard_" + i.ToString("00") + ".vcf"; + if (checkBox1.Checked && File.Exists(file)) { + DialogResult result = MessageBox.Show(this, "Šù‚É‘¶Ý‚·‚鉺‹L‚̃tƒ@ƒCƒ‹‚ðã‘‚«‚µ‚Ä‚à‚æ‚낵‚¢‚Å‚·‚©H\r\n" + file, "ã‘‚«Šm”F" + , MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2); + if (result == DialogResult.No) { + continue; + } + } + try { + File.WriteAllText(file, (string)vcfs[key], Encoding.GetEncoding("shift_jis")); + } catch { + MessageBox.Show(this, "ƒtƒ@ƒCƒ‹‚̏‘‚«ž‚Ý‚ÉŽ¸”s‚µ‚Ü‚µ‚½Bˆ—‚ð’†’f‚µ‚Ü‚·B", "ƒGƒ‰[", MessageBoxButtons.OK, MessageBoxIcon.Error); + button3.Focus(); + return; + } + i++; + } + + MessageBox.Show(this, "ˆ—‚ªŠ®—¹‚µ‚Ü‚µ‚½B", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); + } + + private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { + Process.Start("http://www.yuuan.net/blog/"); + } + + } +} \ No newline at end of file diff --git a/ClassifyVCF/Form1.resx b/ClassifyVCF/Form1.resx new file mode 100644 index 0000000..99b6bca --- /dev/null +++ b/ClassifyVCF/Form1.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + 17, 17 + + + True + + + 156, 17 + + \ No newline at end of file diff --git a/ClassifyVCF/Program.cs b/ClassifyVCF/Program.cs new file mode 100644 index 0000000..55d427c --- /dev/null +++ b/ClassifyVCF/Program.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; + +namespace ClassifyVCF +{ + static class Program + { + /// + /// アプリケーションのメイン エントリ ポイントです。 + /// + [STAThread] + static void Main() { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} \ No newline at end of file diff --git a/ClassifyVCF/Properties/AssemblyInfo.cs b/ClassifyVCF/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1e32283 --- /dev/null +++ b/ClassifyVCF/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 +// アセンブリに関連付けられている情報を変更するには、 +// これらの属性値を変更してください。 +[assembly: AssemblyTitle("ClassifyVCF")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ClassifyVCF")] +[assembly: AssemblyCopyright("Copyright (C) 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// ComVisible を false に設定すると、このアセンブリ内の型は COM コンポーネントには +// 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、 +// その型の ComVisible 属性を true に設定してください。 +[assembly: ComVisible(false)] + +// 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です +[assembly: Guid("dcaa3c11-9833-4941-a7f9-7efa47c282ea")] + +// アセンブリのバージョン情報は、以下の 4 つの値で構成されています: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ClassifyVCF/Properties/Resources.Designer.cs b/ClassifyVCF/Properties/Resources.Designer.cs new file mode 100644 index 0000000..d325147 --- /dev/null +++ b/ClassifyVCF/Properties/Resources.Designer.cs @@ -0,0 +1,64 @@ +//------------------------------------------------------------------------------ +// +// このコードはツールによって生成されました。 +// ランタイム バージョン:2.0.50727.3615 +// +// このファイルへの変更は、以下の状況下で不正な動作の原因になったり、 +// コードが再生成されるときに損失したりします。 +// +//------------------------------------------------------------------------------ + +namespace ClassifyVCF.Properties +{ + + + /// + /// ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。 + /// + // このクラスは StronglyTypedResourceBuilder クラスが ResGen + // または Visual Studio のようなツールを使用して自動生成されました。 + // メンバを追加または削除するには、.ResX ファイルを編集して、/str オプションと共に + // ResGen を実行し直すか、または VS プロジェクトをビルドし直します。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// このクラスに使用される、キャッシュされた ResourceManager のインスタンスを返します。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if ((resourceMan == null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ClassifyVCF.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 厳密に型指定されたこのリソース クラスを使用して、すべての検索リソースに対し、 + /// 現在のスレッドの CurrentUICulture プロパティをオーバーライドします。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/ClassifyVCF/Properties/Resources.resx b/ClassifyVCF/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/ClassifyVCF/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ClassifyVCF/Properties/Settings.Designer.cs b/ClassifyVCF/Properties/Settings.Designer.cs new file mode 100644 index 0000000..cc2547b --- /dev/null +++ b/ClassifyVCF/Properties/Settings.Designer.cs @@ -0,0 +1,28 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.3615 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ClassifyVCF.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/ClassifyVCF/Properties/Settings.settings b/ClassifyVCF/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/ClassifyVCF/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ClassifyVCF/Properties/app.manifest b/ClassifyVCF/Properties/app.manifest new file mode 100644 index 0000000..a78d4c9 --- /dev/null +++ b/ClassifyVCF/Properties/app.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file -- 2.11.0