3 changed files
.nuget | ||
NuGet.targets | ||
Shell | ||
ShellViewEx.cs | ||
BExplorer.sln | ||
Add comment 13 <RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
Add comment 14
Add comment 15 <!-- Download NuGet.exe if it does not already exist -->
Add comment 16 Minus <DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
Add comment 16 Plus <DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">true</DownloadNuGetExe>
Add comment 17 </PropertyGroup>
Add comment 18
Add comment 19 <ItemGroup Condition=" '$(PackageSources)' == '' ">
Displayed content is truncated due to maximum viewable content limit.
Add comment 22 using System.Threading.Tasks;
Add comment 23 using BExplorer.Shell._Plugin_Interfaces;
Add comment 24 using System.Drawing.Drawing2D;
Add comment 25 Minus using GS.Common.IO;
Add comment 25 Plus //using GS.Common.IO;
Add comment 26
Add comment 27 Minus namespace BExplorer.Shell {
Add comment 27 Plus namespace BExplorer.Shell
Add comment 28 Plus {
Add comment 28 29
Add comment 29 30 #region Substructures and classes
Add comment 30 31
Add comment 31 32 /// <summary> Specifies how list items are displayed in a <see cref="ShellView" /> control. </summary>
Add comment 32 Minus public enum ShellViewStyle {
Add comment 33 Plus public enum ShellViewStyle
Add comment 34 Plus {
Add comment 33 35
Add comment 34 36 /// <summary> Items appear in a grid and icon size is 256x256 </summary>
Add comment 35 37 ExtraLargeIcon,
Add comment 73 75 Content,
Add comment 74 76 }
Add comment 75 77
Add comment 76 Minus public class RenameEventArgs : EventArgs {
Add comment 78 Plus public class RenameEventArgs : EventArgs
Add comment 79 Plus {
Add comment 77 80
Add comment 78 81 public int ItemIndex { get; private set; }
Add comment 79 82
Add comment 80 Minus public RenameEventArgs(int itemIndex) {
Add comment 83 Plus public RenameEventArgs(int itemIndex)
Add comment 84 Plus {
Add comment 81 85 this.ItemIndex = itemIndex;
Add comment 82 86 }
Add comment 83 87 }
Add comment 84 88
Add comment 85 Minus public class ListViewColumnDropDownArgs : EventArgs {
Add comment 89 Plus public class ListViewColumnDropDownArgs : EventArgs
Add comment 90 Plus {
Add comment 86 91 public int ColumnIndex { get; set; }
Add comment 87 92 public DPoint ActionPoint { get; set; }
Add comment 88 Minus public ListViewColumnDropDownArgs(int colIndex, DPoint pt) {
Add comment 93 Plus public ListViewColumnDropDownArgs(int colIndex, DPoint pt)
Add comment 94 Plus {
Add comment 89 95 this.ColumnIndex = colIndex;
Add comment 90 96 this.ActionPoint = pt;
Add comment 91 97 }
Add comment 92 98 }
Add comment 93 99
Add comment 94 Minus public class NavigatedEventArgs : EventArgs, IDisposable {
Add comment 100 Plus public class NavigatedEventArgs : EventArgs, IDisposable
Add comment 101 Plus {
Add comment 95 102 /// <summary> The folder that is navigated to. </summary>
Add comment 96 103 public IListItemEx Folder { get; set; }
Add comment 97 104 public IListItemEx OldFolder { get; set; }
Add comment 98 105
Add comment 99 106 public Boolean isInSameTab { get; set; }
Add comment 100 107
Add comment 101 Minus public void Dispose() {
Add comment 102 Minus if (Folder != null) {
Add comment 108 Plus public void Dispose()
Add comment 109 Plus {
Add comment 110 Plus if (Folder != null)
Add comment 111 Plus {
Add comment 103 112 Folder.Dispose();
Add comment 104 113 Folder = null;
Add comment 105 114 }
Add comment 106 Minus if (OldFolder != null) {
Add comment 115 Plus if (OldFolder != null)
Add comment 116 Plus {
Add comment 107 117 OldFolder.Dispose();
Add comment 108 118 OldFolder = null;
Add comment 109 119 }
Add comment 110 120 }
Add comment 111 121
Add comment 112 Minus public NavigatedEventArgs(IListItemEx folder, IListItemEx old) {
Add comment 122 Plus public NavigatedEventArgs(IListItemEx folder, IListItemEx old)
Add comment 123 Plus {
Add comment 113 124 Folder = folder;
Add comment 114 125 OldFolder = old;
Add comment 115 126 }
Add comment 116 Minus public NavigatedEventArgs(IListItemEx folder, IListItemEx old, bool isInSame) {
Add comment 127 Plus public NavigatedEventArgs(IListItemEx folder, IListItemEx old, bool isInSame)
Add comment 128 Plus {
Add comment 117 129 Folder = folder;
Add comment 118 130 OldFolder = old;
Add comment 119 131 isInSameTab = isInSame;
Add comment 121 133 }
Add comment 122 134
Add comment 123 135 /// <summary> Provides information for the <see cref="ShellView.Navigating" /> event. </summary>
Add comment 124 Minus public class NavigatingEventArgs : EventArgs, IDisposable {
Add comment 136 Plus public class NavigatingEventArgs : EventArgs, IDisposable
Add comment 137 Plus {
Add comment 125 138 /// <summary> The folder being navigated to. </summary>
Add comment 126 139 public IListItemEx Folder { get; private set; }
Add comment 127 140
Add comment 139 152 /// </summary>
Add comment 140 153 /// <param name="folder">The folder being navigated to.</param>
Add comment 141 154 /// <param name="isInSameTab"></param>
Add comment 142 Minus public NavigatingEventArgs(IListItemEx folder, bool isInSameTab) {
Add comment 155 Plus public NavigatingEventArgs(IListItemEx folder, bool isInSameTab)
Add comment 156 Plus {
Add comment 143 157 Folder = folder;
Add comment 144 158 IsNavigateInSameTab = isInSameTab;
Add comment 145 159 }
Add comment 146 160
Add comment 147 Minus public void Dispose() {
Add comment 148 Minus if (Folder != null) {
Add comment 161 Plus public void Dispose()
Add comment 162 Plus {
Add comment 163 Plus if (Folder != null)
Add comment 164 Plus {
Add comment 149 165 //Folder.Dispose();
Add comment 150 166 Folder = null;
Add comment 151 167 }
Add comment 152 168 }
Add comment 153 169 }
Add comment 154 170
Add comment 155 Minus public enum ItemUpdateType {
Add comment 171 Plus public enum ItemUpdateType
Add comment 172 Plus {
Add comment 156 173 Renamed,
Add comment 157 174 Created,
Add comment 158 175 Deleted,
Add comment 161 178 RecycleBin
Add comment 162 179 }
Add comment 163 180
Add comment 164 Minus public class ItemUpdatedEventArgs : EventArgs {
Add comment 181 Plus public class ItemUpdatedEventArgs : EventArgs
Add comment 182 Plus {
Add comment 165 183
Add comment 166 184 public ItemUpdateType UpdateType { get; private set; }
Add comment 167 185
Add comment 171 189
Add comment 172 190 public int NewItemIndex { get; private set; }
Add comment 173 191
Add comment 174 Minus public ItemUpdatedEventArgs(ItemUpdateType type, IListItemEx newItem, IListItemEx previousItem, int index) {
Add comment 192 Plus public ItemUpdatedEventArgs(ItemUpdateType type, IListItemEx newItem, IListItemEx previousItem, int index)
Add comment 193 Plus {
Add comment 175 194 this.UpdateType = type;
Add comment 176 195 this.NewItem = newItem;
Add comment 177 196 this.PreviousItem = previousItem;
Add comment 179 198 }
Add comment 180 199 }
Add comment 181 200
Add comment 182 Minus public class ViewChangedEventArgs : EventArgs {
Add comment 201 Plus public class ViewChangedEventArgs : EventArgs
Add comment 202 Plus {
Add comment 183 203
Add comment 184 204 public Int32 ThumbnailSize { get; private set; }
Add comment 185 205
Add comment 186 206 /// <summary> The current ViewStyle </summary>
Add comment 187 207 public ShellViewStyle CurrentView { get; private set; }
Add comment 188 208
Add comment 189 Minus public ViewChangedEventArgs(ShellViewStyle view, Int32? thumbnailSize) {
Add comment 209 Plus public ViewChangedEventArgs(ShellViewStyle view, Int32? thumbnailSize)
Add comment 210 Plus {
Add comment 190 211 CurrentView = view;
Add comment 191 212 if (thumbnailSize != null)
Add comment 192 213 ThumbnailSize = thumbnailSize.Value;
Add comment 196 217 #endregion Substructures and classes
Add comment 197 218
Add comment 198 219 /// <summary> The ShellFileListView class that visualize contents of a directory </summary>
Add comment 199 Minus public partial class ShellView : UserControl {
Add comment 220 Plus public partial class ShellView : UserControl
Add comment 221 Plus {
Add comment 200 222
Add comment 201 223 #region Event Handler
Add comment 202 224
Add comment 292 314
Add comment 293 315 public List<LVItemColor> LVItemsColorCodes { get; set; }
Add comment 294 316
Add comment 295 Minus public List<IListItemEx> SelectedItems {
Add comment 296 Minus get {
Add comment 317 Plus public List<IListItemEx> SelectedItems
Add comment 318 Plus {
Add comment 319 Plus get
Add comment 320 Plus {
Add comment 297 321 var Data = this.SelectedIndexes.ToArray();
Add comment 298 322 var selItems = new List<IListItemEx>();
Add comment 299 323 DraggedItemIndexes.AddRange(Data);
Add comment 300 324
Add comment 301 Minus foreach (var index in Data) {
Add comment 325 Plus foreach (var index in Data)
Add comment 326 Plus {
Add comment 302 327 var Item = this.Items.ElementAtOrDefault(index);
Add comment 303 328 if (Item == null)
Add comment 304 329 this.SelectedIndexes.Remove(index);
Add comment 309 334 }
Add comment 310 335 }
Add comment 311 336
Add comment 312 Minus public Boolean ShowCheckboxes {
Add comment 337 Plus public Boolean ShowCheckboxes
Add comment 338 Plus {
Add comment 313 339 get { return _showCheckBoxes; }
Add comment 314 Minus set {
Add comment 315 Minus if (value) {
Add comment 340 Plus set
Add comment 341 Plus {
Add comment 342 Plus if (value)
Add comment 343 Plus {
Add comment 316 344 User32.SendMessage(this.LVHandle, MSG.LVM_SetExtendedStyle, (int)ListViewExtendedStyles.LVS_EX_AUTOCHECKSELECT, (int)ListViewExtendedStyles.LVS_EX_AUTOCHECKSELECT);
Add comment 317 345 User32.SendMessage(this.LVHandle, MSG.LVM_SetExtendedStyle, (int)ListViewExtendedStyles.CheckBoxes, (int)ListViewExtendedStyles.CheckBoxes);
Add comment 318 346
Add comment 319 Minus } else {
Add comment 347 Plus }
Add comment 348 Plus else
Add comment 349 Plus {
Add comment 320 350 User32.SendMessage(this.LVHandle, MSG.LVM_SetExtendedStyle, (int)ListViewExtendedStyles.LVS_EX_AUTOCHECKSELECT, 0);
Add comment 321 351 User32.SendMessage(this.LVHandle, MSG.LVM_SetExtendedStyle, (int)ListViewExtendedStyles.CheckBoxes, 0);
Add comment 322 352 }
Add comment 324 354 }
Add comment 325 355 }
Add comment 326 356
Add comment 327 Minus public bool ShowHidden {
Add comment 357 Plus public bool ShowHidden
Add comment 358 Plus {
Add comment 328 359 get { return _ShowHidden; }
Add comment 329 Minus set {
Add comment 360 Plus set
Add comment 361 Plus {
Add comment 330 362 _ShowHidden = value;
Add comment 331 363 this.RefreshContents();
Add comment 332 364 }
Add comment 334 366
Add comment 335 367 /// <summary> Gets or sets how items are displayed in the control. </summary>
Add comment 336 368 [DefaultValue(ShellViewStyle.Medium), Category("Appearance")]
Add comment 337 Minus public ShellViewStyle View {
Add comment 369 Plus public ShellViewStyle View
Add comment 370 Plus {
Add comment 338 371 get { return m_View; }
Add comment 339 Minus set {
Add comment 372 Plus set
Add comment 373 Plus {
Add comment 340 374 m_View = value;
Add comment 341 375 var iconsize = 16;
Add comment 342 Minus switch (value) {
Add comment 376 Plus switch (value)
Add comment 377 Plus {
Add comment 343 378 case ShellViewStyle.ExtraLargeIcon:
Add comment 344 379 User32.SendMessage(this.LVHandle, MSG.LVM_SETVIEW, (int)LV_VIEW.LV_VIEW_ICON, 0);
Add comment 345 380 ResizeIcons(256);
Add comment 412 447 break;
Add comment 413 448 }
Add comment 414 449
Add comment 415 Minus if (value != ShellViewStyle.Details) {
Add comment 450 Plus if (value != ShellViewStyle.Details)
Add comment 451 Plus {
Add comment 416 452 this.UpdateColsInView();
Add comment 417 453 AutosizeAllColumns(-2);
Add comment 418 454 }
Add comment 419 455 //OnViewChanged(new ViewChangedEventArgs(value, iconsize));
Add comment 420 456
Add comment 421 Minus if (ViewStyleChanged != null) {
Add comment 457 Plus if (ViewStyleChanged != null)
Add comment 458 Plus {
Add comment 422 459 ViewStyleChanged(this, new ViewChangedEventArgs(value, iconsize));
Add comment 423 460 }
Add comment 424 461 }
Add comment 432 469 private System.Windows.Forms.Timer _UnvalidateTimer = new System.Windows.Forms.Timer();
Add comment 433 470 private System.Windows.Forms.Timer _MaintenanceTimer = new System.Windows.Forms.Timer();
Add comment 434 471 private string _DBPath = Path.Combine(KnownFolders.RoamingAppData.ParsingName, @"BExplorer\Settings.sqlite");
Add comment 435 Minus private List<int> SelectedIndexes {
Add comment 436 Minus get {
Add comment 472 Plus private List<int> SelectedIndexes
Add comment 473 Plus {
Add comment 474 Plus get
Add comment 475 Plus {
Add comment 437 476 var selItems = new List<int>();
Add comment 438 477 int iStart = -1;
Add comment 439 478 var lvi = new LVITEMINDEX();
Add comment 440 Minus while (lvi.iItem != -1) {
Add comment 479 Plus while (lvi.iItem != -1)
Add comment 480 Plus {
Add comment 441 481 lvi.iItem = iStart;
Add comment 442 482 lvi.iGroup = this.GetGroupIndex(iStart);
Add comment 443 483 User32.SendMessage(this.LVHandle, LVM.GETNEXTITEMINDEX, ref lvi, LVNI.LVNI_SELECTED);
Add comment 516 556 #region Initializer
Add comment 517 557
Add comment 518 558 /// <summary> Main constructor </summary>
Add comment 519 Minus public ShellView() {
Add comment 559 Plus public ShellView()
Add comment 560 Plus {
Add comment 520 561 //this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque | ControlStyles.ContainerControl | ControlStyles.CacheText , true);
Add comment 521 562 this.ItemForRename = -1;
Add comment 522 563 InitializeComponent();
Add comment 569 610 selectionTimer.Tick += selectionTimer_Tick;
Add comment 570 611 }
Add comment 571 612
Add comment 572 Minus void fsw_Changed(object sender, FileSystemEventArgs e) {
Add comment 573 Minus try {
Add comment 574 Minus if (e.ChangeType == WatcherChangeTypes.Renamed) {
Add comment 613 Plus void fsw_Changed(object sender, FileSystemEventArgs e)
Add comment 614 Plus {
Add comment 615 Plus try
Add comment 616 Plus {
Add comment 617 Plus if (e.ChangeType == WatcherChangeTypes.Renamed)
Add comment 618 Plus {
Add comment 575 619 this.IsRenameInProgress = false;
Add comment 576 620 }
Add comment 577 621 if (!File.Exists(e.FullPath) && !Directory.Exists(e.FullPath))
Add comment 578 622 return;
Add comment 579 Minus try {
Add comment 623 Plus try
Add comment 624 Plus {
Add comment 580 625 var objUpdate = FileSystemListItem.ToFileSystemItem(this.LVHandle, e.FullPath.ToShellParsingName());
Add comment 581 626 var exisitingItem = this.Items.Where(w => w.Equals(objUpdate)).FirstOrDefault();
Add comment 582 Minus if (exisitingItem != null) {
Add comment 627 Plus if (exisitingItem != null)
Add comment 628 Plus {
Add comment 583 629 this.RefreshItem(this.Items.IndexOf(exisitingItem), true);
Add comment 584 630 }
Add comment 585 Minus if (objUpdate != null && this.CurrentFolder != null && objUpdate.Equals(this.CurrentFolder)) {
Add comment 631 Plus if (objUpdate != null && this.CurrentFolder != null && objUpdate.Equals(this.CurrentFolder))
Add comment 632 Plus {
Add comment 586 633 this.UnvalidateDirectory();
Add comment 587 634 }
Add comment 588 635 objUpdate.Dispose();
Add comment 589 Minus } catch (FileNotFoundException) { }
Add comment 590 Minus } catch (FileNotFoundException) {
Add comment 636 Plus }
Add comment 637 Plus catch (FileNotFoundException) { }
Add comment 638 Plus }
Add comment 639 Plus catch (FileNotFoundException)
Add comment 640 Plus {
Add comment 591 641
Add comment 592 Minus } catch (ArgumentOutOfRangeException) {
Add comment 642 Plus }
Add comment 643 Plus catch (ArgumentOutOfRangeException)
Add comment 644 Plus {
Add comment 593 645
Add comment 594 Minus } catch (ArgumentException) {
Add comment 646 Plus }
Add comment 647 Plus catch (ArgumentException)
Add comment 648 Plus {
Add comment 595 649
Add comment 596 650 }
Add comment 597 651 }
Add comment 598 652
Add comment 599 Minus void fsw_Deleted(object sender, FileSystemEventArgs e) {
Add comment 653 Plus void fsw_Deleted(object sender, FileSystemEventArgs e)
Add comment 654 Plus {
Add comment 600 655 //this.UnvalidateDirectory();
Add comment 601 Minus if (!String.IsNullOrEmpty(e.FullPath)) {
Add comment 656 Plus if (!String.IsNullOrEmpty(e.FullPath))
Add comment 657 Plus {
Add comment 602 658 //this.UnvalidateDirectory();
Add comment 603 659 var theItem = this.Items.ToArray().SingleOrDefault(s => s.ParsingName.ToLowerInvariant() == e.FullPath.ToLowerInvariant());
Add comment 604 Minus if (theItem != null) {
Add comment 660 Plus if (theItem != null)
Add comment 661 Plus {
Add comment 605 662 this.Items.Remove(theItem);
Add comment 606 663 if (this.IsGroupsEnabled) this.SetGroupOrder(false);
Add comment 607 664 var col = this.Collumns.ToArray().SingleOrDefault(w => w.ID == this.LastSortedColumnId);
Add comment 610 667 }
Add comment 611 668 }
Add comment 612 669
Add comment 613 Minus void fsw_Created(object sender, FileSystemEventArgs e) {
Add comment 670 Plus void fsw_Created(object sender, FileSystemEventArgs e)
Add comment 671 Plus {
Add comment 614 672 if (!File.Exists(e.FullPath) && !Directory.Exists(e.FullPath))
Add comment 615 673 return;
Add comment 616 Minus try {
Add comment 674 Plus try
Add comment 675 Plus {
Add comment 617 676 var obj = FileSystemListItem.ToFileSystemItem(this.LVHandle, e.FullPath.ToShellParsingName());
Add comment 618 677 var existingItem = this.Items.SingleOrDefault(s => s.Equals(obj));
Add comment 619 Minus if (existingItem == null && (obj.Parent != null && obj.Parent.Equals(this.CurrentFolder))) {
Add comment 620 Minus if (obj.Extension.ToLowerInvariant() != ".tmp") {
Add comment 678 Plus if (existingItem == null && (obj.Parent != null && obj.Parent.Equals(this.CurrentFolder)))
Add comment 679 Plus {
Add comment 680 Plus if (obj.Extension.ToLowerInvariant() != ".tmp")
Add comment 681 Plus {
Add comment 621 682 var itemIndex = this.InsertNewItem(obj);
Add comment 622 683 // this.Invoke(new MethodInvoker(() => {
Add comment 623 684 this.RaiseItemUpdated(ItemUpdateType.Created, null, obj, itemIndex);
Add comment 624 685 // }));
Add comment 625 Minus } else {
Add comment 686 Plus }
Add comment 687 Plus else
Add comment 688 Plus {
Add comment 626 689 var affectedItem = this.Items.SingleOrDefault(s => s.Equals(obj.Parent));
Add comment 627 Minus if (affectedItem != null) {
Add comment 690 Plus if (affectedItem != null)
Add comment 691 Plus {
Add comment 628 692 var index = this.Items.IndexOf(affectedItem);
Add comment 629 693 this.RefreshItem(index, true);
Add comment 630 694 }
Add comment 631 695 }
Add comment 632 696 }
Add comment 633 Minus } catch (Exception) {
Add comment 697 Plus }
Add comment 698 Plus catch (Exception)
Add comment 699 Plus {
Add comment 634 700
Add comment 635 701 }
Add comment 636 702 }
Add comment 639 705
Add comment 640 706 #region Events
Add comment 641 707
Add comment 642 Minus private void selectionTimer_Tick(object sender, EventArgs e) {
Add comment 643 Minus if (MouseButtons != F.MouseButtons.Left) {
Add comment 708 Plus private void selectionTimer_Tick(object sender, EventArgs e)
Add comment 709 Plus {
Add comment 710 Plus if (MouseButtons != F.MouseButtons.Left)
Add comment 711 Plus {
Add comment 644 712 (sender as F.Timer).Stop();
Add comment 645 713 OnSelectionChanged();
Add comment 646 Minus if (KeyJumpTimerDone != null) {
Add comment 714 Plus if (KeyJumpTimerDone != null)
Add comment 715 Plus {
Add comment 647 716 KeyJumpTimerDone(this, EventArgs.Empty);
Add comment 648 717 }
Add comment 649 718
Add comment 650 719 }
Add comment 651 Minus if (this.ItemForRename != this.GetFirstSelectedItemIndex() && !this.IsRenameInProgress) {
Add comment 720 Plus if (this.ItemForRename != this.GetFirstSelectedItemIndex() && !this.IsRenameInProgress)
Add comment 721 Plus {
Add comment 652 722 (sender as F.Timer).Stop();
Add comment 653 723 this.EndLabelEdit();
Add comment 654 724 }
Add comment 655 725 }
Add comment 656 726
Add comment 657 Minus private void resetTimer_Tick(object sender, EventArgs e) {
Add comment 727 Plus private void resetTimer_Tick(object sender, EventArgs e)
Add comment 728 Plus {
Add comment 658 729 (sender as F.Timer).Stop();
Add comment 659 730 resetEvent.Set();
Add comment 660 731 this.IsCancelRequested = false;
Add comment 661 732 Shell32.SetProcessWorkingSetSize(Process.GetCurrentProcess().Handle, -1, -1);
Add comment 662 733 }
Add comment 663 734
Add comment 664 Minus private void ShellView_MouseUp(object sender, MouseEventArgs e) {
Add comment 665 Minus if (_IsDragSelect == LVIS.LVIS_SELECTED) {
Add comment 735 Plus private void ShellView_MouseUp(object sender, MouseEventArgs e)
Add comment 736 Plus {
Add comment 737 Plus if (_IsDragSelect == LVIS.LVIS_SELECTED)
Add comment 738 Plus {
Add comment 666 739 if (selectionTimer.Enabled) selectionTimer.Stop();
Add comment 667 740 selectionTimer.Start();
Add comment 668 741 }
Add comment 669 742 }
Add comment 670 743
Add comment 671 Minus private void ShellView_GotFocus() {
Add comment 744 Plus private void ShellView_GotFocus()
Add comment 745 Plus {
Add comment 672 746 this.Focus();
Add comment 673 747 User32.SetForegroundWindow(this.LVHandle);
Add comment 674 748 }
Add comment 675 749
Add comment 676 Minus private Boolean ShellView_KeyDown(Keys e) {
Add comment 677 Minus if (System.Windows.Input.Keyboard.FocusedElement is System.Windows.Controls.TextBox && e != Keys.Escape && e != Keys.Enter) {
Add comment 750 Plus private Boolean ShellView_KeyDown(Keys e)
Add comment 751 Plus {
Add comment 752 Plus if (System.Windows.Input.Keyboard.FocusedElement is System.Windows.Controls.TextBox && e != Keys.Escape && e != Keys.Enter)
Add comment 753 Plus {
Add comment 678 754 var key = System.Windows.Input.KeyInterop.KeyFromVirtualKey((int)e); // Key to send
Add comment 679 755 var target = System.Windows.Input.Keyboard.FocusedElement as System.Windows.Controls.TextBox; // Target element
Add comment 680 756 var routedEvent = System.Windows.Input.Keyboard.KeyDownEvent; // Event to send
Add comment 684 760 System.Windows.Input.Keyboard.PrimaryDevice,
Add comment 685 761 PresentationSource.FromVisual(target),
Add comment 686 762 0,
Add comment 687 Minus key) { RoutedEvent = routedEvent }
Add comment 763 Plus key)
Add comment 764 Plus { RoutedEvent = routedEvent }
Add comment 688 765 );
Add comment 689 766 return false;
Add comment 690 767 }
Add comment 691 Minus if (ItemForRealName_IsAny) {
Add comment 768 Plus if (ItemForRealName_IsAny)
Add comment 769 Plus {
Add comment 692 770 if (e == Keys.Escape)
Add comment 693 771 this.EndLabelEdit(true);
Add comment 694 Minus else if (e == Keys.F2) {
Add comment 772 Plus else if (e == Keys.F2)
Add comment 773 Plus {
Add comment 695 774 //TO_DO: implement a conditional selection inside rename textbox!
Add comment 696 Minus } else if (e == Keys.Enter)
Add comment 775 Plus }
Add comment 776 Plus else if (e == Keys.Enter)
Add comment 697 777 this.EndLabelEdit();
Add comment 48 EndProject
Add comment 49 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Odyssey.Controls", "BreadcrumbBar\Odyssey.Controls.csproj", "{333FDC55-6B47-4A64-A2DF-A4C5823FAC74}"
Add comment 50 EndProject
Add comment 51 Minus Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{520FA32F-C306-4F67-BC81-17F5D36CFEE6}"
Add comment 52 Minus ProjectSection(SolutionItems) = preProject
Add comment 53 Minus .nuget\NuGet.Config = .nuget\NuGet.Config
Add comment 54 Minus .nuget\NuGet.exe = .nuget\NuGet.exe
Add comment 55 Minus .nuget\NuGet.targets = .nuget\NuGet.targets
Add comment 56 Minus EndProjectSection
Add comment 57 Minus EndProject
Add comment 58 51 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "TestProject", "TestProject\TestProject.vbproj", "{11D5F318-66D8-4F1F-83D7-7C917B66DF97}"
Add comment 59 52 EndProject
Add comment 60 53 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FluentRibbon", "FluentRibbon", "{FF96A752-2FA1-449B-90EE-DC2E4A22E128}"