• R/O
  • SSH
  • HTTPS

scfiler: Commit


Commit MetaInfo

Revision85 (tree)
Time2009-04-28 00:36:13
Authoryuki_sc

Log Message

フォルダ以外のFileviewアイコン表示可能に

Change Summary

Incremental Difference

--- SCFiler2/OptionDialog.cs (revision 84)
+++ SCFiler2/OptionDialog.cs (revision 85)
@@ -51,6 +51,13 @@
5151 system.Option.FileView.IsHideSystemFile = this.IsHideSystemFileCheckbox.Checked;
5252 system.Option.FileView.IsDisplayDriveToolbar = !this.IsHideDriveToolbarCheckbox.Checked;
5353 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+ }
5461
5562 //■色タブ
5663 system.Option.Color.ActiveViewTitleText = colorActiveViewTitle.ForegroundColor;
@@ -159,6 +166,17 @@
159166 this.IsHideSystemFileCheckbox.Checked = system.Option.FileView.IsHideSystemFile;
160167 this.IsHideDriveToolbarCheckbox.Checked = !system.Option.FileView.IsDisplayDriveToolbar;
161168 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+ }
162180
163181 //■履歴タブ
164182 historyview1ValidExtensionsString.Text = MainForm.Instance.FileHistoryManager1.GetValidExtension();
--- SCFiler2/FileView.cs (revision 84)
+++ SCFiler2/FileView.cs (revision 85)
@@ -25,14 +25,6 @@
2525 get { return ViewType.FileView; }
2626 }
2727
28- public enum IconListIndex : int {
29- Folder = 0,
30- Hdd = 1,
31- CDROM = 2,
32- Removable = 3,
33- NetworkDrive = 4,
34- }
35-
3628 /// <summary>
3729 /// 現在表示中のパス
3830 /// </summary>
@@ -104,6 +96,7 @@
10496 /// <param name="viewName">ビューにつける名前。設定ファイルの保存等に使われる。複数インスタンスの識別のため</param>
10597 public void Initialize(string view_name) {
10698 this.viewName = view_name;
99+
107100 virtualListView = new VirtualListView(this.listView);
108101 currentListViewController = new NormalListViewController(this, virtualListView);
109102
@@ -135,13 +128,6 @@
135128
136129 ChangePath(this.currentPath);//LoadViewData()で取ってきたcurrentPathを設定する
137130
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-
145131 this.listView.Dock = DockStyle.Fill;
146132 this.listView.Visible = true;
147133 this.previewPictureBox.Visible = false;
--- SCFiler2/About.Designer.cs (revision 84)
+++ SCFiler2/About.Designer.cs (revision 85)
@@ -35,7 +35,7 @@
3535 this.appName.Name = "appName";
3636 this.appName.Size = new System.Drawing.Size(147, 12);
3737 this.appName.TabIndex = 0;
38- this.appName.Text = "SCFiler2 Alpha version 0.37";
38+ this.appName.Text = "SCFiler2 Alpha version 0.38";
3939 this.appName.Click += new System.EventHandler(this.appName_Click);
4040 //
4141 // okButton
--- SCFiler2/VirtualListView.cs (revision 84)
+++ SCFiler2/VirtualListView.cs (revision 85)
@@ -11,6 +11,14 @@
1111 /// VirtualModeでListViewを扱うための、ListView相当のもの
1212 /// </summary>
1313 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+
1422 private ListView targetView;
1523 /// <summary>
1624 /// このビューが管理するVIrtualListViewItemのリスト
@@ -33,6 +41,8 @@
3341 this.selectedItemCollection = new SelectedVirtualListViewItemCollection(this);
3442 this.selectedIndexCollection = new SelectedIndexCollection(this);
3543 this.sorter = new VirtualListViewComparer(0);
44+ this.targetView.SmallImageList = new ImageList();
45+ this.InitializeSmallImageList();
3646 }
3747
3848 private VirtualListViewItem selectionStartItem;
@@ -53,6 +63,7 @@
5363 /// </summary>
5464 public void Clear() {
5565 this.itemCollection.Clear();
66+ this.InitializeSmallImageList();
5667 this.targetView.VirtualListSize = 0;
5768 this.selectionStartItem = null;
5869 }
@@ -182,8 +193,46 @@
182193 this.itemList.Sort(this.sorter);
183194 }
184195
196+ #region Imageindex関係
197+ private Dictionary<string, int> imageKeyToIndex = new Dictionary<string, int>();
185198
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+
186226 /// <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>
187236 /// このVirtualListViewが管理しているアイテムのコレクション
188237 /// </summary>
189238 public class VirtualListViewItemCollection : IEnumerable {
@@ -379,6 +428,7 @@
379428 }
380429
381430 #endregion
431+
382432 }
383433 }
384434 }
--- SCFiler2/SCFiler2System.cs (revision 84)
+++ SCFiler2/SCFiler2System.cs (revision 85)
@@ -6,11 +6,11 @@
66 using System.Windows.Forms;
77
88 namespace SCFiler2 {
9- public class SCFiler2System {
9+ internal class SCFiler2System {
1010 //シングルトン
1111 static private SCFiler2System instance = new SCFiler2System();
1212
13- static public SCFiler2System Instance {
13+ static internal SCFiler2System Instance {
1414 get { return instance;}
1515 }
1616 private SCFiler2System() {
@@ -17,7 +17,7 @@
1717 Option.Load();
1818 }
1919
20- public class OptionClass {
20+ internal class OptionClass {
2121 public class KeyCommandOption {
2222 public bool ChangeDriveByNumKey = false;
2323 public void Save() {
@@ -55,11 +55,17 @@
5555 public ColorOption Color = new ColorOption();
5656
5757 public class FileViewOption {
58+ public enum FileIconDisp {
59+ Nothing,
60+ ExeOnly,
61+ All
62+ }
5863 public List<string> excludeExtensions = new List<string>();
5964 public bool IsHideHiddenFile = false;
6065 public bool IsHideSystemFile = true;
6166 public bool IsDisplayDriveToolbar = true;
6267 public bool IsDisplayHistoryView = true;
68+ public FileIconDisp IconDisplay = FileIconDisp.Nothing;
6369
6470 public void Save() {
6571 OptionUtil.Save("FileViewOption", this);
--- SCFiler2/OptionDialog.Designer.cs (revision 84)
+++ SCFiler2/OptionDialog.Designer.cs (revision 85)
@@ -58,9 +58,6 @@
5858 this.historyview2ValidExtensionsString = new System.Windows.Forms.TextBox();
5959 this.historyview1ValidExtensionsString = new System.Windows.Forms.TextBox();
6060 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();
6461 this.tabPage6 = new System.Windows.Forms.TabPage();
6562 this.label12 = new System.Windows.Forms.Label();
6663 this.label11 = new System.Windows.Forms.Label();
@@ -68,11 +65,6 @@
6865 this.label9 = new System.Windows.Forms.Label();
6966 this.label8 = new System.Windows.Forms.Label();
7067 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();
7668 this.tabPage8 = new System.Windows.Forms.TabPage();
7769 this.IsUseExeIconCheckBox = new System.Windows.Forms.CheckBox();
7870 this.groupBox1 = new System.Windows.Forms.GroupBox();
@@ -108,6 +100,18 @@
108100 this.cancel_button = new System.Windows.Forms.Button();
109101 this.ok_button = new System.Windows.Forms.Button();
110102 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();
111115 this.tabControl1.SuspendLayout();
112116 this.tabPage1.SuspendLayout();
113117 this.tabPage2.SuspendLayout();
@@ -120,6 +124,7 @@
120124 this.groupBox1.SuspendLayout();
121125 this.tabPage9.SuspendLayout();
122126 this.tabPage10.SuspendLayout();
127+ this.groupBox2.SuspendLayout();
123128 this.SuspendLayout();
124129 //
125130 // tabControl1
@@ -330,6 +335,7 @@
330335 //
331336 // tabPage7
332337 //
338+ this.tabPage7.Controls.Add(this.groupBox2);
333339 this.tabPage7.Controls.Add(this.IsHideHistoryViewCheckbox);
334340 this.tabPage7.Controls.Add(this.IsHideDriveToolbarCheckbox);
335341 this.tabPage7.Controls.Add(this.label6);
@@ -498,27 +504,6 @@
498504 this.tabPage5.Text = "色";
499505 this.tabPage5.UseVisualStyleBackColor = true;
500506 //
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- //
522507 // tabPage6
523508 //
524509 this.tabPage6.Controls.Add(this.label12);
@@ -594,41 +579,6 @@
594579 this.label7.TabIndex = 1;
595580 this.label7.Text = "タイトル";
596581 //
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- //
632582 // tabPage8
633583 //
634584 this.tabPage8.Controls.Add(this.IsUseExeIconCheckBox);
@@ -985,6 +935,107 @@
985935 this.colorDialog.AnyColor = true;
986936 this.colorDialog.FullOpen = true;
987937 //
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+ //
9881039 // OptionDialog
9891040 //
9901041 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -1018,6 +1069,8 @@
10181069 this.tabPage9.PerformLayout();
10191070 this.tabPage10.ResumeLayout(false);
10201071 this.tabPage10.PerformLayout();
1072+ this.groupBox2.ResumeLayout(false);
1073+ this.groupBox2.PerformLayout();
10211074 this.ResumeLayout(false);
10221075
10231076 }
@@ -1109,5 +1162,9 @@
11091162 private System.Windows.Forms.TextBox oldKeyForPluginTextBox;
11101163 private System.Windows.Forms.Label label20;
11111164 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;
11121169 }
11131170 }
\ No newline at end of file
--- SCFiler2/VirtualListViewItem.cs (revision 84)
+++ SCFiler2/VirtualListViewItem.cs (revision 85)
@@ -11,7 +11,6 @@
1111 /// VirtualModeでListViewを扱うための、ListViewItem相当のもの
1212 /// </summary>
1313 public class VirtualListViewItem {
14-
1514 private FilerItem targetItem;
1615 private ListViewItem viewItem;
1716 private VirtualListView parentView;
@@ -175,24 +174,42 @@
175174 break;
176175 case ItemType.File:
177176 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+ }
178195 break;
179196 case ItemType.Drive:
180197 Drive drive = (Drive)targetItem;
181198 switch (drive.DriveType) {
182199 case System.IO.DriveType.Fixed:
183- this.viewItem.ImageIndex = (int)FileView.IconListIndex.Hdd;
200+ this.viewItem.ImageIndex = (int)VirtualListView.IconListIndex.Hdd;
184201 break;
185202 case System.IO.DriveType.CDRom:
186- this.viewItem.ImageIndex = (int)FileView.IconListIndex.CDROM;
203+ this.viewItem.ImageIndex = (int)VirtualListView.IconListIndex.CDROM;
187204 break;
188205 case System.IO.DriveType.Removable:
189- this.viewItem.ImageIndex = (int)FileView.IconListIndex.Removable;
206+ this.viewItem.ImageIndex = (int)VirtualListView.IconListIndex.Removable;
190207 break;
191208 case System.IO.DriveType.Network:
192- this.viewItem.ImageIndex = (int)FileView.IconListIndex.NetworkDrive;
209+ this.viewItem.ImageIndex = (int)VirtualListView.IconListIndex.NetworkDrive;
193210 break;
194211 default:
195- this.viewItem.ImageIndex = (int)FileView.IconListIndex.Hdd;
212+ this.viewItem.ImageIndex = (int)VirtualListView.IconListIndex.Hdd;
196213 break;
197214 }
198215 this.viewItem.SubItems.Add("");
--- SCFiler2/bin/Release/ReleaseNote.txt (revision 84)
+++ SCFiler2/bin/Release/ReleaseNote.txt (revision 85)
@@ -1,5 +1,9 @@
11 更新履歴
22
3+■0.38
4+・フォルダ以外のアイコンも表示可能にした
5+ 設定ダイアログの表示タブに設定項目があります
6+
37 ■0.37
48 ・プラグインにキー割り当てを可能にした
59 ・SCFiler2固有の関連付け実行が、プラグインからの呼び出しでは正しく実行しなかったのを修正
Show on old repository browser