サムネイル表示は一度に全部読み込むのではなくて、表示対象のみを逐次読み込むように変更
アイコンの場合は同じ拡張子は使い回すように変更
@@ -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 | +} |
@@ -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 | +} |
@@ -304,11 +304,7 @@ | ||
304 | 304 | this.listView.LargeImageList.ImageSize = new Size(thumbnailWidth, thumbnailHeight); |
305 | 305 | |
306 | 306 | 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; | |
312 | 308 | } |
313 | 309 | } |
314 | 310 |
@@ -1074,7 +1070,6 @@ | ||
1074 | 1070 | } |
1075 | 1071 | |
1076 | 1072 | private void listView_SelectedIndexChanged(object sender, EventArgs e) { |
1077 | - | |
1078 | 1073 | } |
1079 | 1074 | |
1080 | 1075 | private void fileSystemWatcher_Changed(object sender, System.IO.FileSystemEventArgs e) { |
@@ -1245,7 +1240,6 @@ | ||
1245 | 1240 | #endregion |
1246 | 1241 | |
1247 | 1242 | private void listView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { |
1248 | - | |
1249 | 1243 | } |
1250 | 1244 | |
1251 | 1245 | private void listView_ItemActivate(object sender, EventArgs e) { |
@@ -184,6 +184,7 @@ | ||
184 | 184 | } |
185 | 185 | |
186 | 186 | private void MainForm_Load(object sender, EventArgs e) { |
187 | + | |
187 | 188 | HostImpl.Initialize(); |
188 | 189 | LoadViewSize(); |
189 | 190 |
@@ -240,7 +241,6 @@ | ||
240 | 241 | //ファイルビューの初期化 |
241 | 242 | leftFileView.Initialize("LeftFileView"); |
242 | 243 | rightFileView.Initialize("RightFileView"); |
243 | - | |
244 | 244 | } |
245 | 245 | |
246 | 246 | public ToolStripMenuItem constructPluginMenu() { |
@@ -189,7 +189,7 @@ | ||
189 | 189 | } |
190 | 190 | |
191 | 191 | #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>(); | |
193 | 193 | |
194 | 194 | internal void InitializeImageList() { |
195 | 195 | this.targetView.SmallImageList.Images.Clear(); |
@@ -198,13 +198,31 @@ | ||
198 | 198 | this.targetView.SmallImageList.Images.Add(Images.CDROM); |
199 | 199 | this.targetView.SmallImageList.Images.Add(Images.RemovableDrive); |
200 | 200 | this.targetView.SmallImageList.Images.Add(Images.NetworkDrive); |
201 | + this.smallImageListDictionary.Clear(); | |
201 | 202 | } |
202 | 203 | |
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(); | |
203 | 212 | |
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 | + } | |
208 | 226 | } |
209 | 227 | |
210 | 228 | #endregion |
@@ -4,6 +4,8 @@ | ||
4 | 4 | using SCFiler2.FileSystem; |
5 | 5 | using System.Windows.Forms; |
6 | 6 | using System.Collections; |
7 | +using System.Drawing; | |
8 | +using SCFiler2.Util; | |
7 | 9 | using SCFiler2.ItemInterface; |
8 | 10 | |
9 | 11 | namespace SCFiler2.ListViewControl { |
@@ -134,16 +136,52 @@ | ||
134 | 136 | } |
135 | 137 | |
136 | 138 | private int smallImageIndex = -1; |
139 | + private bool isSmallImageLoaded = false; | |
137 | 140 | public int SmallImageIndex { |
138 | 141 | get { return smallImageIndex; } |
139 | 142 | } |
140 | 143 | |
141 | 144 | private int largeImageIndex = -1; |
145 | + private bool isLargeImageLoaded = false; | |
142 | 146 | public int LargeImageIndex { |
143 | 147 | get { return largeImageIndex;} |
144 | - set { largeImageIndex = value; } | |
145 | 148 | } |
146 | 149 | |
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 | + | |
147 | 185 | /// <summary> |
148 | 186 | /// このVirtualListViewItemが表すListViewItemを生成する |
149 | 187 | /// </summary> |
@@ -155,25 +193,57 @@ | ||
155 | 193 | switch (this.targetItem.Type) { |
156 | 194 | case ItemType.Folder: |
157 | 195 | this.viewItem.SubItems.Add("<dir>");//拡張子列 |
158 | - this.smallImageIndex = 0; | |
159 | - this.viewItem.ImageIndex = 0; | |
160 | 196 | break; |
161 | 197 | case ItemType.File: |
162 | 198 | this.viewItem.SubItems.Add(this.targetItem.Extension); |
199 | + break; | |
200 | + case ItemType.Drive: | |
201 | + this.viewItem.SubItems.Add(""); | |
202 | + break; | |
203 | + } | |
163 | 204 | |
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: | |
164 | 234 | //アイコンの表示 |
165 | 235 | if (SCFiler2System.Instance.Option.FileView.IconDisplay == SCFiler2System.OptionClass.FileViewOption.FileIconDisp.Nothing) { |
166 | 236 | //何も表示しない |
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); | |
175 | 242 | } |
176 | 243 | break; |
244 | + case ItemType.Folder: | |
245 | + this.smallImageIndex = 0; //フォルダは0を使い回す | |
246 | + break; | |
177 | 247 | case ItemType.Drive: |
178 | 248 | Drive drive = (Drive)targetItem; |
179 | 249 | switch (drive.DriveType) { |
@@ -193,14 +263,9 @@ | ||
193 | 263 | this.smallImageIndex = (int)VirtualListView.IconListIndex.Hdd; |
194 | 264 | break; |
195 | 265 | } |
196 | - this.viewItem.ImageIndex = this.smallImageIndex; | |
197 | - this.viewItem.SubItems.Add(""); | |
198 | 266 | break; |
199 | 267 | } |
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; | |
204 | 269 | } |
205 | 270 | |
206 | 271 | public override bool Equals(object obj) { |
@@ -65,6 +65,9 @@ | ||
65 | 65 | this.toolStripMenuItem7 = new System.Windows.Forms.ToolStripSeparator(); |
66 | 66 | this.現在の表示状態を一時保存TToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); |
67 | 67 | 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(); | |
68 | 71 | this.ツールTToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); |
69 | 72 | this.設定OToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); |
70 | 73 | this.バージョン情報VToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); |
@@ -76,20 +79,17 @@ | ||
76 | 79 | this.Level1_SplitContainer = new System.Windows.Forms.SplitContainer(); |
77 | 80 | this.Level2_Main_SplitContainer = new System.Windows.Forms.SplitContainer(); |
78 | 81 | this.Level3_Listview_SplitContainer = new System.Windows.Forms.SplitContainer(); |
82 | + this.leftFileView = new SCFiler2.FileView(); | |
83 | + this.rightFileView = new SCFiler2.FileView(); | |
79 | 84 | this.messageHistoryTextbox = new System.Windows.Forms.TextBox(); |
80 | 85 | this.Level3_History1_SplitContainer = new System.Windows.Forms.SplitContainer(); |
86 | + this.folderHistory = new SCFiler2.HistoryView(); | |
81 | 87 | 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(); | |
90 | 88 | this.fileHistory1 = new SCFiler2.HistoryView(); |
91 | 89 | this.clipboardView = new SCFiler2.ClipboardView(); |
92 | 90 | this.fileHistory2 = new SCFiler2.HistoryView(); |
91 | + this.driveToolbar = new System.Windows.Forms.ToolStrip(); | |
92 | + this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components); | |
93 | 93 | this.menuStrip.SuspendLayout(); |
94 | 94 | this.statusStrip.SuspendLayout(); |
95 | 95 | this.Level1_SplitContainer.Panel1.SuspendLayout(); |
@@ -418,6 +418,30 @@ | ||
418 | 418 | this.一時保存した状態を復元RToolStripMenuItem.Text = "一時保存した表示状態を復元(&R)"; |
419 | 419 | this.一時保存した状態を復元RToolStripMenuItem.Click += new System.EventHandler(this.一時保存した状態を復元RToolStripMenuItem_Click); |
420 | 420 | // |
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 | + // | |
421 | 445 | // ツールTToolStripMenuItem |
422 | 446 | // |
423 | 447 | this.ツールTToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { |
@@ -546,6 +570,24 @@ | ||
546 | 570 | this.Level3_Listview_SplitContainer.TabIndex = 0; |
547 | 571 | this.Level3_Listview_SplitContainer.TabStop = false; |
548 | 572 | // |
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 | + // | |
549 | 591 | // messageHistoryTextbox |
550 | 592 | // |
551 | 593 | this.messageHistoryTextbox.BackColor = System.Drawing.SystemColors.Window; |
@@ -578,6 +620,14 @@ | ||
578 | 620 | this.Level3_History1_SplitContainer.TabIndex = 0; |
579 | 621 | this.Level3_History1_SplitContainer.TabStop = false; |
580 | 622 | // |
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 | + // | |
581 | 631 | // Level3_History2_SplitContainer |
582 | 632 | // |
583 | 633 | this.Level3_History2_SplitContainer.Dock = System.Windows.Forms.DockStyle.Fill; |
@@ -598,72 +648,6 @@ | ||
598 | 648 | this.Level3_History2_SplitContainer.TabIndex = 0; |
599 | 649 | this.Level3_History2_SplitContainer.TabStop = false; |
600 | 650 | // |
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 | - // | |
667 | 651 | // fileHistory1 |
668 | 652 | // |
669 | 653 | this.fileHistory1.Dock = System.Windows.Forms.DockStyle.Fill; |
@@ -674,7 +658,6 @@ | ||
674 | 658 | // |
675 | 659 | // clipboardView |
676 | 660 | // |
677 | - this.clipboardView.Dock = System.Windows.Forms.DockStyle.Left; | |
678 | 661 | this.clipboardView.Location = new System.Drawing.Point(0, 0); |
679 | 662 | this.clipboardView.Name = "clipboardView"; |
680 | 663 | this.clipboardView.Size = new System.Drawing.Size(47, 69); |
@@ -683,12 +666,27 @@ | ||
683 | 666 | // |
684 | 667 | // fileHistory2 |
685 | 668 | // |
686 | - this.fileHistory2.Dock = System.Windows.Forms.DockStyle.Right; | |
687 | 669 | this.fileHistory2.Location = new System.Drawing.Point(53, 0); |
688 | 670 | this.fileHistory2.Name = "fileHistory2"; |
689 | 671 | this.fileHistory2.Size = new System.Drawing.Size(51, 69); |
690 | 672 | this.fileHistory2.TabIndex = 0; |
691 | 673 | // |
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 | + // | |
692 | 690 | // MainForm |
693 | 691 | // |
694 | 692 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); |
@@ -24,7 +24,7 @@ | ||
24 | 24 | // LVN_ITEMCHANGED |
25 | 25 | const int ItemChanged = -101; |
26 | 26 | // NMHDR / NMLISTVIEW 構造体におけるメンバのオフセット(先頭の hdr 除く) |
27 | - const int OffsetCode = 4, OffsetIndex = 8, OffsetState = 16; | |
27 | + const int OffsetCode = 4, OffsetIndex = 8, OffsetState = 16, OffsetOldState = 24; | |
28 | 28 | if (m.Msg == ReflectedItemChanged) { |
29 | 29 | // LPARAM を NMHDR に見立てて通知コード(code)を取得 |
30 | 30 | int code = Marshal.ReadInt32(m.LParam, IntPtr.Size + OffsetCode); |
@@ -31,6 +31,7 @@ | ||
31 | 31 | if (code == ItemChanged) { |
32 | 32 | // LPARAM を NMLISTVIEW に見立ててアイテムの状態(uNewState)を取得 |
33 | 33 | int state = Marshal.ReadInt32(m.LParam, IntPtr.Size + OffsetState); |
34 | + | |
34 | 35 | const int Focused = 1; |
35 | 36 | // 最下位ビットが立っている場合フォーカスが存在すると言う意味になる |
36 | 37 | // フォーカスがアイテム 1 からアイテム 2 に動いた場合、 |