フォルダ以外のFileviewアイコン表示可能に
@@ -51,6 +51,13 @@ | ||
51 | 51 | system.Option.FileView.IsHideSystemFile = this.IsHideSystemFileCheckbox.Checked; |
52 | 52 | system.Option.FileView.IsDisplayDriveToolbar = !this.IsHideDriveToolbarCheckbox.Checked; |
53 | 53 | system.Option.FileView.IsDisplayHistoryView = !this.IsHideHistoryViewCheckbox.Checked; |
54 | + if (FileIconAllDisplayRadioBUtton.Checked) { | |
55 | + system.Option.FileView.IconDisplay = SCFiler2System.OptionClass.FileViewOption.FileIconDisp.All; | |
56 | + } else if (FileIconOnlyExeDisplayRadioButton.Checked) { | |
57 | + system.Option.FileView.IconDisplay = SCFiler2System.OptionClass.FileViewOption.FileIconDisp.ExeOnly; | |
58 | + } else { | |
59 | + system.Option.FileView.IconDisplay = SCFiler2System.OptionClass.FileViewOption.FileIconDisp.Nothing; | |
60 | + } | |
54 | 61 | |
55 | 62 | //■色タブ |
56 | 63 | system.Option.Color.ActiveViewTitleText = colorActiveViewTitle.ForegroundColor; |
@@ -159,6 +166,17 @@ | ||
159 | 166 | this.IsHideSystemFileCheckbox.Checked = system.Option.FileView.IsHideSystemFile; |
160 | 167 | this.IsHideDriveToolbarCheckbox.Checked = !system.Option.FileView.IsDisplayDriveToolbar; |
161 | 168 | this.IsHideHistoryViewCheckbox.Checked = !system.Option.FileView.IsDisplayHistoryView; |
169 | + switch (system.Option.FileView.IconDisplay) { | |
170 | + case SCFiler2System.OptionClass.FileViewOption.FileIconDisp.Nothing: | |
171 | + this.FileIconNotDisplayRadioButton.Checked = true; | |
172 | + break; | |
173 | + case SCFiler2System.OptionClass.FileViewOption.FileIconDisp.ExeOnly: | |
174 | + this.FileIconOnlyExeDisplayRadioButton.Checked = true; | |
175 | + break; | |
176 | + case SCFiler2System.OptionClass.FileViewOption.FileIconDisp.All: | |
177 | + this.FileIconAllDisplayRadioBUtton.Checked = true; | |
178 | + break; | |
179 | + } | |
162 | 180 | |
163 | 181 | //■履歴タブ |
164 | 182 | historyview1ValidExtensionsString.Text = MainForm.Instance.FileHistoryManager1.GetValidExtension(); |
@@ -25,14 +25,6 @@ | ||
25 | 25 | get { return ViewType.FileView; } |
26 | 26 | } |
27 | 27 | |
28 | - public enum IconListIndex : int { | |
29 | - Folder = 0, | |
30 | - Hdd = 1, | |
31 | - CDROM = 2, | |
32 | - Removable = 3, | |
33 | - NetworkDrive = 4, | |
34 | - } | |
35 | - | |
36 | 28 | /// <summary> |
37 | 29 | /// 現在表示中のパス |
38 | 30 | /// </summary> |
@@ -104,6 +96,7 @@ | ||
104 | 96 | /// <param name="viewName">ビューにつける名前。設定ファイルの保存等に使われる。複数インスタンスの識別のため</param> |
105 | 97 | public void Initialize(string view_name) { |
106 | 98 | this.viewName = view_name; |
99 | + | |
107 | 100 | virtualListView = new VirtualListView(this.listView); |
108 | 101 | currentListViewController = new NormalListViewController(this, virtualListView); |
109 | 102 |
@@ -135,13 +128,6 @@ | ||
135 | 128 | |
136 | 129 | ChangePath(this.currentPath);//LoadViewData()で取ってきたcurrentPathを設定する |
137 | 130 | |
138 | - listView.SmallImageList = new ImageList(); | |
139 | - listView.SmallImageList.Images.Add(Icons.Folder); | |
140 | - listView.SmallImageList.Images.Add(Icons.Hdd); | |
141 | - listView.SmallImageList.Images.Add(Icons.CDROM); | |
142 | - listView.SmallImageList.Images.Add(Icons.RemovableDrive); | |
143 | - listView.SmallImageList.Images.Add(Icons.NetworkDrive); | |
144 | - | |
145 | 131 | this.listView.Dock = DockStyle.Fill; |
146 | 132 | this.listView.Visible = true; |
147 | 133 | this.previewPictureBox.Visible = false; |
@@ -35,7 +35,7 @@ | ||
35 | 35 | this.appName.Name = "appName"; |
36 | 36 | this.appName.Size = new System.Drawing.Size(147, 12); |
37 | 37 | this.appName.TabIndex = 0; |
38 | - this.appName.Text = "SCFiler2 Alpha version 0.37"; | |
38 | + this.appName.Text = "SCFiler2 Alpha version 0.38"; | |
39 | 39 | this.appName.Click += new System.EventHandler(this.appName_Click); |
40 | 40 | // |
41 | 41 | // okButton |
@@ -11,6 +11,14 @@ | ||
11 | 11 | /// VirtualModeでListViewを扱うための、ListView相当のもの |
12 | 12 | /// </summary> |
13 | 13 | public class VirtualListView { |
14 | + public enum IconListIndex : int { | |
15 | + Folder = 0, | |
16 | + Hdd = 1, | |
17 | + CDROM = 2, | |
18 | + Removable = 3, | |
19 | + NetworkDrive = 4, | |
20 | + } | |
21 | + | |
14 | 22 | private ListView targetView; |
15 | 23 | /// <summary> |
16 | 24 | /// このビューが管理するVIrtualListViewItemのリスト |
@@ -33,6 +41,8 @@ | ||
33 | 41 | this.selectedItemCollection = new SelectedVirtualListViewItemCollection(this); |
34 | 42 | this.selectedIndexCollection = new SelectedIndexCollection(this); |
35 | 43 | this.sorter = new VirtualListViewComparer(0); |
44 | + this.targetView.SmallImageList = new ImageList(); | |
45 | + this.InitializeSmallImageList(); | |
36 | 46 | } |
37 | 47 | |
38 | 48 | private VirtualListViewItem selectionStartItem; |
@@ -53,6 +63,7 @@ | ||
53 | 63 | /// </summary> |
54 | 64 | public void Clear() { |
55 | 65 | this.itemCollection.Clear(); |
66 | + this.InitializeSmallImageList(); | |
56 | 67 | this.targetView.VirtualListSize = 0; |
57 | 68 | this.selectionStartItem = null; |
58 | 69 | } |
@@ -182,8 +193,46 @@ | ||
182 | 193 | this.itemList.Sort(this.sorter); |
183 | 194 | } |
184 | 195 | |
196 | + #region Imageindex関係 | |
197 | + private Dictionary<string, int> imageKeyToIndex = new Dictionary<string, int>(); | |
185 | 198 | |
199 | + internal void InitializeSmallImageList() { | |
200 | + this.targetView.SmallImageList.Images.Clear(); | |
201 | + this.targetView.SmallImageList.Images.Add(Icons.Folder); | |
202 | + this.targetView.SmallImageList.Images.Add(Icons.Hdd); | |
203 | + this.targetView.SmallImageList.Images.Add(Icons.CDROM); | |
204 | + this.targetView.SmallImageList.Images.Add(Icons.RemovableDrive); | |
205 | + this.targetView.SmallImageList.Images.Add(Icons.NetworkDrive); | |
206 | + this.imageKeyToIndex.Clear(); | |
207 | + } | |
208 | + | |
209 | + | |
210 | + internal void RegistImage(string key, System.Drawing.Icon icon) { | |
211 | + string keyUpper = key.ToUpper(); | |
212 | + if (!this.targetView.SmallImageList.Images.ContainsKey(keyUpper)) { | |
213 | + this.targetView.SmallImageList.Images.Add(keyUpper, icon); | |
214 | + this.imageKeyToIndex[keyUpper] = this.targetView.SmallImageList.Images.Count - 1; | |
215 | + } | |
216 | + } | |
217 | + | |
218 | + internal bool IsContainsImage(string key) { | |
219 | + return this.imageKeyToIndex.ContainsKey(key.ToUpper()); | |
220 | + } | |
221 | + | |
222 | + internal int GetImageIndex(string key) { | |
223 | + return this.imageKeyToIndex[key.ToUpper()]; | |
224 | + } | |
225 | + | |
186 | 226 | /// <summary> |
227 | + /// フォルダのImageIndexを取得する(ListViewItemのImageIndex) | |
228 | + /// </summary> | |
229 | + /// <returns></returns> | |
230 | + internal int GetFolderImageIndex() { | |
231 | + return (int)IconListIndex.Folder; | |
232 | + } | |
233 | + #endregion | |
234 | + | |
235 | + /// <summary> | |
187 | 236 | /// このVirtualListViewが管理しているアイテムのコレクション |
188 | 237 | /// </summary> |
189 | 238 | public class VirtualListViewItemCollection : IEnumerable { |
@@ -379,6 +428,7 @@ | ||
379 | 428 | } |
380 | 429 | |
381 | 430 | #endregion |
431 | + | |
382 | 432 | } |
383 | 433 | } |
384 | 434 | } |
@@ -6,11 +6,11 @@ | ||
6 | 6 | using System.Windows.Forms; |
7 | 7 | |
8 | 8 | namespace SCFiler2 { |
9 | - public class SCFiler2System { | |
9 | + internal class SCFiler2System { | |
10 | 10 | //シングルトン |
11 | 11 | static private SCFiler2System instance = new SCFiler2System(); |
12 | 12 | |
13 | - static public SCFiler2System Instance { | |
13 | + static internal SCFiler2System Instance { | |
14 | 14 | get { return instance;} |
15 | 15 | } |
16 | 16 | private SCFiler2System() { |
@@ -17,7 +17,7 @@ | ||
17 | 17 | Option.Load(); |
18 | 18 | } |
19 | 19 | |
20 | - public class OptionClass { | |
20 | + internal class OptionClass { | |
21 | 21 | public class KeyCommandOption { |
22 | 22 | public bool ChangeDriveByNumKey = false; |
23 | 23 | public void Save() { |
@@ -55,11 +55,17 @@ | ||
55 | 55 | public ColorOption Color = new ColorOption(); |
56 | 56 | |
57 | 57 | public class FileViewOption { |
58 | + public enum FileIconDisp { | |
59 | + Nothing, | |
60 | + ExeOnly, | |
61 | + All | |
62 | + } | |
58 | 63 | public List<string> excludeExtensions = new List<string>(); |
59 | 64 | public bool IsHideHiddenFile = false; |
60 | 65 | public bool IsHideSystemFile = true; |
61 | 66 | public bool IsDisplayDriveToolbar = true; |
62 | 67 | public bool IsDisplayHistoryView = true; |
68 | + public FileIconDisp IconDisplay = FileIconDisp.Nothing; | |
63 | 69 | |
64 | 70 | public void Save() { |
65 | 71 | OptionUtil.Save("FileViewOption", this); |
@@ -58,9 +58,6 @@ | ||
58 | 58 | this.historyview2ValidExtensionsString = new System.Windows.Forms.TextBox(); |
59 | 59 | this.historyview1ValidExtensionsString = new System.Windows.Forms.TextBox(); |
60 | 60 | this.tabPage5 = new System.Windows.Forms.TabPage(); |
61 | - this.colorInactiveViewTitle = new SCFiler2.ColorAssignControl(); | |
62 | - this.colorActiveViewTitle = new SCFiler2.ColorAssignControl(); | |
63 | - this.colorFocusedWithoutSelectedListViewItem = new SCFiler2.ColorAssignControl(); | |
64 | 61 | this.tabPage6 = new System.Windows.Forms.TabPage(); |
65 | 62 | this.label12 = new System.Windows.Forms.Label(); |
66 | 63 | this.label11 = new System.Windows.Forms.Label(); |
@@ -68,11 +65,6 @@ | ||
68 | 65 | this.label9 = new System.Windows.Forms.Label(); |
69 | 66 | this.label8 = new System.Windows.Forms.Label(); |
70 | 67 | this.label7 = new System.Windows.Forms.Label(); |
71 | - this.externalToolAssignControl5 = new SCFiler2.ExternalToolAssignControl(); | |
72 | - this.externalToolAssignControl4 = new SCFiler2.ExternalToolAssignControl(); | |
73 | - this.externalToolAssignControl3 = new SCFiler2.ExternalToolAssignControl(); | |
74 | - this.externalToolAssignControl2 = new SCFiler2.ExternalToolAssignControl(); | |
75 | - this.externalToolAssignControl1 = new SCFiler2.ExternalToolAssignControl(); | |
76 | 68 | this.tabPage8 = new System.Windows.Forms.TabPage(); |
77 | 69 | this.IsUseExeIconCheckBox = new System.Windows.Forms.CheckBox(); |
78 | 70 | this.groupBox1 = new System.Windows.Forms.GroupBox(); |
@@ -108,6 +100,18 @@ | ||
108 | 100 | this.cancel_button = new System.Windows.Forms.Button(); |
109 | 101 | this.ok_button = new System.Windows.Forms.Button(); |
110 | 102 | this.colorDialog = new System.Windows.Forms.ColorDialog(); |
103 | + this.colorInactiveViewTitle = new SCFiler2.ColorAssignControl(); | |
104 | + this.colorActiveViewTitle = new SCFiler2.ColorAssignControl(); | |
105 | + this.colorFocusedWithoutSelectedListViewItem = new SCFiler2.ColorAssignControl(); | |
106 | + this.externalToolAssignControl5 = new SCFiler2.ExternalToolAssignControl(); | |
107 | + this.externalToolAssignControl4 = new SCFiler2.ExternalToolAssignControl(); | |
108 | + this.externalToolAssignControl3 = new SCFiler2.ExternalToolAssignControl(); | |
109 | + this.externalToolAssignControl2 = new SCFiler2.ExternalToolAssignControl(); | |
110 | + this.externalToolAssignControl1 = new SCFiler2.ExternalToolAssignControl(); | |
111 | + this.groupBox2 = new System.Windows.Forms.GroupBox(); | |
112 | + this.FileIconNotDisplayRadioButton = new System.Windows.Forms.RadioButton(); | |
113 | + this.FileIconOnlyExeDisplayRadioButton = new System.Windows.Forms.RadioButton(); | |
114 | + this.FileIconAllDisplayRadioBUtton = new System.Windows.Forms.RadioButton(); | |
111 | 115 | this.tabControl1.SuspendLayout(); |
112 | 116 | this.tabPage1.SuspendLayout(); |
113 | 117 | this.tabPage2.SuspendLayout(); |
@@ -120,6 +124,7 @@ | ||
120 | 124 | this.groupBox1.SuspendLayout(); |
121 | 125 | this.tabPage9.SuspendLayout(); |
122 | 126 | this.tabPage10.SuspendLayout(); |
127 | + this.groupBox2.SuspendLayout(); | |
123 | 128 | this.SuspendLayout(); |
124 | 129 | // |
125 | 130 | // tabControl1 |
@@ -330,6 +335,7 @@ | ||
330 | 335 | // |
331 | 336 | // tabPage7 |
332 | 337 | // |
338 | + this.tabPage7.Controls.Add(this.groupBox2); | |
333 | 339 | this.tabPage7.Controls.Add(this.IsHideHistoryViewCheckbox); |
334 | 340 | this.tabPage7.Controls.Add(this.IsHideDriveToolbarCheckbox); |
335 | 341 | this.tabPage7.Controls.Add(this.label6); |
@@ -498,27 +504,6 @@ | ||
498 | 504 | this.tabPage5.Text = "色"; |
499 | 505 | this.tabPage5.UseVisualStyleBackColor = true; |
500 | 506 | // |
501 | - // colorInactiveViewTitle | |
502 | - // | |
503 | - this.colorInactiveViewTitle.Location = new System.Drawing.Point(8, 37); | |
504 | - this.colorInactiveViewTitle.Name = "colorInactiveViewTitle"; | |
505 | - this.colorInactiveViewTitle.Size = new System.Drawing.Size(293, 27); | |
506 | - this.colorInactiveViewTitle.TabIndex = 8; | |
507 | - // | |
508 | - // colorActiveViewTitle | |
509 | - // | |
510 | - this.colorActiveViewTitle.Location = new System.Drawing.Point(8, 6); | |
511 | - this.colorActiveViewTitle.Name = "colorActiveViewTitle"; | |
512 | - this.colorActiveViewTitle.Size = new System.Drawing.Size(293, 27); | |
513 | - this.colorActiveViewTitle.TabIndex = 7; | |
514 | - // | |
515 | - // colorFocusedWithoutSelectedListViewItem | |
516 | - // | |
517 | - this.colorFocusedWithoutSelectedListViewItem.Location = new System.Drawing.Point(8, 68); | |
518 | - this.colorFocusedWithoutSelectedListViewItem.Name = "colorFocusedWithoutSelectedListViewItem"; | |
519 | - this.colorFocusedWithoutSelectedListViewItem.Size = new System.Drawing.Size(293, 27); | |
520 | - this.colorFocusedWithoutSelectedListViewItem.TabIndex = 6; | |
521 | - // | |
522 | 507 | // tabPage6 |
523 | 508 | // |
524 | 509 | this.tabPage6.Controls.Add(this.label12); |
@@ -594,41 +579,6 @@ | ||
594 | 579 | this.label7.TabIndex = 1; |
595 | 580 | this.label7.Text = "タイトル"; |
596 | 581 | // |
597 | - // externalToolAssignControl5 | |
598 | - // | |
599 | - this.externalToolAssignControl5.Location = new System.Drawing.Point(8, 141); | |
600 | - this.externalToolAssignControl5.Name = "externalToolAssignControl5"; | |
601 | - this.externalToolAssignControl5.Size = new System.Drawing.Size(548, 29); | |
602 | - this.externalToolAssignControl5.TabIndex = 7; | |
603 | - // | |
604 | - // externalToolAssignControl4 | |
605 | - // | |
606 | - this.externalToolAssignControl4.Location = new System.Drawing.Point(8, 112); | |
607 | - this.externalToolAssignControl4.Name = "externalToolAssignControl4"; | |
608 | - this.externalToolAssignControl4.Size = new System.Drawing.Size(548, 29); | |
609 | - this.externalToolAssignControl4.TabIndex = 6; | |
610 | - // | |
611 | - // externalToolAssignControl3 | |
612 | - // | |
613 | - this.externalToolAssignControl3.Location = new System.Drawing.Point(8, 83); | |
614 | - this.externalToolAssignControl3.Name = "externalToolAssignControl3"; | |
615 | - this.externalToolAssignControl3.Size = new System.Drawing.Size(548, 29); | |
616 | - this.externalToolAssignControl3.TabIndex = 5; | |
617 | - // | |
618 | - // externalToolAssignControl2 | |
619 | - // | |
620 | - this.externalToolAssignControl2.Location = new System.Drawing.Point(8, 54); | |
621 | - this.externalToolAssignControl2.Name = "externalToolAssignControl2"; | |
622 | - this.externalToolAssignControl2.Size = new System.Drawing.Size(548, 29); | |
623 | - this.externalToolAssignControl2.TabIndex = 4; | |
624 | - // | |
625 | - // externalToolAssignControl1 | |
626 | - // | |
627 | - this.externalToolAssignControl1.Location = new System.Drawing.Point(8, 25); | |
628 | - this.externalToolAssignControl1.Name = "externalToolAssignControl1"; | |
629 | - this.externalToolAssignControl1.Size = new System.Drawing.Size(548, 29); | |
630 | - this.externalToolAssignControl1.TabIndex = 0; | |
631 | - // | |
632 | 582 | // tabPage8 |
633 | 583 | // |
634 | 584 | this.tabPage8.Controls.Add(this.IsUseExeIconCheckBox); |
@@ -985,6 +935,107 @@ | ||
985 | 935 | this.colorDialog.AnyColor = true; |
986 | 936 | this.colorDialog.FullOpen = true; |
987 | 937 | // |
938 | + // colorInactiveViewTitle | |
939 | + // | |
940 | + this.colorInactiveViewTitle.Location = new System.Drawing.Point(8, 37); | |
941 | + this.colorInactiveViewTitle.Name = "colorInactiveViewTitle"; | |
942 | + this.colorInactiveViewTitle.Size = new System.Drawing.Size(293, 27); | |
943 | + this.colorInactiveViewTitle.TabIndex = 8; | |
944 | + // | |
945 | + // colorActiveViewTitle | |
946 | + // | |
947 | + this.colorActiveViewTitle.Location = new System.Drawing.Point(8, 6); | |
948 | + this.colorActiveViewTitle.Name = "colorActiveViewTitle"; | |
949 | + this.colorActiveViewTitle.Size = new System.Drawing.Size(293, 27); | |
950 | + this.colorActiveViewTitle.TabIndex = 7; | |
951 | + // | |
952 | + // colorFocusedWithoutSelectedListViewItem | |
953 | + // | |
954 | + this.colorFocusedWithoutSelectedListViewItem.Location = new System.Drawing.Point(8, 68); | |
955 | + this.colorFocusedWithoutSelectedListViewItem.Name = "colorFocusedWithoutSelectedListViewItem"; | |
956 | + this.colorFocusedWithoutSelectedListViewItem.Size = new System.Drawing.Size(293, 27); | |
957 | + this.colorFocusedWithoutSelectedListViewItem.TabIndex = 6; | |
958 | + // | |
959 | + // externalToolAssignControl5 | |
960 | + // | |
961 | + this.externalToolAssignControl5.Location = new System.Drawing.Point(8, 141); | |
962 | + this.externalToolAssignControl5.Name = "externalToolAssignControl5"; | |
963 | + this.externalToolAssignControl5.Size = new System.Drawing.Size(548, 29); | |
964 | + this.externalToolAssignControl5.TabIndex = 7; | |
965 | + // | |
966 | + // externalToolAssignControl4 | |
967 | + // | |
968 | + this.externalToolAssignControl4.Location = new System.Drawing.Point(8, 112); | |
969 | + this.externalToolAssignControl4.Name = "externalToolAssignControl4"; | |
970 | + this.externalToolAssignControl4.Size = new System.Drawing.Size(548, 29); | |
971 | + this.externalToolAssignControl4.TabIndex = 6; | |
972 | + // | |
973 | + // externalToolAssignControl3 | |
974 | + // | |
975 | + this.externalToolAssignControl3.Location = new System.Drawing.Point(8, 83); | |
976 | + this.externalToolAssignControl3.Name = "externalToolAssignControl3"; | |
977 | + this.externalToolAssignControl3.Size = new System.Drawing.Size(548, 29); | |
978 | + this.externalToolAssignControl3.TabIndex = 5; | |
979 | + // | |
980 | + // externalToolAssignControl2 | |
981 | + // | |
982 | + this.externalToolAssignControl2.Location = new System.Drawing.Point(8, 54); | |
983 | + this.externalToolAssignControl2.Name = "externalToolAssignControl2"; | |
984 | + this.externalToolAssignControl2.Size = new System.Drawing.Size(548, 29); | |
985 | + this.externalToolAssignControl2.TabIndex = 4; | |
986 | + // | |
987 | + // externalToolAssignControl1 | |
988 | + // | |
989 | + this.externalToolAssignControl1.Location = new System.Drawing.Point(8, 25); | |
990 | + this.externalToolAssignControl1.Name = "externalToolAssignControl1"; | |
991 | + this.externalToolAssignControl1.Size = new System.Drawing.Size(548, 29); | |
992 | + this.externalToolAssignControl1.TabIndex = 0; | |
993 | + // | |
994 | + // groupBox2 | |
995 | + // | |
996 | + this.groupBox2.Controls.Add(this.FileIconAllDisplayRadioBUtton); | |
997 | + this.groupBox2.Controls.Add(this.FileIconOnlyExeDisplayRadioButton); | |
998 | + this.groupBox2.Controls.Add(this.FileIconNotDisplayRadioButton); | |
999 | + this.groupBox2.Location = new System.Drawing.Point(422, 58); | |
1000 | + this.groupBox2.Name = "groupBox2"; | |
1001 | + this.groupBox2.Size = new System.Drawing.Size(134, 92); | |
1002 | + this.groupBox2.TabIndex = 8; | |
1003 | + this.groupBox2.TabStop = false; | |
1004 | + this.groupBox2.Text = "ファイルのアイコン"; | |
1005 | + // | |
1006 | + // FileIconNotDisplayRadioButton | |
1007 | + // | |
1008 | + this.FileIconNotDisplayRadioButton.AutoSize = true; | |
1009 | + this.FileIconNotDisplayRadioButton.Location = new System.Drawing.Point(7, 19); | |
1010 | + this.FileIconNotDisplayRadioButton.Name = "FileIconNotDisplayRadioButton"; | |
1011 | + this.FileIconNotDisplayRadioButton.Size = new System.Drawing.Size(76, 16); | |
1012 | + this.FileIconNotDisplayRadioButton.TabIndex = 0; | |
1013 | + this.FileIconNotDisplayRadioButton.TabStop = true; | |
1014 | + this.FileIconNotDisplayRadioButton.Text = "表示しない"; | |
1015 | + this.FileIconNotDisplayRadioButton.UseVisualStyleBackColor = true; | |
1016 | + // | |
1017 | + // OnlyExeIconDisplayRadioButton | |
1018 | + // | |
1019 | + this.FileIconOnlyExeDisplayRadioButton.AutoSize = true; | |
1020 | + this.FileIconOnlyExeDisplayRadioButton.Location = new System.Drawing.Point(7, 41); | |
1021 | + this.FileIconOnlyExeDisplayRadioButton.Name = "OnlyExeIconDisplayRadioButton"; | |
1022 | + this.FileIconOnlyExeDisplayRadioButton.Size = new System.Drawing.Size(120, 16); | |
1023 | + this.FileIconOnlyExeDisplayRadioButton.TabIndex = 1; | |
1024 | + this.FileIconOnlyExeDisplayRadioButton.TabStop = true; | |
1025 | + this.FileIconOnlyExeDisplayRadioButton.Text = "exeファイルのみ表示"; | |
1026 | + this.FileIconOnlyExeDisplayRadioButton.UseVisualStyleBackColor = true; | |
1027 | + // | |
1028 | + // FileIconAllDisplayRadioBUtton | |
1029 | + // | |
1030 | + this.FileIconAllDisplayRadioBUtton.AutoSize = true; | |
1031 | + this.FileIconAllDisplayRadioBUtton.Location = new System.Drawing.Point(7, 63); | |
1032 | + this.FileIconAllDisplayRadioBUtton.Name = "FileIconAllDisplayRadioBUtton"; | |
1033 | + this.FileIconAllDisplayRadioBUtton.Size = new System.Drawing.Size(68, 16); | |
1034 | + this.FileIconAllDisplayRadioBUtton.TabIndex = 2; | |
1035 | + this.FileIconAllDisplayRadioBUtton.TabStop = true; | |
1036 | + this.FileIconAllDisplayRadioBUtton.Text = "全て表示"; | |
1037 | + this.FileIconAllDisplayRadioBUtton.UseVisualStyleBackColor = true; | |
1038 | + // | |
988 | 1039 | // OptionDialog |
989 | 1040 | // |
990 | 1041 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); |
@@ -1018,6 +1069,8 @@ | ||
1018 | 1069 | this.tabPage9.PerformLayout(); |
1019 | 1070 | this.tabPage10.ResumeLayout(false); |
1020 | 1071 | this.tabPage10.PerformLayout(); |
1072 | + this.groupBox2.ResumeLayout(false); | |
1073 | + this.groupBox2.PerformLayout(); | |
1021 | 1074 | this.ResumeLayout(false); |
1022 | 1075 | |
1023 | 1076 | } |
@@ -1109,5 +1162,9 @@ | ||
1109 | 1162 | private System.Windows.Forms.TextBox oldKeyForPluginTextBox; |
1110 | 1163 | private System.Windows.Forms.Label label20; |
1111 | 1164 | private System.Windows.Forms.Button releaseKeyAssignForPluginButton; |
1165 | + private System.Windows.Forms.GroupBox groupBox2; | |
1166 | + private System.Windows.Forms.RadioButton FileIconNotDisplayRadioButton; | |
1167 | + private System.Windows.Forms.RadioButton FileIconAllDisplayRadioBUtton; | |
1168 | + private System.Windows.Forms.RadioButton FileIconOnlyExeDisplayRadioButton; | |
1112 | 1169 | } |
1113 | 1170 | } |
\ No newline at end of file |
@@ -11,7 +11,6 @@ | ||
11 | 11 | /// VirtualModeでListViewを扱うための、ListViewItem相当のもの |
12 | 12 | /// </summary> |
13 | 13 | public class VirtualListViewItem { |
14 | - | |
15 | 14 | private FilerItem targetItem; |
16 | 15 | private ListViewItem viewItem; |
17 | 16 | private VirtualListView parentView; |
@@ -175,24 +174,42 @@ | ||
175 | 174 | break; |
176 | 175 | case ItemType.File: |
177 | 176 | this.viewItem.SubItems.Add(this.targetItem.Extension); |
177 | + | |
178 | + //アイコンの表示 | |
179 | + if (SCFiler2System.Instance.Option.FileView.IconDisplay == SCFiler2System.OptionClass.FileViewOption.FileIconDisp.Nothing) { | |
180 | + //何も表示しない | |
181 | + } else { | |
182 | + if (targetItem.Extension.ToUpper() == ".EXE") { // exeはどちらのモードでも表示 | |
183 | + this.parentView.RegistImage(targetItem.Name, System.Drawing.Icon.ExtractAssociatedIcon(targetItem.FullName)); | |
184 | + this.viewItem.ImageIndex = this.parentView.GetImageIndex(targetItem.Name); | |
185 | + } else if (SCFiler2System.Instance.Option.FileView.IconDisplay == SCFiler2System.OptionClass.FileViewOption.FileIconDisp.All) { | |
186 | + //登録済みだったらindexを取得、でなければ登録して登録したindexを取得 | |
187 | + if (this.parentView.IsContainsImage(targetItem.Extension)) { | |
188 | + this.viewItem.ImageIndex = this.parentView.GetImageIndex(targetItem.Extension); | |
189 | + } else { | |
190 | + this.parentView.RegistImage(targetItem.Extension, System.Drawing.Icon.ExtractAssociatedIcon(targetItem.FullName)); | |
191 | + this.viewItem.ImageIndex = this.parentView.GetImageIndex(targetItem.Extension); | |
192 | + } | |
193 | + } | |
194 | + } | |
178 | 195 | break; |
179 | 196 | case ItemType.Drive: |
180 | 197 | Drive drive = (Drive)targetItem; |
181 | 198 | switch (drive.DriveType) { |
182 | 199 | case System.IO.DriveType.Fixed: |
183 | - this.viewItem.ImageIndex = (int)FileView.IconListIndex.Hdd; | |
200 | + this.viewItem.ImageIndex = (int)VirtualListView.IconListIndex.Hdd; | |
184 | 201 | break; |
185 | 202 | case System.IO.DriveType.CDRom: |
186 | - this.viewItem.ImageIndex = (int)FileView.IconListIndex.CDROM; | |
203 | + this.viewItem.ImageIndex = (int)VirtualListView.IconListIndex.CDROM; | |
187 | 204 | break; |
188 | 205 | case System.IO.DriveType.Removable: |
189 | - this.viewItem.ImageIndex = (int)FileView.IconListIndex.Removable; | |
206 | + this.viewItem.ImageIndex = (int)VirtualListView.IconListIndex.Removable; | |
190 | 207 | break; |
191 | 208 | case System.IO.DriveType.Network: |
192 | - this.viewItem.ImageIndex = (int)FileView.IconListIndex.NetworkDrive; | |
209 | + this.viewItem.ImageIndex = (int)VirtualListView.IconListIndex.NetworkDrive; | |
193 | 210 | break; |
194 | 211 | default: |
195 | - this.viewItem.ImageIndex = (int)FileView.IconListIndex.Hdd; | |
212 | + this.viewItem.ImageIndex = (int)VirtualListView.IconListIndex.Hdd; | |
196 | 213 | break; |
197 | 214 | } |
198 | 215 | this.viewItem.SubItems.Add(""); |
@@ -1,5 +1,9 @@ | ||
1 | 1 | 更新履歴 |
2 | 2 | |
3 | +■0.38 | |
4 | +・フォルダ以外のアイコンも表示可能にした | |
5 | + 設定ダイアログの表示タブに設定項目があります | |
6 | + | |
3 | 7 | ■0.37 |
4 | 8 | ・プラグインにキー割り当てを可能にした |
5 | 9 | ・SCFiler2固有の関連付け実行が、プラグインからの呼び出しでは正しく実行しなかったのを修正 |