• R/O
  • SSH
  • HTTPS

scfiler: 提交


Commit MetaInfo

修订版96 (tree)
时间2009-06-07 01:40:26
作者yuki_sc

Log Message

サムネイル表示は一度に全部読み込むのではなくて、表示対象のみを逐次読み込むように変更
アイコンの場合は同じ拡張子は使い回すように変更

更改概述

差异

--- SCFiler2/InvalidPreConditionJobException.cs (nonexistent)
+++ SCFiler2/InvalidPreConditionJobException.cs (revision 96)
@@ -0,0 +1,11 @@
1+using System;
2+using System.Collections.Generic;
3+using System.Text;
4+
5+namespace SCFiler2 {
6+ public class InvalidPreConditionJobException : JobException {
7+ public InvalidPreConditionJobException(string message)
8+ : base(message) {
9+ }
10+ }
11+}
--- SCFiler2/JobException.cs (nonexistent)
+++ SCFiler2/JobException.cs (revision 96)
@@ -0,0 +1,12 @@
1+using System;
2+using System.Collections.Generic;
3+using System.Text;
4+using SCFiler2.FileSystem;
5+
6+namespace SCFiler2 {
7+ public class JobException : Exception {
8+ public JobException(string message)
9+ : base(message) {
10+ }
11+ }
12+}
--- SCFiler2/FileView.cs (revision 95)
+++ SCFiler2/FileView.cs (revision 96)
@@ -304,11 +304,7 @@
304304 this.listView.LargeImageList.ImageSize = new Size(thumbnailWidth, thumbnailHeight);
305305
306306 foreach (VirtualListViewItem item in this.virtualListView.Items) {
307- Image image = item.FilerItem.ThumnailImage;
308- if (image != null) {
309- this.listView.LargeImageList.Images.Add(image);
310- item.Item.ImageIndex = this.listView.LargeImageList.Images.Count - 1;
311- }
307+ item.ImageMode = VirtualListViewItem.ImageSize.Large;
312308 }
313309 }
314310
@@ -1074,7 +1070,6 @@
10741070 }
10751071
10761072 private void listView_SelectedIndexChanged(object sender, EventArgs e) {
1077-
10781073 }
10791074
10801075 private void fileSystemWatcher_Changed(object sender, System.IO.FileSystemEventArgs e) {
@@ -1245,7 +1240,6 @@
12451240 #endregion
12461241
12471242 private void listView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) {
1248-
12491243 }
12501244
12511245 private void listView_ItemActivate(object sender, EventArgs e) {
--- SCFiler2/MainForm.cs (revision 95)
+++ SCFiler2/MainForm.cs (revision 96)
@@ -184,6 +184,7 @@
184184 }
185185
186186 private void MainForm_Load(object sender, EventArgs e) {
187+
187188 HostImpl.Initialize();
188189 LoadViewSize();
189190
@@ -240,7 +241,6 @@
240241 //ファイルビューの初期化
241242 leftFileView.Initialize("LeftFileView");
242243 rightFileView.Initialize("RightFileView");
243-
244244 }
245245
246246 public ToolStripMenuItem constructPluginMenu() {
--- SCFiler2/VirtualListView.cs (revision 95)
+++ SCFiler2/VirtualListView.cs (revision 96)
@@ -189,7 +189,7 @@
189189 }
190190
191191 #region Imageindex関係
192- private Dictionary<string, System.Drawing.Icon> smallImageListDictionary = new Dictionary<string, System.Drawing.Icon>();
192+ private Dictionary<string, int> smallImageListDictionary = new Dictionary<string, int>();
193193
194194 internal void InitializeImageList() {
195195 this.targetView.SmallImageList.Images.Clear();
@@ -198,13 +198,31 @@
198198 this.targetView.SmallImageList.Images.Add(Images.CDROM);
199199 this.targetView.SmallImageList.Images.Add(Images.RemovableDrive);
200200 this.targetView.SmallImageList.Images.Add(Images.NetworkDrive);
201+ this.smallImageListDictionary.Clear();
201202 }
202203
204+ /// <summary>
205+ /// 画像を必要に応じて登録し、ListViewItemのImageIndexに設定すべきint値を取得する
206+ /// 同じ拡張子のアイコンは使い回す
207+ /// </summary>
208+ /// <param name="target"></param>
209+ /// <returns></returns>
210+ internal int RegistSmallImage(FilerItem target) {
211+ string keyUpper = target.Extension.ToUpper();
203212
204- internal int RegistSmallImage(string key, System.Drawing.Icon icon) {
205- string keyUpper = key.ToUpper();
206- this.targetView.SmallImageList.Images.Add(icon);
207- return this.targetView.SmallImageList.Images.Count - 1;
213+ if (target.Extension.ToUpper() == ".EXE") { // exeは毎回個別のIconを読み込む
214+ this.targetView.SmallImageList.Images.Add(target.Icon);
215+ return this.targetView.SmallImageList.Images.Count - 1;
216+ } else {
217+ if (smallImageListDictionary.ContainsKey(keyUpper)) {
218+ return this.smallImageListDictionary[keyUpper];
219+ } else {
220+ this.targetView.SmallImageList.Images.Add(target.Icon);
221+ int index = this.targetView.SmallImageList.Images.Count - 1;
222+ this.smallImageListDictionary.Add(keyUpper, index);
223+ return index;
224+ }
225+ }
208226 }
209227
210228 #endregion
--- SCFiler2/VirtualListViewItem.cs (revision 95)
+++ SCFiler2/VirtualListViewItem.cs (revision 96)
@@ -4,6 +4,8 @@
44 using SCFiler2.FileSystem;
55 using System.Windows.Forms;
66 using System.Collections;
7+using System.Drawing;
8+using SCFiler2.Util;
79 using SCFiler2.ItemInterface;
810
911 namespace SCFiler2.ListViewControl {
@@ -134,16 +136,52 @@
134136 }
135137
136138 private int smallImageIndex = -1;
139+ private bool isSmallImageLoaded = false;
137140 public int SmallImageIndex {
138141 get { return smallImageIndex; }
139142 }
140143
141144 private int largeImageIndex = -1;
145+ private bool isLargeImageLoaded = false;
142146 public int LargeImageIndex {
143147 get { return largeImageIndex;}
144- set { largeImageIndex = value; }
145148 }
146149
150+ public enum ImageSize {
151+ Icon,
152+ Large
153+ }
154+
155+ private ImageSize imageMode = ImageSize.Icon;
156+ public ImageSize ImageMode {
157+ get { return imageMode; }
158+ set {
159+ if (this.imageMode == value) {
160+ return;
161+ }
162+ this.imageMode = value;
163+ if (this.viewItem == null) {
164+ //ListViewItemが生成されるタイミングで読み込むので、ここでは何もしない
165+ return;
166+ }
167+ switch (value) {
168+ case ImageSize.Icon:
169+ if (isSmallImageLoaded) {
170+ this.Item.ImageIndex = smallImageIndex;
171+ return;
172+ }
173+ loadSmallImage();
174+ break;
175+ case ImageSize.Large:
176+ if (isLargeImageLoaded) {
177+ this.Item.ImageIndex = largeImageIndex;
178+ }
179+ loadLargeImage();
180+ break;
181+ }
182+ }
183+ }
184+
147185 /// <summary>
148186 /// このVirtualListViewItemが表すListViewItemを生成する
149187 /// </summary>
@@ -155,25 +193,57 @@
155193 switch (this.targetItem.Type) {
156194 case ItemType.Folder:
157195 this.viewItem.SubItems.Add("<dir>");//拡張子列
158- this.smallImageIndex = 0;
159- this.viewItem.ImageIndex = 0;
160196 break;
161197 case ItemType.File:
162198 this.viewItem.SubItems.Add(this.targetItem.Extension);
199+ break;
200+ case ItemType.Drive:
201+ this.viewItem.SubItems.Add("");
202+ break;
203+ }
163204
205+ switch (this.imageMode) {
206+ case ImageSize.Icon:
207+ loadSmallImage();
208+ this.viewItem.ImageIndex = this.smallImageIndex;
209+ break;
210+ case ImageSize.Large:
211+ loadLargeImage();
212+ this.viewItem.ImageIndex = this.largeImageIndex;
213+ break;
214+ }
215+
216+ this.viewItem.SubItems.Add(this.targetItem.SizeDisplayString);//サイズ列
217+ this.viewItem.SubItems.Add(this.targetItem.UpdateDateString);//更新日列
218+ this.viewItem.Tag = this.targetItem;
219+ this.viewItem.Selected = this.Selected;
220+ }
221+
222+ private void loadLargeImage() {
223+ Image image = this.FilerItem.ThumnailImage;
224+ if (image != null) {
225+ this.parentView.AssignedListView.LargeImageList.Images.Add(image);
226+ this.largeImageIndex = this.parentView.AssignedListView.LargeImageList.Images.Count - 1;
227+ }
228+ this.isLargeImageLoaded = true;
229+ }
230+
231+ private void loadSmallImage() {
232+ switch (this.FilerItem.Type) {
233+ case ItemType.File:
164234 //アイコンの表示
165235 if (SCFiler2System.Instance.Option.FileView.IconDisplay == SCFiler2System.OptionClass.FileViewOption.FileIconDisp.Nothing) {
166236 //何も表示しない
167- } else {
168- if (targetItem.Extension.ToUpper() == ".EXE") { // exeはどちらのモードでも表示
169- this.smallImageIndex = this.parentView.RegistSmallImage(targetItem.Name, targetItem.Icon);
170- this.viewItem.ImageIndex = this.smallImageIndex;
171- } else if (SCFiler2System.Instance.Option.FileView.IconDisplay == SCFiler2System.OptionClass.FileViewOption.FileIconDisp.All) {
172- this.smallImageIndex = this.parentView.RegistSmallImage(targetItem.Extension, targetItem.Icon);
173- this.viewItem.ImageIndex = this.smallImageIndex;
174- }
237+ this.smallImageIndex = -1;
238+ } else if (SCFiler2System.Instance.Option.FileView.IconDisplay == SCFiler2System.OptionClass.FileViewOption.FileIconDisp.All) {
239+ this.smallImageIndex = this.parentView.RegistSmallImage(targetItem);
240+ } else if (SCFiler2System.Instance.Option.FileView.IconDisplay == SCFiler2System.OptionClass.FileViewOption.FileIconDisp.ExeOnly && targetItem.Extension.ToUpper() == ".EXE") {
241+ this.smallImageIndex = this.parentView.RegistSmallImage(targetItem);
175242 }
176243 break;
244+ case ItemType.Folder:
245+ this.smallImageIndex = 0; //フォルダは0を使い回す
246+ break;
177247 case ItemType.Drive:
178248 Drive drive = (Drive)targetItem;
179249 switch (drive.DriveType) {
@@ -193,14 +263,9 @@
193263 this.smallImageIndex = (int)VirtualListView.IconListIndex.Hdd;
194264 break;
195265 }
196- this.viewItem.ImageIndex = this.smallImageIndex;
197- this.viewItem.SubItems.Add("");
198266 break;
199267 }
200- this.viewItem.SubItems.Add(this.targetItem.SizeDisplayString);//サイズ列
201- this.viewItem.SubItems.Add(this.targetItem.UpdateDateString);//更新日列
202- this.viewItem.Tag = this.targetItem;
203- this.viewItem.Selected = this.Selected;
268+ this.isSmallImageLoaded = true;
204269 }
205270
206271 public override bool Equals(object obj) {
--- SCFiler2/MainForm.Designer.cs (revision 95)
+++ SCFiler2/MainForm.Designer.cs (revision 96)
@@ -65,6 +65,9 @@
6565 this.toolStripMenuItem7 = new System.Windows.Forms.ToolStripSeparator();
6666 this.現在の表示状態を一時保存TToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
6767 this.一時保存した状態を復元RToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
68+ this.表示PToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
69+ this.サムネイル表示切り替えTToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
70+ this.プレビューモード切り替えToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
6871 this.ツールTToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
6972 this.設定OToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
7073 this.バージョン情報VToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -76,20 +79,17 @@
7679 this.Level1_SplitContainer = new System.Windows.Forms.SplitContainer();
7780 this.Level2_Main_SplitContainer = new System.Windows.Forms.SplitContainer();
7881 this.Level3_Listview_SplitContainer = new System.Windows.Forms.SplitContainer();
82+ this.leftFileView = new SCFiler2.FileView();
83+ this.rightFileView = new SCFiler2.FileView();
7984 this.messageHistoryTextbox = new System.Windows.Forms.TextBox();
8085 this.Level3_History1_SplitContainer = new System.Windows.Forms.SplitContainer();
86+ this.folderHistory = new SCFiler2.HistoryView();
8187 this.Level3_History2_SplitContainer = new System.Windows.Forms.SplitContainer();
82- this.driveToolbar = new System.Windows.Forms.ToolStrip();
83- this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
84- this.表示PToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
85- this.サムネイル表示切り替えTToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
86- this.プレビューモード切り替えToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
87- this.leftFileView = new SCFiler2.FileView();
88- this.rightFileView = new SCFiler2.FileView();
89- this.folderHistory = new SCFiler2.HistoryView();
9088 this.fileHistory1 = new SCFiler2.HistoryView();
9189 this.clipboardView = new SCFiler2.ClipboardView();
9290 this.fileHistory2 = new SCFiler2.HistoryView();
91+ this.driveToolbar = new System.Windows.Forms.ToolStrip();
92+ this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
9393 this.menuStrip.SuspendLayout();
9494 this.statusStrip.SuspendLayout();
9595 this.Level1_SplitContainer.Panel1.SuspendLayout();
@@ -418,6 +418,30 @@
418418 this.一時保存した状態を復元RToolStripMenuItem.Text = "一時保存した表示状態を復元(&R)";
419419 this.一時保存した状態を復元RToolStripMenuItem.Click += new System.EventHandler(this.一時保存した状態を復元RToolStripMenuItem_Click);
420420 //
421+ // 表示PToolStripMenuItem
422+ //
423+ this.表示PToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
424+ this.サムネイル表示切り替えTToolStripMenuItem,
425+ this.プレビューモード切り替えToolStripMenuItem});
426+ this.表示PToolStripMenuItem.Name = "表示PToolStripMenuItem";
427+ this.表示PToolStripMenuItem.Size = new System.Drawing.Size(57, 20);
428+ this.表示PToolStripMenuItem.Text = "表示(&V)";
429+ this.表示PToolStripMenuItem.Click += new System.EventHandler(this.表示PToolStripMenuItem_Click);
430+ //
431+ // サムネイル表示切り替えTToolStripMenuItem
432+ //
433+ this.サムネイル表示切り替えTToolStripMenuItem.Name = "サムネイル表示切り替えTToolStripMenuItem";
434+ this.サムネイル表示切り替えTToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
435+ this.サムネイル表示切り替えTToolStripMenuItem.Text = "サムネイル表示切り替え(&T)";
436+ this.サムネイル表示切り替えTToolStripMenuItem.Click += new System.EventHandler(this.サムネイル表示切り替えTToolStripMenuItem_Click);
437+ //
438+ // プレビューモード切り替えToolStripMenuItem
439+ //
440+ this.プレビューモード切り替えToolStripMenuItem.Name = "プレビューモード切り替えToolStripMenuItem";
441+ this.プレビューモード切り替えToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
442+ this.プレビューモード切り替えToolStripMenuItem.Text = "プレビューモード切り替え(&P)";
443+ this.プレビューモード切り替えToolStripMenuItem.Click += new System.EventHandler(this.プレビューモード切り替えToolStripMenuItem_Click);
444+ //
421445 // ツールTToolStripMenuItem
422446 //
423447 this.ツールTToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -546,6 +570,24 @@
546570 this.Level3_Listview_SplitContainer.TabIndex = 0;
547571 this.Level3_Listview_SplitContainer.TabStop = false;
548572 //
573+ // leftFileView
574+ //
575+ this.leftFileView.Dock = System.Windows.Forms.DockStyle.Fill;
576+ this.leftFileView.Location = new System.Drawing.Point(0, 0);
577+ this.leftFileView.Name = "leftFileView";
578+ this.leftFileView.Size = new System.Drawing.Size(197, 212);
579+ this.leftFileView.TabIndex = 0;
580+ this.leftFileView.ViewMode = SCFiler2.ViewInterface.ViewMode.Normal;
581+ //
582+ // rightFileView
583+ //
584+ this.rightFileView.Dock = System.Windows.Forms.DockStyle.Fill;
585+ this.rightFileView.Location = new System.Drawing.Point(0, 0);
586+ this.rightFileView.Name = "rightFileView";
587+ this.rightFileView.Size = new System.Drawing.Size(218, 212);
588+ this.rightFileView.TabIndex = 0;
589+ this.rightFileView.ViewMode = SCFiler2.ViewInterface.ViewMode.Normal;
590+ //
549591 // messageHistoryTextbox
550592 //
551593 this.messageHistoryTextbox.BackColor = System.Drawing.SystemColors.Window;
@@ -578,6 +620,14 @@
578620 this.Level3_History1_SplitContainer.TabIndex = 0;
579621 this.Level3_History1_SplitContainer.TabStop = false;
580622 //
623+ // folderHistory
624+ //
625+ this.folderHistory.Dock = System.Windows.Forms.DockStyle.Fill;
626+ this.folderHistory.Location = new System.Drawing.Point(0, 0);
627+ this.folderHistory.Name = "folderHistory";
628+ this.folderHistory.Size = new System.Drawing.Size(104, 136);
629+ this.folderHistory.TabIndex = 0;
630+ //
581631 // Level3_History2_SplitContainer
582632 //
583633 this.Level3_History2_SplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -598,72 +648,6 @@
598648 this.Level3_History2_SplitContainer.TabIndex = 0;
599649 this.Level3_History2_SplitContainer.TabStop = false;
600650 //
601- // driveToolbar
602- //
603- this.driveToolbar.Location = new System.Drawing.Point(0, 49);
604- this.driveToolbar.Name = "driveToolbar";
605- this.driveToolbar.Size = new System.Drawing.Size(527, 25);
606- this.driveToolbar.TabIndex = 4;
607- this.driveToolbar.Text = "toolStrip1";
608- //
609- // notifyIcon
610- //
611- this.notifyIcon.BalloonTipText = "SCFiler2";
612- this.notifyIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon.Icon")));
613- this.notifyIcon.Text = "SCFiler2";
614- this.notifyIcon.MouseClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon_MouseClick);
615- this.notifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon1_MouseDoubleClick);
616- //
617- // 表示PToolStripMenuItem
618- //
619- this.表示PToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
620- this.サムネイル表示切り替えTToolStripMenuItem,
621- this.プレビューモード切り替えToolStripMenuItem});
622- this.表示PToolStripMenuItem.Name = "表示PToolStripMenuItem";
623- this.表示PToolStripMenuItem.Size = new System.Drawing.Size(57, 20);
624- this.表示PToolStripMenuItem.Text = "表示(&V)";
625- this.表示PToolStripMenuItem.Click += new System.EventHandler(this.表示PToolStripMenuItem_Click);
626- //
627- // サムネイル表示切り替えTToolStripMenuItem
628- //
629- this.サムネイル表示切り替えTToolStripMenuItem.Name = "サムネイル表示切り替えTToolStripMenuItem";
630- this.サムネイル表示切り替えTToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
631- this.サムネイル表示切り替えTToolStripMenuItem.Text = "サムネイル表示切り替え(&T)";
632- this.サムネイル表示切り替えTToolStripMenuItem.Click += new System.EventHandler(this.サムネイル表示切り替えTToolStripMenuItem_Click);
633- //
634- // プレビューモード切り替えToolStripMenuItem
635- //
636- this.プレビューモード切り替えToolStripMenuItem.Name = "プレビューモード切り替えToolStripMenuItem";
637- this.プレビューモード切り替えToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
638- this.プレビューモード切り替えToolStripMenuItem.Text = "プレビューモード切り替え(&P)";
639- this.プレビューモード切り替えToolStripMenuItem.Click += new System.EventHandler(this.プレビューモード切り替えToolStripMenuItem_Click);
640- //
641- // leftFileView
642- //
643- this.leftFileView.Dock = System.Windows.Forms.DockStyle.Fill;
644- this.leftFileView.Location = new System.Drawing.Point(0, 0);
645- this.leftFileView.Name = "leftFileView";
646- this.leftFileView.Size = new System.Drawing.Size(197, 212);
647- this.leftFileView.TabIndex = 0;
648- this.leftFileView.ViewMode = SCFiler2.ViewInterface.ViewMode.Normal;
649- //
650- // rightFileView
651- //
652- this.rightFileView.Dock = System.Windows.Forms.DockStyle.Fill;
653- this.rightFileView.Location = new System.Drawing.Point(0, 0);
654- this.rightFileView.Name = "rightFileView";
655- this.rightFileView.Size = new System.Drawing.Size(218, 212);
656- this.rightFileView.TabIndex = 0;
657- this.rightFileView.ViewMode = SCFiler2.ViewInterface.ViewMode.Normal;
658- //
659- // folderHistory
660- //
661- this.folderHistory.Dock = System.Windows.Forms.DockStyle.Fill;
662- this.folderHistory.Location = new System.Drawing.Point(0, 0);
663- this.folderHistory.Name = "folderHistory";
664- this.folderHistory.Size = new System.Drawing.Size(104, 136);
665- this.folderHistory.TabIndex = 0;
666- //
667651 // fileHistory1
668652 //
669653 this.fileHistory1.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -674,7 +658,6 @@
674658 //
675659 // clipboardView
676660 //
677- this.clipboardView.Dock = System.Windows.Forms.DockStyle.Left;
678661 this.clipboardView.Location = new System.Drawing.Point(0, 0);
679662 this.clipboardView.Name = "clipboardView";
680663 this.clipboardView.Size = new System.Drawing.Size(47, 69);
@@ -683,12 +666,27 @@
683666 //
684667 // fileHistory2
685668 //
686- this.fileHistory2.Dock = System.Windows.Forms.DockStyle.Right;
687669 this.fileHistory2.Location = new System.Drawing.Point(53, 0);
688670 this.fileHistory2.Name = "fileHistory2";
689671 this.fileHistory2.Size = new System.Drawing.Size(51, 69);
690672 this.fileHistory2.TabIndex = 0;
691673 //
674+ // driveToolbar
675+ //
676+ this.driveToolbar.Location = new System.Drawing.Point(0, 49);
677+ this.driveToolbar.Name = "driveToolbar";
678+ this.driveToolbar.Size = new System.Drawing.Size(527, 25);
679+ this.driveToolbar.TabIndex = 4;
680+ this.driveToolbar.Text = "toolStrip1";
681+ //
682+ // notifyIcon
683+ //
684+ this.notifyIcon.BalloonTipText = "SCFiler2";
685+ this.notifyIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon.Icon")));
686+ this.notifyIcon.Text = "SCFiler2";
687+ this.notifyIcon.MouseClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon_MouseClick);
688+ this.notifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon1_MouseDoubleClick);
689+ //
692690 // MainForm
693691 //
694692 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
--- SCFiler2/CustomListView.cs (revision 95)
+++ SCFiler2/CustomListView.cs (revision 96)
@@ -24,7 +24,7 @@
2424 // LVN_ITEMCHANGED
2525 const int ItemChanged = -101;
2626 // NMHDR / NMLISTVIEW 構造体におけるメンバのオフセット(先頭の hdr 除く)
27- const int OffsetCode = 4, OffsetIndex = 8, OffsetState = 16;
27+ const int OffsetCode = 4, OffsetIndex = 8, OffsetState = 16, OffsetOldState = 24;
2828 if (m.Msg == ReflectedItemChanged) {
2929 // LPARAM を NMHDR に見立てて通知コード(code)を取得
3030 int code = Marshal.ReadInt32(m.LParam, IntPtr.Size + OffsetCode);
@@ -31,6 +31,7 @@
3131 if (code == ItemChanged) {
3232 // LPARAM を NMLISTVIEW に見立ててアイテムの状態(uNewState)を取得
3333 int state = Marshal.ReadInt32(m.LParam, IntPtr.Size + OffsetState);
34+
3435 const int Focused = 1;
3536 // 最下位ビットが立っている場合フォーカスが存在すると言う意味になる
3637 // フォーカスがアイテム 1 からアイテム 2 に動いた場合、
Show on old repository browser