ChaMame: exeリソースアイコンの差し替えをProjectのビルド設定に追加.
@@ -32,6 +32,10 @@ | ||
32 | 32 | |
33 | 33 | public void Save(string file) |
34 | 34 | { |
35 | + if (this.BunruiOutputFormat <= 0) | |
36 | + { | |
37 | + this.BunruiOutputFormat = BunruiOutputFormat.None; | |
38 | + } | |
35 | 39 | var ser = new XmlSerializer(typeof(Text2CorpusSettings)); |
36 | 40 | using (var str = new FileStream(file, FileMode.Create)) |
37 | 41 | { |
@@ -12,5 +12,5 @@ | ||
12 | 12 | [assembly: AssemblyCulture("")] |
13 | 13 | [assembly: ComVisible(false)] |
14 | 14 | [assembly: Guid("6a95808a-d1e3-47de-bb62-7ed7a281ac0b")] |
15 | -[assembly: AssemblyVersion("3.11.608.0")] | |
16 | -[assembly: AssemblyFileVersion("3.11.608.0")] | |
15 | +[assembly: AssemblyVersion("3.11.611.0")] | |
16 | +[assembly: AssemblyFileVersion("3.11.611.0")] |
@@ -182,7 +182,13 @@ | ||
182 | 182 | // Mecabフォルダ/dic/以下のサブフォルダのうち、dicrcを含むものをdictsにappendする. |
183 | 183 | public static void AddMecabDictionaries(Dictionary<string, string> dicts) |
184 | 184 | { |
185 | - var dpaths = Directory.EnumerateDirectories(Path.Combine(Path.GetDirectoryName(MecabPath), @"..\dic")); | |
185 | + var path = Path.GetDirectoryName(MecabPath); | |
186 | + if (path == null) | |
187 | + { | |
188 | + // "Mecabが見つかりません." | |
189 | + throw new Exception(Resources.S019); | |
190 | + } | |
191 | + var dpaths = Directory.EnumerateDirectories(Path.Combine(path, @"..\dic")); | |
186 | 192 | foreach (var dpath in dpaths) |
187 | 193 | { |
188 | 194 | var dname = Path.GetFileName(dpath); |
@@ -25,6 +25,14 @@ | ||
25 | 25 | { |
26 | 26 | rkey = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\unidic_win"); |
27 | 27 | } |
28 | + if (rkey == null) | |
29 | + { | |
30 | + rkey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\unidic_win"); | |
31 | + } | |
32 | + if (rkey == null) | |
33 | + { | |
34 | + rkey = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\unidic_win"); | |
35 | + } | |
28 | 36 | if (rkey != null) |
29 | 37 | { |
30 | 38 | string unidicloc = (string)rkey.GetValue("InstallLocation"); |
@@ -12,5 +12,5 @@ | ||
12 | 12 | [assembly: AssemblyCulture("")] |
13 | 13 | [assembly: ComVisible(false)] |
14 | 14 | [assembly: Guid("a8cf8403-eb88-418f-bf54-56aeaef39268")] |
15 | -[assembly: AssemblyVersion("3.11.608.0")] | |
16 | -[assembly: AssemblyFileVersion("3.11.608.0")] | |
15 | +[assembly: AssemblyVersion("3.11.611.0")] | |
16 | +[assembly: AssemblyFileVersion("3.11.611.0")] |
@@ -61,6 +61,16 @@ | ||
61 | 61 | } |
62 | 62 | |
63 | 63 | /// <summary> |
64 | + /// (アイコン) に類似した型 System.Drawing.Icon のローカライズされたリソースを検索します。 | |
65 | + /// </summary> | |
66 | + internal static System.Drawing.Icon ChaMame { | |
67 | + get { | |
68 | + object obj = ResourceManager.GetObject("ChaMame", resourceCulture); | |
69 | + return ((System.Drawing.Icon)(obj)); | |
70 | + } | |
71 | + } | |
72 | + | |
73 | + /// <summary> | |
64 | 74 | /// File... に類似しているローカライズされた文字列を検索します。 |
65 | 75 | /// </summary> |
66 | 76 | internal static string File { |
@@ -274,6 +274,7 @@ | ||
274 | 274 | this.comboBox4.SelectedItem = settings.MecabOutputFormat; |
275 | 275 | #if CHAMAME |
276 | 276 | this.Text = "ChaMame"; |
277 | + this.Icon = Resources.ChaMame; | |
277 | 278 | this.label5.Enabled = true; |
278 | 279 | this.comboBox4.Enabled = true; |
279 | 280 | this.label6.Enabled = true; |
@@ -12,5 +12,5 @@ | ||
12 | 12 | [assembly: AssemblyCulture("")] |
13 | 13 | [assembly: ComVisible(false)] |
14 | 14 | [assembly: Guid("ff6652ed-b932-466b-944b-ce88d698979b")] |
15 | -[assembly: AssemblyVersion("3.11.608.0")] | |
16 | -[assembly: AssemblyFileVersion("3.11.608.0")] | |
15 | +[assembly: AssemblyVersion("3.11.611.0")] | |
16 | +[assembly: AssemblyFileVersion("3.11.611.0")] |