Browse Source

BindingsUpdated and GesturesUpdated events.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/shortcuts@4591 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts^2
Sergej Andrejev 16 years ago
parent
commit
7554e22505
  1. 394
      SharpDevelop.Tests.sln
  2. 2
      src/AddIns/Misc/SearchAndReplace/Project/Gui/SearchAndReplaceDialog.cs
  3. 55
      src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingGroup.cs
  4. 131
      src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingInfoBase.cs
  5. 8
      src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingInfoTemplate.cs
  6. 48
      src/Main/ICSharpCode.Core.Presentation/CommandsService/CommandBindingInfo.cs
  7. 344
      src/Main/ICSharpCode.Core.Presentation/CommandsService/CommandManager.cs
  8. 232
      src/Main/ICSharpCode.Core.Presentation/CommandsService/Events/NotifyBindingsChangedEvent.cs
  9. 68
      src/Main/ICSharpCode.Core.Presentation/CommandsService/Events/NotifyGesturesChangedEvent.cs
  10. 31
      src/Main/ICSharpCode.Core.Presentation/CommandsService/Events/NotifyUserGestureProfileChangedEvent.cs
  11. 7
      src/Main/ICSharpCode.Core.Presentation/CommandsService/IBindingInfo.cs
  12. 19
      src/Main/ICSharpCode.Core.Presentation/CommandsService/InputBindingIndentifier.cs
  13. 208
      src/Main/ICSharpCode.Core.Presentation/CommandsService/InputBindingInfo.cs
  14. 12
      src/Main/ICSharpCode.Core.Presentation/CommandsService/ObservableInputGestureCollection.cs
  15. 108
      src/Main/ICSharpCode.Core.Presentation/CommandsService/UserDefinedGesturesManager.cs
  16. 25
      src/Main/ICSharpCode.Core.Presentation/CommandsService/UserGestureProfileChangedEvent.cs
  17. 57
      src/Main/ICSharpCode.Core.Presentation/CommandsService/UserGesturesProfile.cs
  18. 5
      src/Main/ICSharpCode.Core.Presentation/ICSharpCode.Core.Presentation.csproj
  19. 52
      src/Main/ICSharpCode.Core.Presentation/Menu/MenuCommand.cs
  20. 147
      src/Main/ICSharpCode.Core.Presentation/Test/BindingGroupTests.cs
  21. 652
      src/Main/ICSharpCode.Core.Presentation/Test/CommandManagerTests.cs

394
SharpDevelop.Tests.sln

@ -6,110 +6,110 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Main", "Main", "{256F5C28-5 @@ -6,110 +6,110 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Main", "Main", "{256F5C28-5
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom.Tests", "src\Main\ICSharpCode.SharpDevelop.Dom\Tests\ICSharpCode.SharpDevelop.Dom.Tests\ICSharpCode.SharpDevelop.Dom.Tests.csproj", "{7DB80259-24D4-46C3-A024-53FF1987733D}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Presentation.Tests", "src\Main\ICSharpCode.Core.Presentation\Test\ICSharpCode.Core.Presentation.Tests.csproj", "{FFA7988E-7348-4669-9E9D-27E629C873A2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartUp", "src\Main\StartUp\Project\StartUp.csproj", "{1152B71B-3C05-4598-B20D-823B5D40559E}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Tests", "src\Main\Base\Test\ICSharpCode.SharpDevelop.Tests.csproj", "{4980B743-B32F-4aba-AABD-45E2CAD3568D}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Widgets", "src\Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj", "{8035765F-D51F-4A0C-A746-2FD100E19419}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Tests", "src\Main\Core\Test\ICSharpCode.Core.Tests.csproj", "{AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop", "src\Main\Base\Project\ICSharpCode.SharpDevelop.csproj", "{2748AD25-9C63-4E12-877B-4DCE96FBED54}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core", "src\Main\Core\Project\ICSharpCode.Core.csproj", "{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Presentation", "src\Main\ICSharpCode.Core.Presentation\ICSharpCode.Core.Presentation.csproj", "{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Sda", "src\Main\ICSharpCode.SharpDevelop.Sda\ICSharpCode.SharpDevelop.Sda.csproj", "{80318B5F-A25D-45AB-8A95-EF31D2370A4C}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.WinForms", "src\Main\ICSharpCode.Core.WinForms\ICSharpCode.Core.WinForms.csproj", "{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom", "src\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj", "{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom", "src\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj", "{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.WinForms", "src\Main\ICSharpCode.Core.WinForms\ICSharpCode.Core.WinForms.csproj", "{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Sda", "src\Main\ICSharpCode.SharpDevelop.Sda\ICSharpCode.SharpDevelop.Sda.csproj", "{80318B5F-A25D-45AB-8A95-EF31D2370A4C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Presentation", "src\Main\ICSharpCode.Core.Presentation\ICSharpCode.Core.Presentation.csproj", "{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop", "src\Main\Base\Project\ICSharpCode.SharpDevelop.csproj", "{2748AD25-9C63-4E12-877B-4DCE96FBED54}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core", "src\Main\Core\Project\ICSharpCode.Core.csproj", "{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Tests", "src\Main\Core\Test\ICSharpCode.Core.Tests.csproj", "{AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Widgets", "src\Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj", "{8035765F-D51F-4A0C-A746-2FD100E19419}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Tests", "src\Main\Base\Test\ICSharpCode.SharpDevelop.Tests.csproj", "{4980B743-B32F-4aba-AABD-45E2CAD3568D}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartUp", "src\Main\StartUp\Project\StartUp.csproj", "{1152B71B-3C05-4598-B20D-823B5D40559E}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom.Tests", "src\Main\ICSharpCode.SharpDevelop.Dom\Tests\ICSharpCode.SharpDevelop.Dom.Tests\ICSharpCode.SharpDevelop.Dom.Tests.csproj", "{7DB80259-24D4-46C3-A024-53FF1987733D}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Presentation.Tests", "src\Main\ICSharpCode.Core.Presentation\Test\ICSharpCode.Core.Presentation.Tests.csproj", "{FFA7988E-7348-4669-9E9D-27E629C873A2}"
EndProject
Project("{00000000-0000-0000-0000-000000000000}") = "Tools", "src\Tools\Tools.build", "{3DF4060F-5EE0-41CF-8096-F27355FD5511}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{2A232EF1-EB95-41C6-B63A-C106E0C95D3C}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit.Tests", "src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit.Tests\ICSharpCode.AvalonEdit.Tests.csproj", "{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TreeView", "src\Libraries\SharpTreeView\ICSharpCode.TreeView\ICSharpCode.TreeView.csproj", "{DDE2A481-8271-4EAC-A330-8FA6A38D13D1}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NRefactory", "NRefactory", "{E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aga.Controls", "src\Libraries\TreeViewAdv\Aga.Controls\Aga.Controls.csproj", "{E73BB233-D88B-44A7-A98F-D71EE158381D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryTests", "src\Libraries\NRefactory\Test\NRefactoryTests.csproj", "{870115DD-960A-4406-A6B9-600BCDC36A03}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor", "src\Libraries\ICSharpCode.TextEditor\Project\ICSharpCode.TextEditor.csproj", "{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryASTGenerator", "src\Libraries\NRefactory\NRefactoryASTGenerator\NRefactoryASTGenerator.csproj", "{B22522AA-B5BF-4A58-AC6D-D4B45805521F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Build.Tasks", "src\Libraries\ICSharpCode.Build.Tasks\Project\ICSharpCode.Build.Tasks.csproj", "{4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactory", "src\Libraries\NRefactory\Project\NRefactory.csproj", "{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit", "src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit\ICSharpCode.AvalonEdit.csproj", "{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonDock", "src\Libraries\AvalonDock\AvalonDock.csproj", "{2FF700C2-A38A-48BD-A637-8CAFD4FE6237}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit", "src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit\ICSharpCode.AvalonEdit.csproj", "{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NRefactory", "NRefactory", "{E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactory", "src\Libraries\NRefactory\Project\NRefactory.csproj", "{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Build.Tasks", "src\Libraries\ICSharpCode.Build.Tasks\Project\ICSharpCode.Build.Tasks.csproj", "{4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryASTGenerator", "src\Libraries\NRefactory\NRefactoryASTGenerator\NRefactoryASTGenerator.csproj", "{B22522AA-B5BF-4A58-AC6D-D4B45805521F}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor", "src\Libraries\ICSharpCode.TextEditor\Project\ICSharpCode.TextEditor.csproj", "{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryTests", "src\Libraries\NRefactory\Test\NRefactoryTests.csproj", "{870115DD-960A-4406-A6B9-600BCDC36A03}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aga.Controls", "src\Libraries\TreeViewAdv\Aga.Controls\Aga.Controls.csproj", "{E73BB233-D88B-44A7-A98F-D71EE158381D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TreeView", "src\Libraries\SharpTreeView\ICSharpCode.TreeView\ICSharpCode.TreeView.csproj", "{DDE2A481-8271-4EAC-A330-8FA6A38D13D1}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit.Tests", "src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit.Tests\ICSharpCode.AvalonEdit.Tests.csproj", "{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
@ -118,110 +118,132 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AddIns", "AddIns", "{393278 @@ -118,110 +118,132 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AddIns", "AddIns", "{393278
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Language Bindings", "Language Bindings", "{E0646C25-36F2-4524-969F-FA621353AB94}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Analysis", "Analysis", "{F355E45F-F54F-4B42-8916-9A633A392789}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding.Tests", "src\AddIns\BackendBindings\VBNetBinding\Test\VBNetBinding.Tests.csproj", "{50A89267-A28B-4DF3-8E62-912E005143B8}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting.Tests", "src\AddIns\Misc\UnitTesting\Test\UnitTesting.Tests.csproj", "{44A8DE09-CAB9-49D8-9CFC-5EB0A552F181}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Boo", "Boo", "{97B3B514-AB0E-4FE1-89DE-8A945F5112AE}"
ProjectSection(SolutionItems) = postProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SourceAnalysis", "src\AddIns\Misc\SourceAnalysis\SourceAnalysis.csproj", "{CE498514-D12D-4B6E-AE0E-FEC29BD43748}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding.Tests", "src\AddIns\BackendBindings\Boo\BooBinding\Test\BooBinding.Tests.csproj", "{6FA16499-896F-4C02-BB43-1AF5C6C7C713}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage", "src\AddIns\Misc\CodeCoverage\Project\CodeCoverage.csproj", "{08CE9972-283B-44F4-82FA-966F7DFA6B7A}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding", "src\AddIns\BackendBindings\Boo\BooBinding\Project\BooBinding.csproj", "{4AC2D5F1-F671-480C-A075-6BF62B3721B2}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeAnalysis", "src\AddIns\Misc\CodeAnalysis\CodeAnalysis.csproj", "{3EAA45A9-735C-4AC7-A799-947B93EA449D}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter", "src\AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Project\NRefactoryToBooConverter.csproj", "{DBCF20A1-BA13-4582-BFA9-74DE4D987B73}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting", "src\AddIns\Misc\UnitTesting\UnitTesting.csproj", "{1F261725-6318-4434-A1B1-6C70CE4CD324}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter.Tests", "src\AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Test\NRefactoryToBooConverter.Tests.csproj", "{C9DE556D-325C-4544-B29F-16A9EB7C9830}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage.Tests", "src\AddIns\Misc\CodeCoverage\Test\CodeCoverage.Tests.csproj", "{A5C0E8F8-9D04-46ED-91D6-1DEF1575313B}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Python", "Python", "{CA76F702-5B4E-4918-B8D8-7FF8382434FF}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ComponentInspector", "ComponentInspector", "{D599885D-E161-4CCE-A66E-7A40C8C4F4CC}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding.Tests", "src\AddIns\BackendBindings\Python\PythonBinding\Test\PythonBinding.Tests.csproj", "{23B517C9-1ECC-4419-A13F-0B7136D085CB}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.AddIn", "src\AddIns\Misc\ComponentInspector\ComponentInspector.AddIn\ComponentInspector.AddIn.csproj", "{869951D5-A0D6-4DC6-9F1D-E6B9A12AC446}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks.Tests", "src\AddIns\BackendBindings\Python\Python.Build.Tasks\Test\Python.Build.Tasks.Tests.csproj", "{833904AB-3CD4-4071-9B48-5770E44685AA}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.Core", "src\AddIns\Misc\ComponentInspector\ComponentInspector.Core\ComponentInspector.Core.csproj", "{E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks", "src\AddIns\BackendBindings\Python\Python.Build.Tasks\Project\Python.Build.Tasks.csproj", "{D332F2D1-2CF1-43B7-903C-844BD5211A7E}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector", "src\AddIns\Misc\ComponentInspector\ComponentInspector\ComponentInspector.csproj", "{000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding", "src\AddIns\BackendBindings\Python\PythonBinding\Project\PythonBinding.csproj", "{8D732610-8FC6-43BA-94C9-7126FD7FE361}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Display Bindings", "Display Bindings", "{11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor.Tests", "src\AddIns\DisplayBindings\XmlEditor\Test\XmlEditor.Tests.csproj", "{FC0FE702-A87D-4D70-A9B6-1ECCD611125F}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILAsmBinding", "src\AddIns\BackendBindings\ILAsmBinding\Project\ILAsmBinding.csproj", "{6E59AF58-F635-459A-9A35-C9AC41C00339}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IconEditor", "IconEditor", "{0773ED53-08E2-4495-A3BE-CA0B5D413C15}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditorAddIn", "src\AddIns\DisplayBindings\IconEditor\IconEditorAddIn\IconEditorAddIn.csproj", "{DFB936AD-90EE-4B4F-941E-4F4A636F0D92}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding", "src\AddIns\BackendBindings\WixBinding\Project\WixBinding.csproj", "{E1B288A2-08EE-4318-8BBB-8AB72C69E33E}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditor", "src\AddIns\DisplayBindings\IconEditor\IconEditor\IconEditor.csproj", "{DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpBinding", "src\AddIns\BackendBindings\CSharpBinding\Project\CSharpBinding.csproj", "{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HexEditor", "src\AddIns\DisplayBindings\HexEditor\Project\HexEditor.csproj", "{E618A9CD-A39F-4925-A538-E8A3FEF24E54}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding", "src\AddIns\BackendBindings\VBNetBinding\Project\VBNetBinding.csproj", "{BF38FB72-B380-4196-AF8C-95749D726C61}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SettingsEditor", "src\AddIns\DisplayBindings\SettingsEditor\Project\SettingsEditor.csproj", "{85226AFB-CE71-4851-9A75-7EEC663A8E8A}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding", "src\AddIns\BackendBindings\XamlBinding\XamlBinding\XamlBinding.csproj", "{7C96B65D-28A5-4F28-A35B-8D83CE831EE8}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkflowDesigner", "src\AddIns\DisplayBindings\WorkflowDesigner\Project\WorkflowDesigner.csproj", "{533F4684-DBA6-4518-B005-C84F22A2DD57}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding.Tests", "src\AddIns\BackendBindings\XamlBinding\XamlBinding.Tests\XamlBinding.Tests.csproj", "{F390DA70-1FE1-4715-81A0-389AB010C130}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceEditor", "src\AddIns\DisplayBindings\ResourceEditor\Project\ResourceEditor.csproj", "{CBC6C247-747B-4908-B09A-4D2E0F640B6B}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding.Tests", "src\AddIns\BackendBindings\WixBinding\Test\WixBinding.Tests.csproj", "{388E7B64-0393-4EB4-A3E3-5C474F141853}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonEdit.AddIn", "src\AddIns\DisplayBindings\AvalonEdit.AddIn\AvalonEdit.AddIn.csproj", "{0162E499-42D0-409B-AA25-EED21F75336B}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debugger", "Debugger", "{CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor", "src\AddIns\DisplayBindings\XmlEditor\Project\XmlEditor.csproj", "{DCA2703D-250A-463E-A68A-07ED105AE6BD}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormsDesigner", "src\AddIns\DisplayBindings\FormsDesigner\Project\FormsDesigner.csproj", "{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ClassDiagram", "ClassDiagram", "{BFA3BF26-33BD-4A65-B84D-C7F30D131668}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Tests", "src\AddIns\Misc\Debugger\Debugger.Tests\Project\Debugger.Tests.csproj", "{A4C858C8-51B6-4265-A695-A20FCEBA1D19}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassCanvas", "src\AddIns\DisplayBindings\ClassDiagram\ClassCanvas\ClassCanvas.csproj", "{08F772A1-F0BE-433E-8B37-F6522953DB05}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Core", "src\AddIns\Misc\Debugger\Debugger.Core\Project\Debugger.Core.csproj", "{1D18D788-F7EE-4585-A23B-34DC8EC63CB8}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassDiagramAddin", "src\AddIns\DisplayBindings\ClassDiagram\ClassDiagramAddin\ClassDiagramAddin.csproj", "{5A1354DF-4989-4BB4-BC6B-D627C2E9FA13}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.AddIn", "src\AddIns\Misc\Debugger\Debugger.AddIn\Project\Debugger.AddIn.csproj", "{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Diagrams", "src\AddIns\DisplayBindings\ClassDiagram\DiagramRouter\Diagrams.csproj", "{0991423A-DBF6-4C89-B365-A1DF1EB32E42}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
@ -230,39 +252,37 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{F3662720-9 @@ -230,39 +252,37 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{F3662720-9
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShortcutsManagement", "src\AddIns\Misc\ShortcutsManagement\ShortcutsManagement\ShortcutsManagement.csproj", "{745869FF-80E9-4589-A366-E775D2103843}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace", "src\AddIns\Misc\SearchAndReplace\Project\SearchAndReplace.csproj", "{9196DD8A-B4D4-4780-8742-C5762E547FC2}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace.Tests", "src\AddIns\Misc\SearchAndReplace\Test\SearchAndReplace.Tests.csproj", "{A569DCC1-C608-45FD-B770-4F79335EF154}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReflectorAddIn", "src\AddIns\Misc\ReflectorAddIn\ReflectorAddIn\Project\ReflectorAddIn.csproj", "{8AA421C8-D7AF-4957-9F43-5135328ACB24}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceToolkit.Tests", "src\AddIns\Misc\ResourceToolkit\Test\ResourceToolkit.Tests.csproj", "{DD9AE6A5-2B9D-443A-BC71-38BE578C36BD}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartPage", "src\AddIns\Misc\StartPage\Project\StartPage.csproj", "{7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SubversionAddIn", "src\AddIns\Misc\SubversionAddIn\Project\SubversionAddIn.csproj", "{17F4D7E0-6933-4C2E-8714-FD7E98D625D5}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddInManager", "src\AddIns\Misc\AddInManager\Project\AddInManager.csproj", "{F93E52FD-DA66-4CE5-A0CB-BCD902811122}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpRefactoring", "src\AddIns\Misc\SharpRefactoring\SharpRefactoring.csproj", "{3CA90546-3B4C-4663-9445-C4E9371750A7}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinScout", "src\AddIns\Misc\AddinScout\Project\AddinScout.csproj", "{4B8F0F98-8BE1-402B-AA8B-C8D548577B38}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceToolkit", "src\AddIns\Misc\ResourceToolkit\Project\ResourceToolkit.csproj", "{461606BD-E824-4D0A-8CBA-01810B1F5E02}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FiletypeRegisterer", "src\AddIns\Misc\FiletypeRegisterer\Project\FiletypeRegisterer.csproj", "{D022A6CE-7438-41E8-AC64-F2DE18EC54C6}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegExpTk", "src\AddIns\Misc\RegExpTk\Project\RegExpTk.csproj", "{64A3E5E6-90BF-47F6-94DF-68C94B62C817}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HtmlHelp2", "src\AddIns\Misc\HtmlHelp2\Project\HtmlHelp2.csproj", "{918487B7-2153-4618-BBB3-344DBDDF2A2A}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PInvokeAddIn", "src\AddIns\Misc\PInvokeAddIn\Project\PInvokeAddIn.csproj", "{5EEB99CF-EA2B-4733-80A6-CE9192D68170}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
@ -272,170 +292,150 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "HtmlHelp2JScriptGlobals", " @@ -272,170 +292,150 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "HtmlHelp2JScriptGlobals", "
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PInvokeAddIn", "src\AddIns\Misc\PInvokeAddIn\Project\PInvokeAddIn.csproj", "{5EEB99CF-EA2B-4733-80A6-CE9192D68170}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HtmlHelp2", "src\AddIns\Misc\HtmlHelp2\Project\HtmlHelp2.csproj", "{918487B7-2153-4618-BBB3-344DBDDF2A2A}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegExpTk", "src\AddIns\Misc\RegExpTk\Project\RegExpTk.csproj", "{64A3E5E6-90BF-47F6-94DF-68C94B62C817}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FiletypeRegisterer", "src\AddIns\Misc\FiletypeRegisterer\Project\FiletypeRegisterer.csproj", "{D022A6CE-7438-41E8-AC64-F2DE18EC54C6}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceToolkit", "src\AddIns\Misc\ResourceToolkit\Project\ResourceToolkit.csproj", "{461606BD-E824-4D0A-8CBA-01810B1F5E02}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinScout", "src\AddIns\Misc\AddinScout\Project\AddinScout.csproj", "{4B8F0F98-8BE1-402B-AA8B-C8D548577B38}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpRefactoring", "src\AddIns\Misc\SharpRefactoring\SharpRefactoring.csproj", "{3CA90546-3B4C-4663-9445-C4E9371750A7}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddInManager", "src\AddIns\Misc\AddInManager\Project\AddInManager.csproj", "{F93E52FD-DA66-4CE5-A0CB-BCD902811122}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SubversionAddIn", "src\AddIns\Misc\SubversionAddIn\Project\SubversionAddIn.csproj", "{17F4D7E0-6933-4C2E-8714-FD7E98D625D5}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartPage", "src\AddIns\Misc\StartPage\Project\StartPage.csproj", "{7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceToolkit.Tests", "src\AddIns\Misc\ResourceToolkit\Test\ResourceToolkit.Tests.csproj", "{DD9AE6A5-2B9D-443A-BC71-38BE578C36BD}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReflectorAddIn", "src\AddIns\Misc\ReflectorAddIn\ReflectorAddIn\Project\ReflectorAddIn.csproj", "{8AA421C8-D7AF-4957-9F43-5135328ACB24}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace.Tests", "src\AddIns\Misc\SearchAndReplace\Test\SearchAndReplace.Tests.csproj", "{A569DCC1-C608-45FD-B770-4F79335EF154}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace", "src\AddIns\Misc\SearchAndReplace\Project\SearchAndReplace.csproj", "{9196DD8A-B4D4-4780-8742-C5762E547FC2}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Display Bindings", "Display Bindings", "{11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShortcutsManagement", "src\AddIns\Misc\ShortcutsManagement\ShortcutsManagement\ShortcutsManagement.csproj", "{745869FF-80E9-4589-A366-E775D2103843}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ClassDiagram", "ClassDiagram", "{BFA3BF26-33BD-4A65-B84D-C7F30D131668}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debugger", "Debugger", "{CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Diagrams", "src\AddIns\DisplayBindings\ClassDiagram\DiagramRouter\Diagrams.csproj", "{0991423A-DBF6-4C89-B365-A1DF1EB32E42}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.AddIn", "src\AddIns\Misc\Debugger\Debugger.AddIn\Project\Debugger.AddIn.csproj", "{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassDiagramAddin", "src\AddIns\DisplayBindings\ClassDiagram\ClassDiagramAddin\ClassDiagramAddin.csproj", "{5A1354DF-4989-4BB4-BC6B-D627C2E9FA13}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Core", "src\AddIns\Misc\Debugger\Debugger.Core\Project\Debugger.Core.csproj", "{1D18D788-F7EE-4585-A23B-34DC8EC63CB8}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassCanvas", "src\AddIns\DisplayBindings\ClassDiagram\ClassCanvas\ClassCanvas.csproj", "{08F772A1-F0BE-433E-8B37-F6522953DB05}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Tests", "src\AddIns\Misc\Debugger\Debugger.Tests\Project\Debugger.Tests.csproj", "{A4C858C8-51B6-4265-A695-A20FCEBA1D19}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormsDesigner", "src\AddIns\DisplayBindings\FormsDesigner\Project\FormsDesigner.csproj", "{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Language Bindings", "Language Bindings", "{E0646C25-36F2-4524-969F-FA621353AB94}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor", "src\AddIns\DisplayBindings\XmlEditor\Project\XmlEditor.csproj", "{DCA2703D-250A-463E-A68A-07ED105AE6BD}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding.Tests", "src\AddIns\BackendBindings\WixBinding\Test\WixBinding.Tests.csproj", "{388E7B64-0393-4EB4-A3E3-5C474F141853}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonEdit.AddIn", "src\AddIns\DisplayBindings\AvalonEdit.AddIn\AvalonEdit.AddIn.csproj", "{0162E499-42D0-409B-AA25-EED21F75336B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding.Tests", "src\AddIns\BackendBindings\XamlBinding\XamlBinding.Tests\XamlBinding.Tests.csproj", "{F390DA70-1FE1-4715-81A0-389AB010C130}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceEditor", "src\AddIns\DisplayBindings\ResourceEditor\Project\ResourceEditor.csproj", "{CBC6C247-747B-4908-B09A-4D2E0F640B6B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding", "src\AddIns\BackendBindings\XamlBinding\XamlBinding\XamlBinding.csproj", "{7C96B65D-28A5-4F28-A35B-8D83CE831EE8}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkflowDesigner", "src\AddIns\DisplayBindings\WorkflowDesigner\Project\WorkflowDesigner.csproj", "{533F4684-DBA6-4518-B005-C84F22A2DD57}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding", "src\AddIns\BackendBindings\VBNetBinding\Project\VBNetBinding.csproj", "{BF38FB72-B380-4196-AF8C-95749D726C61}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SettingsEditor", "src\AddIns\DisplayBindings\SettingsEditor\Project\SettingsEditor.csproj", "{85226AFB-CE71-4851-9A75-7EEC663A8E8A}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpBinding", "src\AddIns\BackendBindings\CSharpBinding\Project\CSharpBinding.csproj", "{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HexEditor", "src\AddIns\DisplayBindings\HexEditor\Project\HexEditor.csproj", "{E618A9CD-A39F-4925-A538-E8A3FEF24E54}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding", "src\AddIns\BackendBindings\WixBinding\Project\WixBinding.csproj", "{E1B288A2-08EE-4318-8BBB-8AB72C69E33E}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IconEditor", "IconEditor", "{0773ED53-08E2-4495-A3BE-CA0B5D413C15}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditor", "src\AddIns\DisplayBindings\IconEditor\IconEditor\IconEditor.csproj", "{DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILAsmBinding", "src\AddIns\BackendBindings\ILAsmBinding\Project\ILAsmBinding.csproj", "{6E59AF58-F635-459A-9A35-C9AC41C00339}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditorAddIn", "src\AddIns\DisplayBindings\IconEditor\IconEditorAddIn\IconEditorAddIn.csproj", "{DFB936AD-90EE-4B4F-941E-4F4A636F0D92}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Python", "Python", "{CA76F702-5B4E-4918-B8D8-7FF8382434FF}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor.Tests", "src\AddIns\DisplayBindings\XmlEditor\Test\XmlEditor.Tests.csproj", "{FC0FE702-A87D-4D70-A9B6-1ECCD611125F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding", "src\AddIns\BackendBindings\Python\PythonBinding\Project\PythonBinding.csproj", "{8D732610-8FC6-43BA-94C9-7126FD7FE361}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ComponentInspector", "ComponentInspector", "{D599885D-E161-4CCE-A66E-7A40C8C4F4CC}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector", "src\AddIns\Misc\ComponentInspector\ComponentInspector\ComponentInspector.csproj", "{000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks", "src\AddIns\BackendBindings\Python\Python.Build.Tasks\Project\Python.Build.Tasks.csproj", "{D332F2D1-2CF1-43B7-903C-844BD5211A7E}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.Core", "src\AddIns\Misc\ComponentInspector\ComponentInspector.Core\ComponentInspector.Core.csproj", "{E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks.Tests", "src\AddIns\BackendBindings\Python\Python.Build.Tasks\Test\Python.Build.Tasks.Tests.csproj", "{833904AB-3CD4-4071-9B48-5770E44685AA}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.AddIn", "src\AddIns\Misc\ComponentInspector\ComponentInspector.AddIn\ComponentInspector.AddIn.csproj", "{869951D5-A0D6-4DC6-9F1D-E6B9A12AC446}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding.Tests", "src\AddIns\BackendBindings\Python\PythonBinding\Test\PythonBinding.Tests.csproj", "{23B517C9-1ECC-4419-A13F-0B7136D085CB}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Analysis", "Analysis", "{F355E45F-F54F-4B42-8916-9A633A392789}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Boo", "Boo", "{97B3B514-AB0E-4FE1-89DE-8A945F5112AE}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage.Tests", "src\AddIns\Misc\CodeCoverage\Test\CodeCoverage.Tests.csproj", "{A5C0E8F8-9D04-46ED-91D6-1DEF1575313B}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting", "src\AddIns\Misc\UnitTesting\UnitTesting.csproj", "{1F261725-6318-4434-A1B1-6C70CE4CD324}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter.Tests", "src\AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Test\NRefactoryToBooConverter.Tests.csproj", "{C9DE556D-325C-4544-B29F-16A9EB7C9830}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeAnalysis", "src\AddIns\Misc\CodeAnalysis\CodeAnalysis.csproj", "{3EAA45A9-735C-4AC7-A799-947B93EA449D}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter", "src\AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Project\NRefactoryToBooConverter.csproj", "{DBCF20A1-BA13-4582-BFA9-74DE4D987B73}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage", "src\AddIns\Misc\CodeCoverage\Project\CodeCoverage.csproj", "{08CE9972-283B-44F4-82FA-966F7DFA6B7A}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding", "src\AddIns\BackendBindings\Boo\BooBinding\Project\BooBinding.csproj", "{4AC2D5F1-F671-480C-A075-6BF62B3721B2}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SourceAnalysis", "src\AddIns\Misc\SourceAnalysis\SourceAnalysis.csproj", "{CE498514-D12D-4B6E-AE0E-FEC29BD43748}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding.Tests", "src\AddIns\BackendBindings\Boo\BooBinding\Test\BooBinding.Tests.csproj", "{6FA16499-896F-4C02-BB43-1AF5C6C7C713}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting.Tests", "src\AddIns\Misc\UnitTesting\Test\UnitTesting.Tests.csproj", "{44A8DE09-CAB9-49D8-9CFC-5EB0A552F181}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding.Tests", "src\AddIns\BackendBindings\VBNetBinding\Test\VBNetBinding.Tests.csproj", "{50A89267-A28B-4DF3-8E62-912E005143B8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -768,95 +768,95 @@ Global @@ -768,95 +768,95 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{FFA7988E-7348-4669-9E9D-27E629C873A2} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{1152B71B-3C05-4598-B20D-823B5D40559E} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{8035765F-D51F-4A0C-A746-2FD100E19419} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{2748AD25-9C63-4E12-877B-4DCE96FBED54} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{80318B5F-A25D-45AB-8A95-EF31D2370A4C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{4980B743-B32F-4aba-AABD-45E2CAD3568D} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{7DB80259-24D4-46C3-A024-53FF1987733D} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{DDE2A481-8271-4EAC-A330-8FA6A38D13D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{E73BB233-D88B-44A7-A98F-D71EE158381D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{4139CCF6-FB49-4A9D-B2CF-331E9EA3198D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{2FF700C2-A38A-48BD-A637-8CAFD4FE6237} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{4980B743-B32F-4aba-AABD-45E2CAD3568D} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{80318B5F-A25D-45AB-8A95-EF31D2370A4C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{2748AD25-9C63-4E12-877B-4DCE96FBED54} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{8035765F-D51F-4A0C-A746-2FD100E19419} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{1152B71B-3C05-4598-B20D-823B5D40559E} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{FFA7988E-7348-4669-9E9D-27E629C873A2} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}
{B22522AA-B5BF-4A58-AC6D-D4B45805521F} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}
{E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{2FF700C2-A38A-48BD-A637-8CAFD4FE6237} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{4139CCF6-FB49-4A9D-B2CF-331E9EA3198D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{E73BB233-D88B-44A7-A98F-D71EE158381D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{DDE2A481-8271-4EAC-A330-8FA6A38D13D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{870115DD-960A-4406-A6B9-600BCDC36A03} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}
{F355E45F-F54F-4B42-8916-9A633A392789} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{D599885D-E161-4CCE-A66E-7A40C8C4F4CC} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{F3662720-9EA2-4591-BBC6-97361DCE50A9} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{B22522AA-B5BF-4A58-AC6D-D4B45805521F} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}
{E0646C25-36F2-4524-969F-FA621353AB94} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{388E7B64-0393-4EB4-A3E3-5C474F141853} = {E0646C25-36F2-4524-969F-FA621353AB94}
{F390DA70-1FE1-4715-81A0-389AB010C130} = {E0646C25-36F2-4524-969F-FA621353AB94}
{7C96B65D-28A5-4F28-A35B-8D83CE831EE8} = {E0646C25-36F2-4524-969F-FA621353AB94}
{BF38FB72-B380-4196-AF8C-95749D726C61} = {E0646C25-36F2-4524-969F-FA621353AB94}
{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A} = {E0646C25-36F2-4524-969F-FA621353AB94}
{E1B288A2-08EE-4318-8BBB-8AB72C69E33E} = {E0646C25-36F2-4524-969F-FA621353AB94}
{6E59AF58-F635-459A-9A35-C9AC41C00339} = {E0646C25-36F2-4524-969F-FA621353AB94}
{CA76F702-5B4E-4918-B8D8-7FF8382434FF} = {E0646C25-36F2-4524-969F-FA621353AB94}
{97B3B514-AB0E-4FE1-89DE-8A945F5112AE} = {E0646C25-36F2-4524-969F-FA621353AB94}
{50A89267-A28B-4DF3-8E62-912E005143B8} = {E0646C25-36F2-4524-969F-FA621353AB94}
{C9DE556D-325C-4544-B29F-16A9EB7C9830} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
{DBCF20A1-BA13-4582-BFA9-74DE4D987B73} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
{4AC2D5F1-F671-480C-A075-6BF62B3721B2} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
{6FA16499-896F-4C02-BB43-1AF5C6C7C713} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
{8D732610-8FC6-43BA-94C9-7126FD7FE361} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
{D332F2D1-2CF1-43B7-903C-844BD5211A7E} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
{833904AB-3CD4-4071-9B48-5770E44685AA} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
{23B517C9-1ECC-4419-A13F-0B7136D085CB} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}
{1D18D788-F7EE-4585-A23B-34DC8EC63CB8} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}
{A4C858C8-51B6-4265-A695-A20FCEBA1D19} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}
{A569DCC1-C608-45FD-B770-4F79335EF154} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{DD9AE6A5-2B9D-443A-BC71-38BE578C36BD} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{17F4D7E0-6933-4C2E-8714-FD7E98D625D5} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{3CA90546-3B4C-4663-9445-C4E9371750A7} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{461606BD-E824-4D0A-8CBA-01810B1F5E02} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{64A3E5E6-90BF-47F6-94DF-68C94B62C817} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{5EEB99CF-EA2B-4733-80A6-CE9192D68170} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{E54A5AD2-418D-4A85-BA5E-CD803DE38715} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{918487B7-2153-4618-BBB3-344DBDDF2A2A} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{D022A6CE-7438-41E8-AC64-F2DE18EC54C6} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{4B8F0F98-8BE1-402B-AA8B-C8D548577B38} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{F93E52FD-DA66-4CE5-A0CB-BCD902811122} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{8AA421C8-D7AF-4957-9F43-5135328ACB24} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{9196DD8A-B4D4-4780-8742-C5762E547FC2} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{745869FF-80E9-4589-A366-E775D2103843} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{FC0FE702-A87D-4D70-A9B6-1ECCD611125F} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{0773ED53-08E2-4495-A3BE-CA0B5D413C15} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{E618A9CD-A39F-4925-A538-E8A3FEF24E54} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{85226AFB-CE71-4851-9A75-7EEC663A8E8A} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{533F4684-DBA6-4518-B005-C84F22A2DD57} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{CBC6C247-747B-4908-B09A-4D2E0F640B6B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{0162E499-42D0-409B-AA25-EED21F75336B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{DCA2703D-250A-463E-A68A-07ED105AE6BD} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{F3662720-9EA2-4591-BBC6-97361DCE50A9} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{D599885D-E161-4CCE-A66E-7A40C8C4F4CC} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{F355E45F-F54F-4B42-8916-9A633A392789} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{A5C0E8F8-9D04-46ED-91D6-1DEF1575313B} = {F355E45F-F54F-4B42-8916-9A633A392789}
{1F261725-6318-4434-A1B1-6C70CE4CD324} = {F355E45F-F54F-4B42-8916-9A633A392789}
{3EAA45A9-735C-4AC7-A799-947B93EA449D} = {F355E45F-F54F-4B42-8916-9A633A392789}
{08CE9972-283B-44F4-82FA-966F7DFA6B7A} = {F355E45F-F54F-4B42-8916-9A633A392789}
{CE498514-D12D-4B6E-AE0E-FEC29BD43748} = {F355E45F-F54F-4B42-8916-9A633A392789}
{44A8DE09-CAB9-49D8-9CFC-5EB0A552F181} = {F355E45F-F54F-4B42-8916-9A633A392789}
{000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC}
{E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC}
{869951D5-A0D6-4DC6-9F1D-E6B9A12AC446} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC}
{BFA3BF26-33BD-4A65-B84D-C7F30D131668} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{08F772A1-F0BE-433E-8B37-F6522953DB05} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668}
{5A1354DF-4989-4BB4-BC6B-D627C2E9FA13} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668}
{0991423A-DBF6-4C89-B365-A1DF1EB32E42} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668}
{DFB936AD-90EE-4B4F-941E-4F4A636F0D92} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15}
{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{DCA2703D-250A-463E-A68A-07ED105AE6BD} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{0162E499-42D0-409B-AA25-EED21F75336B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{CBC6C247-747B-4908-B09A-4D2E0F640B6B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{533F4684-DBA6-4518-B005-C84F22A2DD57} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{85226AFB-CE71-4851-9A75-7EEC663A8E8A} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{E618A9CD-A39F-4925-A538-E8A3FEF24E54} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{0773ED53-08E2-4495-A3BE-CA0B5D413C15} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{FC0FE702-A87D-4D70-A9B6-1ECCD611125F} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15}
{869951D5-A0D6-4DC6-9F1D-E6B9A12AC446} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC}
{E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC}
{000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC}
{44A8DE09-CAB9-49D8-9CFC-5EB0A552F181} = {F355E45F-F54F-4B42-8916-9A633A392789}
{CE498514-D12D-4B6E-AE0E-FEC29BD43748} = {F355E45F-F54F-4B42-8916-9A633A392789}
{08CE9972-283B-44F4-82FA-966F7DFA6B7A} = {F355E45F-F54F-4B42-8916-9A633A392789}
{3EAA45A9-735C-4AC7-A799-947B93EA449D} = {F355E45F-F54F-4B42-8916-9A633A392789}
{1F261725-6318-4434-A1B1-6C70CE4CD324} = {F355E45F-F54F-4B42-8916-9A633A392789}
{A5C0E8F8-9D04-46ED-91D6-1DEF1575313B} = {F355E45F-F54F-4B42-8916-9A633A392789}
{DFB936AD-90EE-4B4F-941E-4F4A636F0D92} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15}
{0991423A-DBF6-4C89-B365-A1DF1EB32E42} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668}
{5A1354DF-4989-4BB4-BC6B-D627C2E9FA13} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668}
{08F772A1-F0BE-433E-8B37-F6522953DB05} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668}
{745869FF-80E9-4589-A366-E775D2103843} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{9196DD8A-B4D4-4780-8742-C5762E547FC2} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{8AA421C8-D7AF-4957-9F43-5135328ACB24} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{F93E52FD-DA66-4CE5-A0CB-BCD902811122} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{4B8F0F98-8BE1-402B-AA8B-C8D548577B38} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{D022A6CE-7438-41E8-AC64-F2DE18EC54C6} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{918487B7-2153-4618-BBB3-344DBDDF2A2A} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{E54A5AD2-418D-4A85-BA5E-CD803DE38715} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{5EEB99CF-EA2B-4733-80A6-CE9192D68170} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{64A3E5E6-90BF-47F6-94DF-68C94B62C817} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{461606BD-E824-4D0A-8CBA-01810B1F5E02} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{3CA90546-3B4C-4663-9445-C4E9371750A7} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{17F4D7E0-6933-4C2E-8714-FD7E98D625D5} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{DD9AE6A5-2B9D-443A-BC71-38BE578C36BD} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{A569DCC1-C608-45FD-B770-4F79335EF154} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{A4C858C8-51B6-4265-A695-A20FCEBA1D19} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}
{1D18D788-F7EE-4585-A23B-34DC8EC63CB8} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}
{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}
{50A89267-A28B-4DF3-8E62-912E005143B8} = {E0646C25-36F2-4524-969F-FA621353AB94}
{97B3B514-AB0E-4FE1-89DE-8A945F5112AE} = {E0646C25-36F2-4524-969F-FA621353AB94}
{CA76F702-5B4E-4918-B8D8-7FF8382434FF} = {E0646C25-36F2-4524-969F-FA621353AB94}
{6E59AF58-F635-459A-9A35-C9AC41C00339} = {E0646C25-36F2-4524-969F-FA621353AB94}
{E1B288A2-08EE-4318-8BBB-8AB72C69E33E} = {E0646C25-36F2-4524-969F-FA621353AB94}
{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A} = {E0646C25-36F2-4524-969F-FA621353AB94}
{BF38FB72-B380-4196-AF8C-95749D726C61} = {E0646C25-36F2-4524-969F-FA621353AB94}
{7C96B65D-28A5-4F28-A35B-8D83CE831EE8} = {E0646C25-36F2-4524-969F-FA621353AB94}
{F390DA70-1FE1-4715-81A0-389AB010C130} = {E0646C25-36F2-4524-969F-FA621353AB94}
{388E7B64-0393-4EB4-A3E3-5C474F141853} = {E0646C25-36F2-4524-969F-FA621353AB94}
{23B517C9-1ECC-4419-A13F-0B7136D085CB} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
{833904AB-3CD4-4071-9B48-5770E44685AA} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
{D332F2D1-2CF1-43B7-903C-844BD5211A7E} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
{8D732610-8FC6-43BA-94C9-7126FD7FE361} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
{6FA16499-896F-4C02-BB43-1AF5C6C7C713} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
{4AC2D5F1-F671-480C-A075-6BF62B3721B2} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
{DBCF20A1-BA13-4582-BFA9-74DE4D987B73} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
{C9DE556D-325C-4544-B29F-16A9EB7C9830} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
EndGlobalSection
EndGlobal

2
src/AddIns/Misc/SearchAndReplace/Project/Gui/SearchAndReplaceDialog.cs

@ -168,7 +168,7 @@ namespace SearchAndReplace @@ -168,7 +168,7 @@ namespace SearchAndReplace
Keys[] GetKeyBoardShortcut(string routedCommandName)
{
var template = new BindingInfoTemplate { RoutedCommandName = routedCommandName};
var template = new BindingInfoTemplate { RoutedCommandName = routedCommandName };
var gestureCollection = SDCommandManager.FindInputGestures(BindingInfoMatchType.SuperSet, template);
var keyCollection = new Keys[gestureCollection.Count];

55
src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingGroup.cs

@ -6,6 +6,7 @@ using System.Collections.Specialized; @@ -6,6 +6,7 @@ using System.Collections.Specialized;
using System.ComponentModel;
using System.Windows;
using System.Windows.Input;
using SDCommandManager=ICSharpCode.Core.Presentation.CommandManager;
namespace ICSharpCode.Core.Presentation
@ -17,7 +18,7 @@ namespace ICSharpCode.Core.Presentation @@ -17,7 +18,7 @@ namespace ICSharpCode.Core.Presentation
{
private HashSet<WeakReference> _attachedInstances = new HashSet<WeakReference>(new WeakReferenceEqualirtyComparer());
private List<BindingGroup> _nestedGroups = new List<BindingGroup>();
private BindingGroupCollection _nestedGroups = new BindingGroupCollection();
public string Name
{
@ -67,44 +68,12 @@ namespace ICSharpCode.Core.Presentation @@ -67,44 +68,12 @@ namespace ICSharpCode.Core.Presentation
private void InvokeBindingUpdateHandlers(UIElement instance, bool attaching)
{
var type = instance.GetType();
// Invoke class wide and instance update handlers
var instanceNames = CommandManager.GetUIElementNameCollection(instance);
var typeNames = CommandManager.GetUITypeNameCollection(type);
var bindingInfoTemplates = new IBindingInfoTemplate[instanceNames.Count + typeNames.Count + 1];
var i = 0;
bindingInfoTemplates[i++] = new BindingInfoTemplate { Groups = new BindingGroupCollection { this } };
foreach(var instanceName in instanceNames) {
bindingInfoTemplates[i++] = new BindingInfoTemplate { OwnerInstanceName = instanceName};
}
foreach(var typeName in typeNames) {
bindingInfoTemplates[i++] = new BindingInfoTemplate { OwnerTypeName = typeName};
}
var args = new BindingsUpdatedHandlerArgs();
if(attaching) {
args.AddedInstances = new List<UIElement>{ instance };
} else {
args.RemovedInstances = new List<UIElement>{ instance };
}
CommandManager.InvokeCommandBindingUpdateHandlers(
this,
args,
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
bindingInfoTemplates);
CommandManager.InvokeInputBindingUpdateHandlers(
this,
args,
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
bindingInfoTemplates);
SDCommandManager.InvokeBindingsChanged(
this,
new NotifyBindingsChangedEventArgs(
NotifyBindingsChangedAction.GroupAttachmendsModified,
FlatNestedGroups,
new []{instance}));
}
public ICollection<UIElement> GetAttachedInstances(ICollection<Type> types)
@ -137,20 +106,22 @@ namespace ICSharpCode.Core.Presentation @@ -137,20 +106,22 @@ namespace ICSharpCode.Core.Presentation
return attachedInstances;
}
public List<BindingGroup> NestedGroups
public BindingGroupCollection NestedGroups
{
get {
return _nestedGroups;
}
}
public ICollection<BindingGroup> FlatNestedGroups
public BindingGroupCollection FlatNestedGroups
{
get {
var foundNestedGroups = new HashSet<BindingGroup>();
FlattenNestedGroups(this, foundNestedGroups);
return foundNestedGroups;
var groups = new BindingGroupCollection();
groups.AddRange(foundNestedGroups);
return groups;
}
}

131
src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingInfoBase.cs

@ -27,10 +27,36 @@ namespace ICSharpCode.Core.Presentation @@ -27,10 +27,36 @@ namespace ICSharpCode.Core.Presentation
throw new ArgumentNullException("value");
}
var oldGroups = _groups;
_groups = value;
SetCollectionChanged<BindingGroup>(oldGroups, value, Groups_CollectionChanged);
}
}
private void Groups_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) {
if(IsRegistered) {
var modifiedGroups = new BindingGroupCollection();
if(e.NewItems != null) {
modifiedGroups.AddRange(e.NewItems.Cast<BindingGroup>());
}
if(e.OldItems != null) {
modifiedGroups.AddRange(e.OldItems.Cast<BindingGroup>());
}
ICollection<UIElement> attachedInstances = null;
if(OwnerInstanceName != null) {
attachedInstances = modifiedGroups.FlatNesteGroups.GetAttachedInstances(OwnerInstances);
} else {
attachedInstances = modifiedGroups.FlatNesteGroups.GetAttachedInstances(OwnerTypes);
}
SDCommandManager.InvokeBindingsChanged(this, new NotifyBindingsChangedEventArgs(NotifyBindingsChangedAction.GroupAttachmendsModified, modifiedGroups, attachedInstances));
}
}
public string _ownerInstanceName;
/// <summary>
@ -138,7 +164,7 @@ namespace ICSharpCode.Core.Presentation @@ -138,7 +164,7 @@ namespace ICSharpCode.Core.Presentation
/// Routed command instance which will be invoked when this binding is triggered
/// </summary>
public RoutedUICommand RoutedCommand {
get {
get {
return SDCommandManager.GetRoutedUICommand(RoutedCommandName);
}
}
@ -155,17 +181,6 @@ namespace ICSharpCode.Core.Presentation @@ -155,17 +181,6 @@ namespace ICSharpCode.Core.Presentation
get; set;
}
public InputBindingIdentifier Identifier {
get {
var identifier = new InputBindingIdentifier();
identifier.OwnerInstanceName = OwnerInstanceName;
identifier.OwnerTypeName = OwnerTypeName;
identifier.RoutedCommandName = RoutedCommandName;
return identifier;
}
}
public void SetCollectionChanged<T>(IObservableCollection<T> oldObservableCollection, IObservableCollection<T> newObservableCollection, NotifyCollectionChangedEventHandler handler)
{
newObservableCollection.CollectionChanged += handler;
@ -187,84 +202,48 @@ namespace ICSharpCode.Core.Presentation @@ -187,84 +202,48 @@ namespace ICSharpCode.Core.Presentation
}
}
private BindingsUpdatedHandler defaultCommandBindingHandler;
/// <summary>
/// Updates owner bindings
/// </summary>
public BindingsUpdatedHandler DefaultBindingsUpdateHandler
public void BindingsChangedHandler(object sender, NotifyBindingsChangedEventArgs args)
{
get {
if(defaultCommandBindingHandler == null && OwnerTypeName != null) {
defaultCommandBindingHandler = delegate(object sender, BindingsUpdatedHandlerArgs args) {
var ownerTypes = OwnerTypes;
if(RoutedCommand != null && OwnerTypes != null && IsRegistered) {
GenerateBindings();
if(Groups.Count == 0) {
var groupInstances = Groups.GetAttachedInstances(ownerTypes);
SetInstanceBindings(groupInstances, null);
var removedOwnerTypes = new List<Type>(ownerTypes);
if(args.RemovedTypes != null) {
removedOwnerTypes.AddRange(args.RemovedTypes);
}
SetClassBindings(removedOwnerTypes, ownerTypes);
} else {
SetClassBindings(ownerTypes, null);
var groupInstances = Groups.GetAttachedInstances(ownerTypes);
var removedOwnerInstances = new List<UIElement>(groupInstances);
if(args.RemovedInstances != null) {
removedOwnerInstances.AddRange(args.RemovedInstances);
}
SetInstanceBindings(removedOwnerInstances, groupInstances);
}
}
};
} else if(defaultCommandBindingHandler == null && OwnerInstanceName != null) {
defaultCommandBindingHandler = delegate(object sender, BindingsUpdatedHandlerArgs args) {
if(RoutedCommand != null && OwnerInstances != null && IsRegistered) {
GenerateBindings();
if(Groups.Count == 0) {
SetInstanceBindings(OwnerInstances, OwnerInstances);
} else {
var removedInstances = new List<UIElement>(OwnerInstances);
if(args.RemovedInstances != null) {
removedInstances.AddRange(args.RemovedInstances);
}
SetInstanceBindings(removedInstances, Groups.GetAttachedInstances(OwnerInstances));
}
}
};
}
if(!IsRegistered || RoutedCommand == null || (OwnerTypes == null && OwnerInstances == null)) {
return;
}
if( (args.Action == NotifyBindingsChangedAction.BindingInfoModified && args.ModifiedBindingInfoTemplates.Contains(new BindingInfoTemplate(this, false)))
|| (args.Action == NotifyBindingsChangedAction.NamedInstanceModified && OwnerInstanceName == args.UIElementName)
|| (args.Action == NotifyBindingsChangedAction.RoutedUICommandModified && routedCommandName == args.RoutedCommandName)
|| (args.Action == NotifyBindingsChangedAction.NamedTypeModified && OwnerTypeName == args.TypeName)
|| (args.Action == NotifyBindingsChangedAction.GroupAttachmendsModified && ((OwnerTypeName != null && OwnerTypes.Any(t1 => args.AttachedInstances.Any(t2 => t1 == t2.GetType())))
|| (OwnerInstanceName != null && OwnerInstances.Any(t1 => args.AttachedInstances.Any(t2 => t1 == t2)))))
) {
GenerateBindings();
return defaultCommandBindingHandler;
if(OwnerInstanceName != null) {
SetInstanceBindings(Groups.Count == 0 ? OwnerInstances : Groups.GetAttachedInstances(OwnerInstances));
} else {
if(Groups.Count == 0) {
SetInstanceBindings(null);
SetClassBindings(OwnerTypes);
} else {
SetClassBindings(null);
SetInstanceBindings(Groups.GetAttachedInstances(OwnerTypes));
}
}
}
}
public void RemoveActiveBindings()
{
if(OwnerTypeName != null) {
if(Groups.Count > 0) {
SetInstanceBindings(Groups.GetAttachedInstances(OwnerTypes), null);
}
SetClassBindings(OwnerTypes, null);
} else if(OwnerInstanceName != null) {
SetInstanceBindings(OwnerInstances, null);
}
SetInstanceBindings(null);
SetClassBindings(null);
}
protected abstract void GenerateBindings();
protected abstract void SetInstanceBindings(ICollection<UIElement> oldInstances, ICollection<UIElement> newInstances);
protected abstract void SetInstanceBindings(ICollection<UIElement> newInstances);
protected abstract void SetClassBindings(ICollection<Type> oldTypes, ICollection<Type> newtTypes);
protected abstract void SetClassBindings(ICollection<Type> newtTypes);
}
}

8
src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingInfoTemplate.cs

@ -34,6 +34,14 @@ namespace ICSharpCode.Core.Presentation @@ -34,6 +34,14 @@ namespace ICSharpCode.Core.Presentation
}
public BindingInfoTemplate(InputBindingIdentifier identifier)
{
OwnerInstanceName = identifier.OwnerInstanceName;
OwnerTypeName = identifier.OwnerTypeName;
RoutedCommandName = identifier.RoutedCommandName;
}
public BindingInfoTemplate(IBindingInfoTemplate template, bool includeGroup)
{
OwnerInstanceName = template.OwnerInstanceName;

48
src/Main/ICSharpCode.Core.Presentation/CommandsService/CommandBindingInfo.cs

@ -26,38 +26,6 @@ namespace ICSharpCode.Core.Presentation @@ -26,38 +26,6 @@ namespace ICSharpCode.Core.Presentation
Groups = new BindingGroupCollection();
}
public BindingGroupCollection Groups
{
get {
return base.Groups;
}
set {
var oldGroups = base.Groups;
base.Groups = value;
SetCollectionChanged<BindingGroup>(oldGroups, value, Groups_CollectionChanged);
}
}
private void Groups_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) {
if(IsRegistered) {
var modifiedGroups = new BindingGroupCollection();
if(e.NewItems != null) {
modifiedGroups.AddRange(e.NewItems.Cast<BindingGroup>());
}
if(e.OldItems != null) {
modifiedGroups.AddRange(e.OldItems.Cast<BindingGroup>());
}
SDCommandManager.InvokeCommandBindingUpdateHandlers(
this,
new BindingsUpdatedHandlerArgs(),
BindingInfoMatchType.SubSet,
new BindingInfoTemplate(this, false) { Groups = modifiedGroups });
}
}
private string commandTypeName;
/// <summary>
@ -164,8 +132,10 @@ namespace ICSharpCode.Core.Presentation @@ -164,8 +132,10 @@ namespace ICSharpCode.Core.Presentation
}
}
protected override void SetInstanceBindings(ICollection<UIElement> newInstances, ICollection<UIElement> oldInstances)
{
List<UIElement> oldInstances;
protected override void SetInstanceBindings(ICollection<UIElement> newInstances)
{
if(oldInstances != null) {
foreach(var ownerInstance in oldInstances) {
foreach(CommandBinding binding in OldCommandBindings) {
@ -174,14 +144,19 @@ namespace ICSharpCode.Core.Presentation @@ -174,14 +144,19 @@ namespace ICSharpCode.Core.Presentation
}
}
oldInstances = new List<UIElement>();
if(newInstances != null) {
foreach(var ownerInstance in newInstances) {
ownerInstance.CommandBindings.AddRange(ActiveCommandBindings);
oldInstances.Add(ownerInstance);
}
}
}
protected override void SetClassBindings(ICollection<Type> oldTypes, ICollection<Type> newTypes)
List<Type> oldTypes;
protected override void SetClassBindings(ICollection<Type> newTypes)
{
if(oldTypes != null) {
foreach(var ownerType in oldTypes) {
@ -191,10 +166,13 @@ namespace ICSharpCode.Core.Presentation @@ -191,10 +166,13 @@ namespace ICSharpCode.Core.Presentation
}
}
oldTypes = new List<Type>();
if(newTypes != null) {
foreach(var ownerType in newTypes) {
foreach(CommandBinding binding in ActiveCommandBindings) {
System.Windows.Input.CommandManager.RegisterClassCommandBinding(ownerType, binding);
oldTypes.Add(ownerType);
}
}
}

344
src/Main/ICSharpCode.Core.Presentation/CommandsService/CommandManager.cs

@ -34,19 +34,15 @@ namespace ICSharpCode.Core.Presentation @@ -34,19 +34,15 @@ namespace ICSharpCode.Core.Presentation
}
// Binding infos
private static BindingInfoTemplateDictionary<IBindingInfo> commandBindings = new BindingInfoTemplateDictionary<IBindingInfo>();
private static BindingInfoTemplateDictionary<IBindingInfo> inputBidnings = new BindingInfoTemplateDictionary<IBindingInfo>();
// Binding update handlers
private static BindingInfoTemplateDictionary<BindingsUpdatedHandler> inputBindingUpdatedHandlers = new BindingInfoTemplateDictionary<BindingsUpdatedHandler>();
private static BindingInfoTemplateDictionary<BindingsUpdatedHandler> commandBindingUpdatedHandlers = new BindingInfoTemplateDictionary<BindingsUpdatedHandler>();
private static BindingInfoTemplateDictionary<BindingInfoBase> commandBindings = new BindingInfoTemplateDictionary<BindingInfoBase>();
private static BindingInfoTemplateDictionary<BindingInfoBase> inputBidnings = new BindingInfoTemplateDictionary<BindingInfoBase>();
// Commands
private static Dictionary<string, RoutedUICommand> routedCommands = new Dictionary<string, RoutedUICommand>();
internal static Dictionary<string, System.Windows.Input.ICommand> commands = new Dictionary<string, System.Windows.Input.ICommand>();
// Named instances and types
private static RelationshipMap<string, WeakReference> namedUIInstances;
private static RelationshipMap<string, WeakReference> namedUIInstances = new RelationshipMap<string, WeakReference>(null, new WeakReferenceEqualirtyComparer());
private static RelationshipMap<string, Type> namedUITypes = new RelationshipMap<string, Type>();
// Categories
@ -54,7 +50,73 @@ namespace ICSharpCode.Core.Presentation @@ -54,7 +50,73 @@ namespace ICSharpCode.Core.Presentation
static CommandManager()
{
namedUIInstances = new RelationshipMap<string, WeakReference>(null, new WeakReferenceEqualirtyComparer());
// Load gestures profile first
var path = PropertyService.Get("ICSharpCode.Core.Presentation.UserDefinedGesturesManager.UserGestureProfilesDirectory");
if(path != null && File.Exists(path)) {
var profile = new UserGesturesProfile();
profile.Path = path;
profile.Load();
UserDefinedGesturesManager.CurrentProfile = profile;
}
UserDefinedGesturesManager.CurrentProfileChanged += UserDefinedGesturesManager_CurrentProfileChanged;
}
static void UserDefinedGesturesManager_CurrentProfileChanged(object sender, NotifyUserGestureProfileChangedEventArgs args)
{
var changedGestures = new Dictionary<InputBindingIdentifier, Tuple<InputGestureCollection, InputGestureCollection>>();
if(args.OldProfile != null) {
args.OldProfile.GesturesChanged -= Profile_GesturesChanged;
foreach(var pair in args.OldProfile) {
changedGestures.Add(pair.Key, new Tuple<InputGestureCollection, InputGestureCollection>(pair.Value, null));
}
}
if(args.NewProfile != null) {
args.NewProfile.GesturesChanged += Profile_GesturesChanged;
foreach(var pair in args.NewProfile) {
InputGestureCollection item1 = null;
if(!changedGestures.ContainsKey(pair.Key)) {
changedGestures.Add(pair.Key, new Tuple<InputGestureCollection, InputGestureCollection>(null, pair.Value));
} else {
changedGestures[pair.Key] = new Tuple<InputGestureCollection, InputGestureCollection>(changedGestures[pair.Key].Item1, pair.Value);
}
}
}
var modifiedBindingTemplates = new HashSet<IBindingInfoTemplate>(new IBindingInfoTemplateEqualityComparer());
var descriptions = new List<GesturesModificationDescription>(changedGestures.Count);
foreach(var changedGesture in changedGestures) {
var bindingInfoTemplate = new BindingInfoTemplate(changedGesture.Key);
InputGestureCollection defaultUserGesture = null;
if(changedGesture.Value.Item1 == null || changedGesture.Value.Item2 == null) {
defaultUserGesture = FindInputGestures(BindingInfoMatchType.Exact, bindingInfoTemplate);
}
var oldGestures = changedGesture.Value.Item1 ?? defaultUserGesture;
var newGestures = changedGesture.Value.Item2 ?? defaultUserGesture;
descriptions.Add(new GesturesModificationDescription(changedGesture.Key, oldGestures, newGestures));
modifiedBindingTemplates.Add(bindingInfoTemplate);
}
InvokeBindingsChanged(typeof(CommandManager), new NotifyBindingsChangedEventArgs(NotifyBindingsChangedAction.BindingInfoModified, modifiedBindingTemplates));
InvokeGesturesChanged(typeof(CommandManager), new NotifyGesturesChangedEventArgs(descriptions));
}
static void Profile_GesturesChanged(object sender, NotifyGesturesChangedEventArgs args)
{
var modifiedBindingTemplates = new HashSet<IBindingInfoTemplate>(new IBindingInfoTemplateEqualityComparer());
foreach(var description in args.ModificationDescriptions) {
modifiedBindingTemplates.Add(new BindingInfoTemplate(description.InputBindingIdentifier));
}
InvokeBindingsChanged(typeof(CommandManager), new NotifyBindingsChangedEventArgs(NotifyBindingsChangedAction.BindingInfoModified, modifiedBindingTemplates));
InvokeGesturesChanged(typeof(CommandManager), args);
}
/// <summary>
@ -71,23 +133,18 @@ namespace ICSharpCode.Core.Presentation @@ -71,23 +133,18 @@ namespace ICSharpCode.Core.Presentation
throw new ArgumentNullException("element");
}
var oldInstances = GetNamedUIElementCollection(instanceName).ToArray();
var container = new WeakReference(element);
if(namedUIInstances.Add(instanceName, container)) {
var args = new BindingsUpdatedHandlerArgs();
args.AddedInstances = new [] { element };
InvokeCommandBindingUpdateHandlers(
null,
args,
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { OwnerInstanceName = instanceName });
InvokeInputBindingUpdateHandlers(
null,
args,
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { OwnerInstanceName = instanceName });
}
InvokeBindingsChanged(
null,
new NotifyBindingsChangedEventArgs(
NotifyBindingsChangedAction.NamedInstanceModified,
instanceName,
oldInstances,
GetNamedUIElementCollection(instanceName)));
}
}
public static void UnregisterNamedUIElement(string instanceName, UIElement instance)
@ -99,22 +156,17 @@ namespace ICSharpCode.Core.Presentation @@ -99,22 +156,17 @@ namespace ICSharpCode.Core.Presentation
throw new ArgumentNullException("element");
}
var oldInstances = GetNamedUIElementCollection(instanceName).ToArray();
var container = new WeakReference(instance);
if(namedUIInstances.Remove(instanceName, container)) {
var args = new BindingsUpdatedHandlerArgs();
args.RemovedInstances = new []{ instance };
InvokeCommandBindingUpdateHandlers(
null,
args,
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { OwnerInstanceName = instanceName });
InvokeInputBindingUpdateHandlers(
null,
args,
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { OwnerInstanceName = instanceName });
InvokeBindingsChanged(
null,
new NotifyBindingsChangedEventArgs(
NotifyBindingsChangedAction.NamedInstanceModified,
instanceName,
oldInstances,
GetNamedUIElementCollection(instanceName)));
}
}
@ -138,8 +190,7 @@ namespace ICSharpCode.Core.Presentation @@ -138,8 +190,7 @@ namespace ICSharpCode.Core.Presentation
throw new ArgumentNullException("instance");
}
var container = new WeakReference(instance);
return namedUIInstances.MapBackward(container);
return namedUIInstances.MapBackward(new WeakReference(instance));
}
/// <summary>
@ -156,21 +207,15 @@ namespace ICSharpCode.Core.Presentation @@ -156,21 +207,15 @@ namespace ICSharpCode.Core.Presentation
throw new ArgumentNullException("type");
}
var oldTypes = GetNamedUITypeCollection(typeName).ToArray();
if(namedUITypes.Add(typeName, type)) {
var args = new BindingsUpdatedHandlerArgs();
args.AddedTypes = new [] { type };
InvokeCommandBindingUpdateHandlers(
null,
args,
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { OwnerTypeName = typeName });
InvokeInputBindingUpdateHandlers(
null,
args,
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { OwnerTypeName = typeName });
InvokeBindingsChanged(null,
new NotifyBindingsChangedEventArgs(
NotifyBindingsChangedAction.NamedTypeModified,
typeName,
oldTypes,
GetNamedUITypeCollection(typeName)));
}
}
@ -183,21 +228,16 @@ namespace ICSharpCode.Core.Presentation @@ -183,21 +228,16 @@ namespace ICSharpCode.Core.Presentation
throw new ArgumentNullException("type");
}
var oldTypes = GetNamedUITypeCollection(typeName).ToArray();
if(namedUITypes.Remove(typeName, type)) {
var args = new BindingsUpdatedHandlerArgs();
args.RemovedTypes = new [] { type };
InvokeCommandBindingUpdateHandlers(
null,
args,
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { OwnerTypeName = typeName });
InvokeInputBindingUpdateHandlers(
null,
args,
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { OwnerTypeName = typeName });
InvokeBindingsChanged(
null,
new NotifyBindingsChangedEventArgs(
NotifyBindingsChangedAction.NamedTypeModified,
typeName,
oldTypes,
GetNamedUITypeCollection(typeName)));
}
}
@ -240,19 +280,9 @@ namespace ICSharpCode.Core.Presentation @@ -240,19 +280,9 @@ namespace ICSharpCode.Core.Presentation
var routedCommand = new RoutedUICommand(text, routedCommandName, typeof(CommandManager));
routedCommands.Add(routedCommandName, routedCommand);
InvokeCommandBindingUpdateHandlers(
null,
new BindingsUpdatedHandlerArgs(),
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { RoutedCommandName = routedCommandName });
InvokeBindingsChanged(null, new NotifyBindingsChangedEventArgs(NotifyBindingsChangedAction.RoutedUICommandModified, routedCommandName));
InvokeInputBindingUpdateHandlers(
null,
new BindingsUpdatedHandlerArgs(),
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { RoutedCommandName = routedCommandName });
return routedCommand;
}
@ -273,17 +303,7 @@ namespace ICSharpCode.Core.Presentation @@ -273,17 +303,7 @@ namespace ICSharpCode.Core.Presentation
routedCommands.Add(routedCommandName, existingRoutedUICommand);
InvokeCommandBindingUpdateHandlers(
null,
new BindingsUpdatedHandlerArgs(),
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { RoutedCommandName = routedCommandName });
InvokeInputBindingUpdateHandlers(
null,
new BindingsUpdatedHandlerArgs(),
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { RoutedCommandName = routedCommandName });
InvokeBindingsChanged(null, new NotifyBindingsChangedEventArgs(NotifyBindingsChangedAction.RoutedUICommandModified, routedCommandName));
}
/// <summary>
@ -294,18 +314,8 @@ namespace ICSharpCode.Core.Presentation @@ -294,18 +314,8 @@ namespace ICSharpCode.Core.Presentation
if(routedCommands.ContainsKey(routedCommandName)) {
var routedCommand = routedCommands[routedCommandName];
routedCommands.Remove(routedCommandName);
InvokeCommandBindingUpdateHandlers(
null,
new BindingsUpdatedHandlerArgs(),
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { RoutedCommandName = routedCommandName });
InvokeInputBindingUpdateHandlers(
null,
new BindingsUpdatedHandlerArgs(),
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { RoutedCommandName = routedCommandName });
InvokeBindingsChanged(null, new NotifyBindingsChangedEventArgs(NotifyBindingsChangedAction.RoutedUICommandModified, routedCommandName));
}
}
@ -353,14 +363,10 @@ namespace ICSharpCode.Core.Presentation @@ -353,14 +363,10 @@ namespace ICSharpCode.Core.Presentation
inputBidnings.Add(inputBindingInfo, inputBindingInfo);
inputBindingInfo.IsRegistered = true;
RegisterInputBindingsUpdateHandler(inputBindingInfo, inputBindingInfo.DefaultBindingsUpdateHandler);
CommandManager.BindingsChanged += inputBindingInfo.BindingsChangedHandler;
}
InvokeInputBindingUpdateHandlers(
null,
new BindingsUpdatedHandlerArgs(),
BindingInfoMatchType.SubSet,
inputBindingInfo);
InvokeBindingsChanged(null, new NotifyBindingsChangedEventArgs(NotifyBindingsChangedAction.BindingInfoModified, new [] { similarTemplate }));
}
/// <summary>
@ -410,95 +416,28 @@ namespace ICSharpCode.Core.Presentation @@ -410,95 +416,28 @@ namespace ICSharpCode.Core.Presentation
commandBindings.Add(commandBindingInfo, commandBindingInfo);
commandBindingInfo.IsRegistered = true;
RegisterCommandBindingsUpdateHandler(commandBindingInfo, commandBindingInfo.DefaultBindingsUpdateHandler);
InvokeCommandBindingUpdateHandlers(
null,
new BindingsUpdatedHandlerArgs(),
BindingInfoMatchType.SubSet,
commandBindingInfo);
}
#region Register update handler
/// <summary>
/// Register command binding update handler which is triggered when input bindings associated
/// with specified type change
/// </summary>
/// <param name="ownerTypeName">Owner type name</param>
/// <param name="handler">Update handler</param>
public static void RegisterCommandBindingsUpdateHandler(IBindingInfoTemplate template, BindingsUpdatedHandler handler)
{
RegisterBindingsUpdateHandler(commandBindingUpdatedHandlers, template, handler);
}
/// <summary>
/// Register command binding update handler which is triggered when input bindings associated
/// with specified type change
/// </summary>
/// <param name="ownerTypeName">Owner type name</param>
/// <param name="handler">Update handler</param>
public static void RegisterInputBindingsUpdateHandler(IBindingInfoTemplate template, BindingsUpdatedHandler handler)
{
RegisterBindingsUpdateHandler(inputBindingUpdatedHandlers, template, handler);
}
private static void RegisterBindingsUpdateHandler(BindingInfoTemplateDictionary<BindingsUpdatedHandler> updateHanlders, IBindingInfoTemplate template, BindingsUpdatedHandler handler)
{
updateHanlders.Add(template, handler);
}
#endregion
#region Unregister update handler
public static void UnregisterInputBindingsUpdateHandler(BindingsUpdatedHandler handler, BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
{
UnregisterdBindingsUpdateHandler(inputBindingUpdatedHandlers, handler, matchType, templates);
CommandManager.BindingsChanged += commandBindingInfo.BindingsChangedHandler;
InvokeBindingsChanged(null, new NotifyBindingsChangedEventArgs(NotifyBindingsChangedAction.BindingInfoModified, new []{ new BindingInfoTemplate(commandBindingInfo, false) }));
}
public static event NotifyBindingsChangedEventHandler BindingsChanged;
public static void UnregisterCommandBindingsUpdateHandler(BindingsUpdatedHandler handler, BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
{
UnregisterdBindingsUpdateHandler(commandBindingUpdatedHandlers, handler, matchType, templates);
}
private static void UnregisterdBindingsUpdateHandler(BindingInfoTemplateDictionary<BindingsUpdatedHandler> updateHandlers, BindingsUpdatedHandler handler, BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
public static void InvokeBindingsChanged(object sender, NotifyBindingsChangedEventArgs args)
{
if(handler == null) {
throw new ArgumentNullException("handler");
}
foreach(var template in templates) {
updateHandlers.Remove(template, matchType, handler);
if(BindingsChanged != null) {
BindingsChanged.Invoke(sender, args);
}
}
#endregion
#region Invoke binding update handlers
public static void InvokeCommandBindingUpdateHandlers(object sender, BindingsUpdatedHandlerArgs args, BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
{
InvokeBindingUpdateHandlers(commandBindingUpdatedHandlers, sender, args, matchType, templates);
}
public static event NotifyGesturesChangedEventHandler GesturesChanged;
public static void InvokeInputBindingUpdateHandlers(object sender, BindingsUpdatedHandlerArgs args, BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
public static void InvokeGesturesChanged(object sender, NotifyGesturesChangedEventArgs args)
{
InvokeBindingUpdateHandlers(inputBindingUpdatedHandlers, sender, args, matchType, templates);
}
private static void InvokeBindingUpdateHandlers(BindingInfoTemplateDictionary<BindingsUpdatedHandler> updateHandlerDictionary, object sender, BindingsUpdatedHandlerArgs args, BindingInfoMatchType matchType, IBindingInfoTemplate[] templates)
{
if(!SuspendUpdateHandlers) {
foreach(var template in templates) {
foreach(var handler in updateHandlerDictionary.FindItems(template, matchType)) {
if(handler != null) {
handler.Invoke(null, args);
}
}
}
if(GesturesChanged != null) {
GesturesChanged.Invoke(sender, args);
}
}
#endregion
/// <summary>
/// Load all registered commands in add-in
@ -545,7 +484,7 @@ namespace ICSharpCode.Core.Presentation @@ -545,7 +484,7 @@ namespace ICSharpCode.Core.Presentation
/// <param name="inputBindingInfo">Input binding parameters</param>
public static void UnregisterInputBinding(BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
{
UnregisterBindingInfo(inputBidnings, inputBindingUpdatedHandlers, matchType, templates);
UnregisterBindingInfo(inputBidnings, matchType, templates);
}
/// <summary>
@ -554,12 +493,14 @@ namespace ICSharpCode.Core.Presentation @@ -554,12 +493,14 @@ namespace ICSharpCode.Core.Presentation
/// <param name="commandBindingInfo">Command binding parameters</param>
public static void UnregisterCommandBinding(BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
{
UnregisterBindingInfo(commandBindings, commandBindingUpdatedHandlers, matchType, templates);
UnregisterBindingInfo(commandBindings, matchType, templates);
}
private static void UnregisterBindingInfo(BindingInfoTemplateDictionary<IBindingInfo> bindingInfoDictionary, BindingInfoTemplateDictionary<BindingsUpdatedHandler> updateHandlerDictionary, BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
private static void UnregisterBindingInfo(BindingInfoTemplateDictionary<BindingInfoBase> bindingInfoDictionary, BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
{
foreach(var similarBindingInfo in FindBindingInfos(bindingInfoDictionary, matchType, templates).ToArray()) {
var foundBindings = FindBindingInfos(bindingInfoDictionary, matchType, templates).ToList();
foreach(var similarBindingInfo in foundBindings) {
BindingsUpdatedHandler defaultUpdatesHandler;
if(similarBindingInfo is InputBindingInfo) {
((InputBindingInfo)similarBindingInfo).IsRegistered = false;
@ -567,18 +508,14 @@ namespace ICSharpCode.Core.Presentation @@ -567,18 +508,14 @@ namespace ICSharpCode.Core.Presentation
((CommandBindingInfo)similarBindingInfo).IsRegistered = false;
}
bindingInfoDictionary.Remove((IBindingInfoTemplate)similarBindingInfo, BindingInfoMatchType.Exact, similarBindingInfo);
updateHandlerDictionary.Remove((IBindingInfoTemplate)similarBindingInfo, BindingInfoMatchType.Exact, similarBindingInfo.DefaultBindingsUpdateHandler);
var removedTemplate = new BindingInfoTemplate(similarBindingInfo, false);
bindingInfoDictionary.Remove(removedTemplate, BindingInfoMatchType.Exact, similarBindingInfo);
CommandManager.BindingsChanged -= similarBindingInfo.BindingsChangedHandler;
similarBindingInfo.RemoveActiveBindings();
}
InvokeBindingUpdateHandlers(
updateHandlerDictionary,
null,
new BindingsUpdatedHandlerArgs(),
BindingInfoMatchType.SuperSet | BindingInfoMatchType.SubSet,
templates);
InvokeBindingsChanged(null, new NotifyBindingsChangedEventArgs(NotifyBindingsChangedAction.BindingInfoModified, templates));
}
#endregion
@ -609,7 +546,7 @@ namespace ICSharpCode.Core.Presentation @@ -609,7 +546,7 @@ namespace ICSharpCode.Core.Presentation
return bindings.Cast<InputBindingInfo>();
}
private static IEnumerable<IBindingInfo> FindBindingInfos(BindingInfoTemplateDictionary<IBindingInfo> bindingInfos, BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
private static IEnumerable<BindingInfoBase> FindBindingInfos(BindingInfoTemplateDictionary<BindingInfoBase> bindingInfos, BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
{
foreach(var template in templates) {
foreach(var item in bindingInfos.FindItems(template, matchType)) {
@ -740,13 +677,13 @@ namespace ICSharpCode.Core.Presentation @@ -740,13 +677,13 @@ namespace ICSharpCode.Core.Presentation
routedCommands.Clear();
commands.Clear();
inputBindingUpdatedHandlers.Clear();
commandBindingUpdatedHandlers.Clear();
namedUIInstances.Clear();
namedUITypes.Clear();
InputBindingCategories.Clear();
BindingsChanged = null;
GesturesChanged = null;
}
}
@ -758,5 +695,4 @@ namespace ICSharpCode.Core.Presentation @@ -758,5 +695,4 @@ namespace ICSharpCode.Core.Presentation
return string.Format("{0}, {1}", type.FullName, type.Assembly.GetName().Name);
}
}
}
}

232
src/Main/ICSharpCode.Core.Presentation/CommandsService/Events/NotifyBindingsChangedEvent.cs

@ -0,0 +1,232 @@ @@ -0,0 +1,232 @@
using System;
using System.Windows;
using System.Windows.Input;
using System.Collections.Generic;
using ICSharpCode.Core;
using ICSharpCode.Core.Presentation;
namespace ICSharpCode.Core.Presentation
{
public delegate void NotifyBindingsChangedEventHandler(object sender, NotifyBindingsChangedEventArgs args);
public class NotifyBindingsChangedEventArgs : EventArgs
{
private ICollection<IBindingInfoTemplate> _modifiedBindingInfoTemplates;
public ICollection<IBindingInfoTemplate> ModifiedBindingInfoTemplates
{
get {
return _modifiedBindingInfoTemplates;
}
}
private string _routedCommandName;
public string RoutedCommandName
{
get {
return _routedCommandName;
}
}
private string _typeName;
public string TypeName
{
get {
return _typeName;
}
}
private ICollection<Type> _oldNamedTypes;
public ICollection<Type> OldNamedTypes
{
get {
return _oldNamedTypes;
}
}
private ICollection<Type> _newNamedTypes;
public ICollection<Type> NewNamedTypes
{
get {
return _newNamedTypes;
}
}
private string _uiElementName;
public string UIElementName
{
get {
return _uiElementName;
}
}
private ICollection<UIElement> _oldNamedUIElements;
public ICollection<UIElement> OldNamedUIElements
{
get {
return _oldNamedUIElements;
}
}
private ICollection<UIElement> _newNamedUIElements;
public ICollection<UIElement> NewNamedUIElements
{
get {
return _newNamedUIElements;
}
}
private ICollection<UIElement> _attachedInstances;
public ICollection<UIElement> AttachedInstances
{
get {
return _attachedInstances;
}
}
private BindingGroupCollection _groups;
public BindingGroupCollection Groups
{
get {
return _groups;
}
}
private NotifyBindingsChangedAction _action;
public NotifyBindingsChangedAction Action
{
get {
return _action;
}
}
public NotifyBindingsChangedEventArgs(NotifyBindingsChangedAction action, string typeName, ICollection<Type> oldTypes, ICollection<Type> newTypes)
{
if(action != NotifyBindingsChangedAction.NamedTypeModified) {
throw new ArgumentException("This constructor only supports 'NamedTypeModified' action (got '" + Enum.GetName(typeof(NotifyBindingsChangedAction), action) + "')");
}
if(typeName == null) {
throw new ArgumentNullException("typeName");
}
if(oldTypes == null) {
throw new ArgumentNullException("oldTypes");
}
if(newTypes == null) {
throw new ArgumentNullException("newTypes");
}
var oldTypesArray = new Type[0];
if(oldTypes != null) {
oldTypesArray = new Type[oldTypes.Count];
oldTypes.CopyTo(oldTypesArray, 0);
}
var newTypesArray = new Type[0];
if(newTypes != null) {
newTypesArray = new Type[newTypes.Count];
newTypes.CopyTo(newTypesArray, 0);
}
_action = action;
_typeName = typeName;
_oldNamedTypes = oldTypesArray;
_newNamedTypes = newTypesArray;
}
public NotifyBindingsChangedEventArgs(NotifyBindingsChangedAction action, string elementName, ICollection<UIElement> oldElements, ICollection<UIElement> newElements)
{
if(action != NotifyBindingsChangedAction.NamedInstanceModified) {
throw new ArgumentException("This constructor only supports 'NamedInstanceModified' action (got '" + Enum.GetName(typeof(NotifyBindingsChangedAction), action) + "')");
}
if(elementName == null) {
throw new ArgumentNullException("elementName");
}
if(oldElements == null) {
throw new ArgumentNullException("oldElements");
}
if(newElements == null) {
throw new ArgumentNullException("newElements");
}
var oldElementsArray = new UIElement[0];
if(oldElements != null) {
oldElementsArray = new UIElement[oldElements.Count];
oldElements.CopyTo(oldElementsArray, 0);
}
var newElementsArray = new UIElement[0];
if(newElements != null) {
newElementsArray = new UIElement[newElements.Count];
newElements.CopyTo(newElementsArray, 0);
}
_action = action;
_uiElementName = elementName;
_oldNamedUIElements = oldElementsArray;
_newNamedUIElements = newElementsArray;
}
public NotifyBindingsChangedEventArgs(NotifyBindingsChangedAction action, string routedCommandName)
{
if(action != NotifyBindingsChangedAction.RoutedUICommandModified) {
throw new ArgumentException("This constructor only supports 'RoutedUICommandModified' action (got '" + Enum.GetName(typeof(NotifyBindingsChangedAction), action) + "')");
}
if(routedCommandName == null) {
throw new ArgumentNullException("routedCommandName");
}
_action = action;
_routedCommandName = routedCommandName;
}
public NotifyBindingsChangedEventArgs(NotifyBindingsChangedAction action, IEnumerable<IBindingInfoTemplate> templates)
{
if(action != NotifyBindingsChangedAction.BindingInfoModified) {
throw new ArgumentException("This constructor only supports 'BindingInfoModified' action (got '" + Enum.GetName(typeof(NotifyBindingsChangedAction), action) + "')");
}
if(templates == null) {
throw new ArgumentNullException("templates");
}
_action = action;
_modifiedBindingInfoTemplates = new HashSet<IBindingInfoTemplate>(templates, new IBindingInfoTemplateEqualityComparer());
}
public NotifyBindingsChangedEventArgs(NotifyBindingsChangedAction action, BindingGroupCollection groups, ICollection<UIElement> attachedInstances)
{
if(action != NotifyBindingsChangedAction.GroupAttachmendsModified) {
throw new ArgumentException("This constructor only supports 'GroupAttachmendsModified' action (got '" + Enum.GetName(typeof(NotifyBindingsChangedAction), action) + "')");
}
if(groups == null) {
throw new ArgumentNullException("groups");
}
if(attachedInstances == null) {
throw new ArgumentNullException("attachedInstances");
}
_action = action;
_groups = new BindingGroupCollection();
_groups.AddRange(groups);
_attachedInstances = new HashSet<UIElement>(attachedInstances);
}
}
public enum NotifyBindingsChangedAction
{
BindingInfoModified,
NamedInstanceModified,
NamedTypeModified,
RoutedUICommandModified,
GroupAttachmendsModified
}
}

68
src/Main/ICSharpCode.Core.Presentation/CommandsService/Events/NotifyGesturesChangedEvent.cs

@ -0,0 +1,68 @@ @@ -0,0 +1,68 @@
using System;
using System.Collections.Generic;
using System.Windows.Input;
namespace ICSharpCode.Core.Presentation
{
public delegate void NotifyGesturesChangedEventHandler(object sender, NotifyGesturesChangedEventArgs args);
public class NotifyGesturesChangedEventArgs : EventArgs
{
List<GesturesModificationDescription> _modificationDescriptions = new List<GesturesModificationDescription>();
public NotifyGesturesChangedEventArgs()
{
}
public NotifyGesturesChangedEventArgs(IEnumerable<GesturesModificationDescription> descriptions)
{
if(descriptions == null) {
throw new ArgumentNullException("descriptions");
}
_modificationDescriptions.AddRange(descriptions);
}
public NotifyGesturesChangedEventArgs(GesturesModificationDescription description)
{
if(description == null) {
throw new ArgumentNullException("description");
}
_modificationDescriptions.Add(description);
}
public ICollection<GesturesModificationDescription> ModificationDescriptions
{
get
{
return _modificationDescriptions.AsReadOnly();
}
}
}
public class GesturesModificationDescription
{
public GesturesModificationDescription(InputBindingIdentifier identifier, InputGestureCollection oldGestures, InputGestureCollection newGestures)
{
InputBindingIdentifier = identifier;
OldGestures = oldGestures;
NewGestures = newGestures;
}
public InputBindingIdentifier InputBindingIdentifier
{
get; private set;
}
public InputGestureCollection OldGestures
{
get; private set;
}
public InputGestureCollection NewGestures
{
get; private set;
}
}
}

31
src/Main/ICSharpCode.Core.Presentation/CommandsService/Events/NotifyUserGestureProfileChangedEvent.cs

@ -0,0 +1,31 @@ @@ -0,0 +1,31 @@
using System;
namespace ICSharpCode.Core.Presentation
{
public class NotifyUserGestureProfileChangedEventArgs : EventArgs
{
private UserGesturesProfile _oldProfile;
public UserGesturesProfile OldProfile
{
get {
return _oldProfile;
}
}
private UserGesturesProfile _newProfile;
public UserGesturesProfile NewProfile
{
get {
return _newProfile;
}
}
public NotifyUserGestureProfileChangedEventArgs(UserGesturesProfile oldProfile, UserGesturesProfile newProfile)
{
_oldProfile = oldProfile;
_newProfile = newProfile;
}
}
public delegate void NotifyUserGestureProfileChangedEventHandler(object sender, NotifyUserGestureProfileChangedEventArgs args);
}

7
src/Main/ICSharpCode.Core.Presentation/CommandsService/IBindingInfo.cs

@ -49,10 +49,7 @@ namespace ICSharpCode.Core.Presentation @@ -49,10 +49,7 @@ namespace ICSharpCode.Core.Presentation
get;
}
BindingsUpdatedHandler DefaultBindingsUpdateHandler
{
get;
}
void BindingsChangedHandler(object sender, NotifyBindingsChangedEventArgs args);
void RemoveActiveBindings();
}
@ -89,6 +86,6 @@ namespace ICSharpCode.Core.Presentation @@ -89,6 +86,6 @@ namespace ICSharpCode.Core.Presentation
{
SubSet = 1,
SuperSet = 2,
Exact
Exact = 4
}
}

19
src/Main/ICSharpCode.Core.Presentation/CommandsService/InputBindingIndentifier.cs

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
using System;
namespace ICSharpCode.Core.Presentation
{
public struct InputBindingIdentifier
{
public string OwnerInstanceName {
get; set;
}
public string OwnerTypeName {
get; set;
}
public string RoutedCommandName {
get; set;
}
}
}

208
src/Main/ICSharpCode.Core.Presentation/CommandsService/InputBindingInfo.cs

@ -28,56 +28,6 @@ namespace ICSharpCode.Core.Presentation @@ -28,56 +28,6 @@ namespace ICSharpCode.Core.Presentation
Groups = new BindingGroupCollection();
}
public BindingGroupCollection Groups
{
get {
return base.Groups;
}
set {
var oldGroups = base.Groups;
base.Groups = value;
SetCollectionChanged<BindingGroup>(oldGroups, value, Groups_CollectionChanged);
}
}
/// <summary>
/// Stores name of named instance to which this binding belongs. When this binding is registered a
/// <see cref="InputBinding" /> is assigned to owner instance
///
/// If this attribute is used <see cref="OwnerInstance" />, <see cref="OwnerType" /> and
/// <see cref="OwnerTypeName" /> can not be set
/// </summary>
public override string OwnerInstanceName {
get {
return base.OwnerInstanceName;
}
set {
base.OwnerInstanceName = value;
SetActiveGesturesChanged(RoutedCommandName, value, OwnerTypeName);
}
}
/// <summary>
/// Stores name of owner type. Full name with assembly should be used. When this binding is
/// registered <see cref="InputBinding" /> is assigned to all instances of provided class
///
/// If this attribute is used <see cref="OwnerInstance" />, <see cref="OwnerInstanceName" /> and
/// <see cref="OwnerType" /> can not be set
/// </summary>
public override string OwnerTypeName
{
get {
return base.OwnerTypeName;
}
set {
base.OwnerTypeName = value;
SetActiveGesturesChanged(RoutedCommandName, OwnerInstanceName, value);
}
}
private ObservableInputGestureCollection _defaultGestures;
/// <summary>
@ -88,25 +38,54 @@ namespace ICSharpCode.Core.Presentation @@ -88,25 +38,54 @@ namespace ICSharpCode.Core.Presentation
return _defaultGestures;
}
set {
_defaultGestures = value;
if(_defaultGestures != null) {
_defaultGestures.CollectionChanged -= DefaultGestures_CollectionChanged;
}
if(value != null)
{
_defaultGestures.CollectionChanged += delegate(object sender, NotifyCollectionChangedEventArgs e) {
// Check for active profile but no custom shortcut
if(UserDefinedGesturesManager.CurrentProfile == null) {
ActiveGesturesChanged(this, new InputBindingGesturesChangedArgs { InputBindingIdentifier = Identifier });
}
};
if(value != null) {
value.CollectionChanged += DefaultGestures_CollectionChanged;
}
var oldGestures = _defaultGestures;
_defaultGestures = value;
if(UserDefinedGesturesManager.CurrentProfile == null) {
ActiveGesturesChanged(this, new InputBindingGesturesChangedArgs { InputBindingIdentifier = Identifier });
if(IsRegistered && (UserDefinedGesturesManager.CurrentProfile == null || UserDefinedGesturesManager.CurrentProfile[Identifier] == null)) {
var description = new GesturesModificationDescription(
Identifier,
oldGestures != null ? oldGestures.InputGesturesCollection : new InputGestureCollection(),
value != null ? value.InputGesturesCollection : new InputGestureCollection());
SDCommandManager.InvokeGesturesChanged(this, new NotifyGesturesChangedEventArgs(description));
}
}
}
private void DefaultGestures_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
if(IsRegistered && (UserDefinedGesturesManager.CurrentProfile == null || UserDefinedGesturesManager.CurrentProfile[Identifier] == null)) {
var newGestures = DefaultGestures.InputGesturesCollection;
var oldGestures = new InputGestureCollection();
oldGestures.AddRange(newGestures);
if(e.Action == NotifyCollectionChangedAction.Add) {
if(e.NewItems != null) {
foreach(InputGesture ng in e.NewItems) {
oldGestures.Remove(ng);
}
}
} else if(e.Action == NotifyCollectionChangedAction.Remove) {
if(e.OldItems != null) {
foreach(InputGesture og in e.OldItems) {
oldGestures.Add(og);
}
}
}
var description = new GesturesModificationDescription(Identifier, oldGestures, newGestures);
SDCommandManager.InvokeGesturesChanged(this, new NotifyGesturesChangedEventArgs(description));
}
}
/// <summary>
/// Gestures which triggers this binding
/// </summary>
@ -121,21 +100,6 @@ namespace ICSharpCode.Core.Presentation @@ -121,21 +100,6 @@ namespace ICSharpCode.Core.Presentation
}
}
/// <summary>
/// Name of the routed command which will be invoked when this binding is triggered
/// </summary>
public override string RoutedCommandName {
get {
return base.RoutedCommandName;
}
set {
var oldValue = base.RoutedCommandName;
base.RoutedCommandName = value;
SetActiveGesturesChanged(oldValue, OwnerInstanceName, OwnerTypeName);
}
}
InputBindingCategoryCollection _categories;
/// <summary>
@ -158,8 +122,6 @@ namespace ICSharpCode.Core.Presentation @@ -158,8 +122,6 @@ namespace ICSharpCode.Core.Presentation
}
}
public event ActiveInputBindingsChangedHandler ActiveInputBindingsChanged;
/// <summary>
/// New input bindings are assigned to owner when <see cref="CommandBindingInfo" /> is modified
/// </summary>
@ -167,8 +129,10 @@ namespace ICSharpCode.Core.Presentation @@ -167,8 +129,10 @@ namespace ICSharpCode.Core.Presentation
{
get; set;
}
List<UIElement> oldInstances;
protected override void SetInstanceBindings(ICollection<UIElement> oldInstances, ICollection<UIElement> newInstances)
protected override void SetInstanceBindings(ICollection<UIElement> newInstances)
{
if(oldInstances != null) {
foreach(var ownerInstance in oldInstances) {
@ -177,10 +141,13 @@ namespace ICSharpCode.Core.Presentation @@ -177,10 +141,13 @@ namespace ICSharpCode.Core.Presentation
}
}
}
oldInstances = new List<UIElement>();
if(newInstances != null) {
foreach(var ownerInstance in newInstances) {
ownerInstance.InputBindings.AddRange(ActiveInputBindings);
oldInstances.Add(ownerInstance);
// Sorting input bindings. This may be slow
if(ownerInstance.InputBindings != null) {
@ -190,7 +157,9 @@ namespace ICSharpCode.Core.Presentation @@ -190,7 +157,9 @@ namespace ICSharpCode.Core.Presentation
}
}
protected override void SetClassBindings(ICollection<Type> oldTypes, ICollection<Type> newTypes)
List<Type> oldTypes;
protected override void SetClassBindings(ICollection<Type> newTypes)
{
if(oldTypes != null) {
foreach(var ownerType in oldTypes) {
@ -200,10 +169,13 @@ namespace ICSharpCode.Core.Presentation @@ -200,10 +169,13 @@ namespace ICSharpCode.Core.Presentation
}
}
oldTypes = new List<Type>();
if(newTypes != null) {
foreach(var ownerType in newTypes) {
foreach(InputBinding binding in ActiveInputBindings) {
System.Windows.Input.CommandManager.RegisterClassInputBinding(ownerType, binding);
oldTypes.Add(ownerType);
}
var fieldInfo = typeof(System.Windows.Input.CommandManager).GetField("_classInputBindings", BindingFlags.Static | BindingFlags.NonPublic);
@ -216,10 +188,6 @@ namespace ICSharpCode.Core.Presentation @@ -216,10 +188,6 @@ namespace ICSharpCode.Core.Presentation
}
}
}
if(ActiveInputBindingsChanged != null) {
ActiveInputBindingsChanged.Invoke(this);
}
}
/// <summary>
@ -233,7 +201,6 @@ namespace ICSharpCode.Core.Presentation @@ -233,7 +201,6 @@ namespace ICSharpCode.Core.Presentation
get; set;
}
private void Categories_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
if(e.NewItems != null) {
@ -245,40 +212,6 @@ namespace ICSharpCode.Core.Presentation @@ -245,40 +212,6 @@ namespace ICSharpCode.Core.Presentation
}
}
private void Groups_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
if(IsRegistered) {
var modifiedGroups = new BindingGroupCollection();
if(e.NewItems != null) {
modifiedGroups.AddRange(e.NewItems.Cast<BindingGroup>());
}
if(e.OldItems != null) {
modifiedGroups.AddRange(e.OldItems.Cast<BindingGroup>());
}
SDCommandManager.InvokeInputBindingUpdateHandlers(
this,
new BindingsUpdatedHandlerArgs(),
BindingInfoMatchType.SubSet,
new BindingInfoTemplate(this, false) { Groups = modifiedGroups });
}
}
private void ActiveGesturesChanged(object sender, InputBindingGesturesChangedArgs args)
{
var template = new BindingInfoTemplate();
template.OwnerInstanceName = OwnerInstanceName;
template.OwnerTypeName = OwnerTypeName;
template.RoutedCommandName = RoutedCommandName;
SDCommandManager.InvokeInputBindingUpdateHandlers(
null,
new BindingsUpdatedHandlerArgs(),
BindingInfoMatchType.SubSet,
template);
}
/// <summary>
/// Re-generate <see cref="InputBinding" /> from <see cref="InputBindingInfo" />
/// </summary>
@ -293,38 +226,17 @@ namespace ICSharpCode.Core.Presentation @@ -293,38 +226,17 @@ namespace ICSharpCode.Core.Presentation
}
}
private void SetActiveGesturesChanged(string oldRoutedCommandName, string oldOwnerInstanceName, string oldOwnerTypeName)
{
if(oldRoutedCommandName != null && (oldOwnerInstanceName != null || oldOwnerTypeName != null)) {
var oldIdentifier = new InputBindingIdentifier();
oldIdentifier.OwnerInstanceName = oldOwnerInstanceName;
oldIdentifier.OwnerTypeName = oldOwnerTypeName;
oldIdentifier.RoutedCommandName = oldRoutedCommandName;
public InputBindingIdentifier Identifier {
get {
var identifier = new InputBindingIdentifier();
identifier.OwnerInstanceName = OwnerInstanceName;
identifier.OwnerTypeName = OwnerTypeName;
identifier.RoutedCommandName = RoutedCommandName;
UserDefinedGesturesManager.RemoveActiveGesturesChangedHandler(oldIdentifier, ActiveGesturesChanged);
}
if(RoutedCommandName != null && (OwnerInstanceName != null || OwnerTypeName != null)) {
UserDefinedGesturesManager.AddActiveGesturesChangedHandler(Identifier, ActiveGesturesChanged);
return identifier;
}
}
}
public struct InputBindingIdentifier
{
public string OwnerInstanceName {
get; set;
}
public string OwnerTypeName {
get; set;
}
public string RoutedCommandName {
get; set;
}
}
public delegate void ActiveInputBindingsChangedHandler(InputBindingInfo inputBindingInfo);
}

12
src/Main/ICSharpCode.Core.Presentation/CommandsService/ObservableInputGestureCollection.cs

@ -16,7 +16,7 @@ namespace ICSharpCode.Core.Presentation @@ -16,7 +16,7 @@ namespace ICSharpCode.Core.Presentation
/// <summary>
/// Description of ObservableInputBindingCollection.
/// </summary>
public class ObservableInputGestureCollection : IList<InputGesture>, IEnumerable<InputGesture>, ICollection<InputGesture>
public class ObservableInputGestureCollection : IList<InputGesture>, INotifyCollectionChanged, IEnumerable<InputGesture>, ICollection<InputGesture>
{
private ObservableCollection<InputGesture> observedInputGestures;
@ -127,5 +127,15 @@ namespace ICSharpCode.Core.Presentation @@ -127,5 +127,15 @@ namespace ICSharpCode.Core.Presentation
CollectionChanged.Invoke(sender, e);
}
}
public InputGestureCollection InputGesturesCollection
{
get {
var gestures = new InputGestureCollection();
gestures.AddRange(observedInputGestures);
return gestures;
}
}
}
}

108
src/Main/ICSharpCode.Core.Presentation/CommandsService/UserDefinedGesturesManager.cs

@ -3,6 +3,7 @@ using System.Collections.Generic; @@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Xml;
using System.Windows.Input;
using System.IO;
using SDCommandManager=ICSharpCode.Core.Presentation.CommandManager;
namespace ICSharpCode.Core.Presentation
{
@ -21,8 +22,6 @@ namespace ICSharpCode.Core.Presentation @@ -21,8 +22,6 @@ namespace ICSharpCode.Core.Presentation
Directory.CreateDirectory(_userGestureProfilesDirectory);
}
}
CurrentProfileChanged += CurrentProfile_CurrentProfileChanged;
}
/// <summary>
@ -36,119 +35,42 @@ namespace ICSharpCode.Core.Presentation @@ -36,119 +35,42 @@ namespace ICSharpCode.Core.Presentation
}
private static UserGesturesProfile _currentProfile;
private static bool _isCurrentProfileLoaded;
public static event UserGestureProfileChangedHandler CurrentProfileChanged;
private static Dictionary<InputBindingIdentifier, HashSet<InputBindingGesturesChangedHandler>> ActiveGesturesChangedHandlers = new Dictionary<InputBindingIdentifier, HashSet<InputBindingGesturesChangedHandler>>();
public static void AddActiveGesturesChangedHandler(InputBindingIdentifier identifier, InputBindingGesturesChangedHandler handler)
{
if(!ActiveGesturesChangedHandlers.ContainsKey(identifier)) {
ActiveGesturesChangedHandlers.Add(identifier, new HashSet<InputBindingGesturesChangedHandler>());
}
ActiveGesturesChangedHandlers[identifier].Add(handler);
}
public static void RemoveActiveGesturesChangedHandler(InputBindingIdentifier identifier, InputBindingGesturesChangedHandler handler)
{
if(ActiveGesturesChangedHandlers.ContainsKey(identifier)) {
ActiveGesturesChangedHandlers[identifier].Remove(handler);
}
}
private static void InvokeActiveGesturesChangedHandlers(InputBindingIdentifier identifier)
{
var args = new InputBindingGesturesChangedArgs { InputBindingIdentifier = identifier };
if(ActiveGesturesChangedHandlers.ContainsKey(identifier)) {
foreach(var handler in ActiveGesturesChangedHandlers[identifier]) {
handler.Invoke(typeof(UserDefinedGesturesManager), args);
}
}
}
public static UserGesturesProfile CurrentProfile
{
get {
if(!_isCurrentProfileLoaded)
{
var path = PropertyService.Get("ICSharpCode.Core.Presentation.UserDefinedGesturesManager.UserGestureProfilesDirectory");
if(path != null && File.Exists(path)) {
var profile = new UserGesturesProfile();
profile.Path = path;
profile.Load();
_currentProfile = profile;
if(CurrentProfileChanged != null) {
var args = new UserGestureProfileChangedArgs();
args.NewProfile = profile;
CurrentProfileChanged.Invoke(typeof(UserDefinedGesturesManager), args);
}
}
_isCurrentProfileLoaded = true;
}
return _currentProfile;
}
set {
var currentProfileBackup = _currentProfile;
var oldProfile = _currentProfile;
_currentProfile = value;
if(_currentProfile != currentProfileBackup && CurrentProfileChanged != null) {
var args = new UserGestureProfileChangedArgs();
args.NewProfile = _currentProfile;
args.OldProfile = currentProfileBackup;
CurrentProfileChanged.Invoke(typeof(UserDefinedGesturesManager), args);
}
var currentProfilePath = value != null ? value.Path : null;
if(currentProfilePath != null) {
PropertyService.Set("ICSharpCode.Core.Presentation.UserDefinedGesturesManager.UserGestureProfilesDirectory", currentProfilePath);
} else {
PropertyService.Remove("ICSharpCode.Core.Presentation.UserDefinedGesturesManager.UserGestureProfilesDirectory");
}
_isCurrentProfileLoaded = true;
}
}
private static void CurrentProfile_CurrentProfileChanged(object sender, UserGestureProfileChangedArgs args) {
var identifiers = new HashSet<InputBindingIdentifier>();
if(args.OldProfile != null) {
foreach(var gesture in args.OldProfile) {
identifiers.Add(gesture.Key);
}
}
if(args.NewProfile != null) {
foreach(var gesture in args.NewProfile) {
identifiers.Add(gesture.Key);
if(_currentProfile != oldProfile) {
InvokeCurrentProfileChanged(typeof(UserDefinedGesturesManager), new NotifyUserGestureProfileChangedEventArgs(oldProfile, _currentProfile));
}
}
foreach(var identifier in identifiers) {
InvokeActiveGesturesChangedHandlers(identifier);
}
}
}
}
public static event NotifyUserGestureProfileChangedEventHandler CurrentProfileChanged;
public class UserGestureProfileChangedArgs
{
public UserGesturesProfile OldProfile
public static void InvokeCurrentProfileChanged(object sender, NotifyUserGestureProfileChangedEventArgs args)
{
get; set;
if(CurrentProfileChanged != null) {
CurrentProfileChanged.Invoke(sender, args);
}
}
public UserGesturesProfile NewProfile
public static void Reset()
{
get; set;
CurrentProfile = null;
CurrentProfileChanged = null;
}
}
public delegate void UserGestureProfileChangedHandler(object sender, UserGestureProfileChangedArgs args);
}

25
src/Main/ICSharpCode.Core.Presentation/CommandsService/UserGestureProfileChangedEvent.cs

@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
/*
* Created by SharpDevelop.
* User: Sergej Andrejev
* Date: 8/3/2009
* Time: 7:47 PM
*/
using System;
namespace ICSharpCode.Core.Presentation
{
public class NotifyUserGestureProfileChangedEventArgs
{
public UserGesturesProfile OldProfile
{
get; set;
}
public UserGesturesProfile NewProfile
{
get; set;
}
}
public delegate void NotifyUserGestureProfileChangedEventHandler(object sender, NotifyUserGestureProfileChangedEventArgs args);
}

57
src/Main/ICSharpCode.Core.Presentation/CommandsService/UserGesturesProfile.cs

@ -11,6 +11,7 @@ using System.Xml; @@ -11,6 +11,7 @@ using System.Xml;
using System.Windows.Input;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using SDCommandManager=ICSharpCode.Core.Presentation.CommandManager;
namespace ICSharpCode.Core.Presentation
{
@ -141,18 +142,25 @@ namespace ICSharpCode.Core.Presentation @@ -141,18 +142,25 @@ namespace ICSharpCode.Core.Presentation
xmlDocument.Save(Path);
}
public event InputBindingGesturesChangedHandler InputBindingGesturesChanged;
public void Clear()
{
if(InputBindingGesturesChanged != null) {
var identifiers = new List<InputBindingIdentifier>();
foreach(var userDefinedGesture in userDefinedGestures) {
InputBindingGesturesChanged.Invoke(this, new InputBindingGesturesChangedArgs { InputBindingIdentifier = userDefinedGesture.Key});
}
var descriptions = new List<GesturesModificationDescription>();
var args = new NotifyGesturesChangedEventArgs();
foreach(var pair in this) {
var template = new BindingInfoTemplate(pair.Key);
var newGestures = SDCommandManager.FindInputGestures(BindingInfoMatchType.SuperSet, template);
descriptions.Add(
new GesturesModificationDescription(
pair.Key,
userDefinedGestures[pair.Key],
newGestures));
}
userDefinedGestures.Clear();
SDCommandManager.InvokeGesturesChanged(this, args);
}
public InputGestureCollection this[InputBindingIdentifier identifier]
@ -181,11 +189,23 @@ namespace ICSharpCode.Core.Presentation @@ -181,11 +189,23 @@ namespace ICSharpCode.Core.Presentation
/// <param name="inputGestureCollection">Gesture assigned to this input binding</param>
private void SetInputBindingGestures(InputBindingIdentifier identifier, InputGestureCollection inputGestureCollection)
{
if(InputBindingGesturesChanged != null) {
InputBindingGesturesChanged.Invoke(this, new InputBindingGesturesChangedArgs { InputBindingIdentifier = identifier});
var oldGestures = GetInputBindingGesture(identifier);
var newGestures = inputGestureCollection;
if(oldGestures == null || newGestures == null) {
var template = new BindingInfoTemplate(identifier);
var defaultGestures = SDCommandManager.FindInputGestures(BindingInfoMatchType.Exact, template);
oldGestures = oldGestures ?? defaultGestures;
newGestures = newGestures ?? defaultGestures;
}
var args = new NotifyGesturesChangedEventArgs(
new GesturesModificationDescription(identifier, oldGestures, newGestures));
userDefinedGestures[identifier] = inputGestureCollection;
InvokeGesturesChanged(this, args);
}
public IEnumerator<KeyValuePair<InputBindingIdentifier, InputGestureCollection>> GetEnumerator()
@ -198,6 +218,15 @@ namespace ICSharpCode.Core.Presentation @@ -198,6 +218,15 @@ namespace ICSharpCode.Core.Presentation
return userDefinedGestures.GetEnumerator();
}
public event NotifyGesturesChangedEventHandler GesturesChanged;
public void InvokeGesturesChanged(object sender, NotifyGesturesChangedEventArgs args)
{
if(GesturesChanged != null) {
GesturesChanged.Invoke(sender, args);
}
}
public object Clone()
{
var profile = new UserGesturesProfile(Name, Text, ReadOnly);
@ -209,14 +238,4 @@ namespace ICSharpCode.Core.Presentation @@ -209,14 +238,4 @@ namespace ICSharpCode.Core.Presentation
return profile;
}
}
public class InputBindingGesturesChangedArgs
{
public InputBindingIdentifier InputBindingIdentifier
{
get; set;
}
}
public delegate void InputBindingGesturesChangedHandler(object sender, InputBindingGesturesChangedArgs args);
}

5
src/Main/ICSharpCode.Core.Presentation/ICSharpCode.Core.Presentation.csproj

@ -76,9 +76,13 @@ @@ -76,9 +76,13 @@
<Compile Include="CommandsService\CommandBindingInfo.cs" />
<Compile Include="CommandsService\CommandManager.cs" />
<Compile Include="CommandsService\CommandsService.cs" />
<Compile Include="CommandsService\Events\NotifyBindingsChangedEvent.cs" />
<Compile Include="CommandsService\Events\NotifyGesturesChangedEvent.cs" />
<Compile Include="CommandsService\Events\NotifyUserGestureProfileChangedEvent.cs" />
<Compile Include="CommandsService\IBindingInfo.cs" />
<Compile Include="CommandsService\InputBindingCategory.cs" />
<Compile Include="CommandsService\InputBindingCategoryCollection.cs" />
<Compile Include="CommandsService\InputBindingIndentifier.cs" />
<Compile Include="CommandsService\InputBindingInfo.cs" />
<Compile Include="CommandsService\ObservableInputGestureCollection.cs" />
<Compile Include="CommandsService\RelationshipMap.cs" />
@ -126,6 +130,7 @@ @@ -126,6 +130,7 @@
<Name>ICSharpCode.Core</Name>
<Private>False</Private>
</ProjectReference>
<Folder Include="CommandsService\Events" />
<Folder Include="CommandsService\Utils" />
<Folder Include="Input" />
<Folder Include="Menu" />

52
src/Main/ICSharpCode.Core.Presentation/Menu/MenuCommand.cs

@ -9,6 +9,7 @@ using System; @@ -9,6 +9,7 @@ using System;
using System.Collections;
using System.Diagnostics;
using System.Reflection;
using System.Linq;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
@ -118,46 +119,41 @@ namespace ICSharpCode.Core.Presentation @@ -118,46 +119,41 @@ namespace ICSharpCode.Core.Presentation
class MenuCommand : CoreMenuItem
{
private BindingInfoTemplate bindingTemplate;
public MenuCommand(UIElement inputBindingOwner, Codon codon, object caller, bool createCommand) : base(codon, caller)
{
string routedCommandName = null;
bindingTemplate = new BindingInfoTemplate();
if(codon.Properties.Contains("command")) {
routedCommandName = codon.Properties["command"];
bindingTemplate.RoutedCommandName = codon.Properties["command"];
} else if(codon.Properties.Contains("link") || codon.Properties.Contains("class")) {
routedCommandName = string.IsNullOrEmpty(codon.Properties["link"]) ? codon.Properties["class"] : codon.Properties["link"];
}
var routedCommand = CommandManager.GetRoutedUICommand(routedCommandName);
if(routedCommand != null) {
this.Command = routedCommand;
bindingTemplate.RoutedCommandName = string.IsNullOrEmpty(codon.Properties["link"]) ? codon.Properties["class"] : codon.Properties["link"];
}
// Register input bindings update handler
BindingsUpdatedHandler gesturesUpdateHandler = delegate {
var gesturesTemplate = new BindingInfoTemplate();
gesturesTemplate.RoutedCommandName = routedCommandName;
if(codon.Properties.Contains("ownerinstance")) {
gesturesTemplate.OwnerInstanceName = codon.Properties["ownerinstance"];
} else if(codon.Properties.Contains("ownertype")) {
gesturesTemplate.OwnerTypeName = codon.Properties["ownertype"];
}
var updatedGestures = CommandManager.FindInputGestures(BindingInfoMatchType.SuperSet, gesturesTemplate);
this.InputGestureText = (string)new InputGestureCollectionConverter().ConvertToInvariantString(updatedGestures);
};
gesturesUpdateHandler.Invoke(this, new BindingsUpdatedHandlerArgs());
var bindingTemplate = new BindingInfoTemplate();
if(codon.Properties.Contains("ownerinstance")) {
bindingTemplate.OwnerInstanceName = codon.Properties["ownerinstance"];
} else if(codon.Properties.Contains("ownertype")) {
bindingTemplate.OwnerTypeName = codon.Properties["ownertype"];
}
bindingTemplate.RoutedCommandName = routedCommandName;
var routedCommand = CommandManager.GetRoutedUICommand(bindingTemplate.RoutedCommandName);
if(routedCommand != null) {
this.Command = routedCommand;
}
CommandManager.RegisterInputBindingsUpdateHandler(bindingTemplate, gesturesUpdateHandler);
var gestures = CommandManager.FindInputGestures(BindingInfoMatchType.SuperSet, bindingTemplate);
this.InputGestureText = (string)new InputGestureCollectionConverter().ConvertToInvariantString(gestures);
CommandManager.GesturesChanged += MenuCommand_GesturesChanged;
}
private void MenuCommand_GesturesChanged(object sender, NotifyGesturesChangedEventArgs e)
{
if(e.ModificationDescriptions.Any(d => bindingTemplate.IsTemplateFor(new BindingInfoTemplate(d.InputBindingIdentifier), BindingInfoMatchType.SuperSet))) {
var updatedGestures = CommandManager.FindInputGestures(BindingInfoMatchType.SuperSet, bindingTemplate);
this.InputGestureText = (string)new InputGestureCollectionConverter().ConvertToInvariantString(updatedGestures);
}
}
}
}

147
src/Main/ICSharpCode.Core.Presentation/Test/BindingGroupTests.cs

@ -39,7 +39,15 @@ namespace ICSharpCode.Core.Presentation.Tests @@ -39,7 +39,15 @@ namespace ICSharpCode.Core.Presentation.Tests
[Test]
public void AttachGroupMethod()
{
var results = new List<string>();
var result = false;
SDCommandManager.BindingsChanged += delegate(object sender, NotifyBindingsChangedEventArgs args) {
if(args.Action == NotifyBindingsChangedAction.GroupAttachmendsModified
&& args.AttachedInstances.Contains(uiElement)
&& args.Groups.Contains(bindingGroup)) {
result = true;
}
};
var bindingInfo = new InputBindingInfo();
bindingInfo.RoutedCommandName = "ApplicationCommands.Copy";
@ -47,30 +55,26 @@ namespace ICSharpCode.Core.Presentation.Tests @@ -47,30 +55,26 @@ namespace ICSharpCode.Core.Presentation.Tests
bindingInfo.DefaultGestures.Add(new KeyGesture(Key.C, ModifierKeys.Alt));
bindingInfo.Groups.Add(bindingGroup);
SDCommandManager.RegisterInputBinding(bindingInfo);
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate(),
delegate { results.Add("SubSetTest"); });
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate {
RoutedCommandName = "ApplicationCommands.Copy",
OwnerInstanceName = "NamedInstance",
Groups = new BindingGroupCollection { bindingGroup } },
delegate { results.Add("SuperSetTest"); });
Assert.AreEqual(0, uiElement.InputBindings.Count);
Assert.IsEmpty(uiElement.InputBindings);
bindingGroup.AttachTo(uiElement);
Assert.AreEqual(1, uiElement.InputBindings.Count);
Assert.Contains("SubSetTest", results);
Assert.Contains("SuperSetTest", results);
Assert.IsTrue(result);
}
[Test]
public void DetachGroupMethod()
{
var results = new List<string>();
var result = false;
SDCommandManager.BindingsChanged += delegate(object sender, NotifyBindingsChangedEventArgs args) {
if(args.Action == NotifyBindingsChangedAction.GroupAttachmendsModified
&& args.AttachedInstances.Contains(uiElement)
&& args.Groups.Contains(bindingGroup)) {
result = true;
}
};
var bindingInfo = new InputBindingInfo();
bindingInfo.RoutedCommandName = "ApplicationCommands.Copy";
@ -81,32 +85,26 @@ namespace ICSharpCode.Core.Presentation.Tests @@ -81,32 +85,26 @@ namespace ICSharpCode.Core.Presentation.Tests
bindingGroup.AttachTo(uiElement);
Assert.AreEqual(1, uiElement.InputBindings.Count);
Assert.IsTrue(result);
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate(),
delegate { results.Add("SuperSetTest"); });
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate {
RoutedCommandName = "ApplicationCommands.Copy",
OwnerInstanceName = "NamedInstance",
Groups = new BindingGroupCollection { bindingGroup } },
delegate { results.Add("SubSetTest"); });
result = false;
bindingGroup.DetachFrom(uiElement);
Assert.AreEqual(0, uiElement.InputBindings.Count);
Assert.Contains("SubSetTest", results);
Assert.Contains("SuperSetTest", results);
Assert.IsEmpty(uiElement.InputBindings);
Assert.IsTrue(result);
}
[Test]
public void AddAttachedGroupTest()
{
var results = new List<string>();
var result = false;
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { Groups = new BindingGroupCollection { bindingGroup } },
delegate { results.Add("SuperSetTest"); });
SDCommandManager.BindingsChanged += delegate(object sender, NotifyBindingsChangedEventArgs args) {
if(args.Action == NotifyBindingsChangedAction.GroupAttachmendsModified
&& args.AttachedInstances.Contains(uiElement)
&& args.Groups.Contains(bindingGroup)) {
result = true;
}
};
var bindingInfo = new InputBindingInfo();
bindingInfo.RoutedCommandName = "ApplicationCommands.Copy";
@ -114,12 +112,11 @@ namespace ICSharpCode.Core.Presentation.Tests @@ -114,12 +112,11 @@ namespace ICSharpCode.Core.Presentation.Tests
bindingInfo.DefaultGestures.Add(new KeyGesture(Key.C, ModifierKeys.Alt));
SDCommandManager.RegisterInputBinding(bindingInfo);
Assert.IsFalse(results.Contains("SuperSetTest"));
Assert.IsFalse(result);
bindingGroup.AttachTo(uiElement);
bindingInfo.Groups.Add(bindingGroup);
Assert.Contains("SuperSetTest", results);
Assert.IsTrue(result);
Assert.IsTrue(uiElement.InputBindings[0].Command == ApplicationCommands.Copy);
}
@ -137,78 +134,14 @@ namespace ICSharpCode.Core.Presentation.Tests @@ -137,78 +134,14 @@ namespace ICSharpCode.Core.Presentation.Tests
bindingInfo.Groups.Add(bindingGroup);
SDCommandManager.RegisterInputBinding(bindingInfo);
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate(),
delegate { results.Add("SubSetTest"); });
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate {
RoutedCommandName = "ApplicationCommands.Copy",
OwnerInstanceName = "OtherNamedInstance",
Groups = new BindingGroupCollection { bindingGroup } },
delegate { results.Add("OtherSuperSetTest"); });
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate {
RoutedCommandName = "ApplicationCommands.Copy",
OwnerInstanceName = "NamedInstance",
Groups = new BindingGroupCollection { bindingGroup } },
delegate { results.Add("SuperSetTest"); });
bindingGroup.AttachTo(otherUIElement);
Assert.AreEqual(0, uiElement.InputBindings.Count);
Assert.IsFalse(results.Contains("SubSetTest"));
Assert.IsFalse(results.Contains("OtherSuperSetTest"));
Assert.IsFalse(results.Contains("SuperSetTest"));
Assert.IsEmpty(otherUIElement.InputBindings);
SDCommandManager.RegisterNamedUIElement("OtherNamedInstance", otherUIElement);
Assert.AreEqual(1, otherUIElement.InputBindings.Count);
Assert.IsTrue(results.Contains("SubSetTest"));
Assert.IsTrue(results.Contains("OtherSuperSetTest"));
Assert.IsFalse(results.Contains("SuperSetTest"));
}
[Test]
public void UnregisterNamedInstanceAttachedToGroupTest()
{
var results = new List<string>();
var otherUIElement = new UIElement();
var bindingInfo = new InputBindingInfo();
bindingInfo.RoutedCommandName = "ApplicationCommands.Copy";
bindingInfo.OwnerInstanceName = "OtherNamedInstance";
bindingInfo.DefaultGestures.Add(new KeyGesture(Key.C, ModifierKeys.Alt));
bindingInfo.Groups.Add(bindingGroup);
SDCommandManager.RegisterInputBinding(bindingInfo);
bindingGroup.AttachTo(otherUIElement);
SDCommandManager.RegisterNamedUIElement("OtherNamedInstance", otherUIElement);
Assert.AreEqual(1, otherUIElement.InputBindings.Count);
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate(),
delegate { results.Add("SubSetTest"); });
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate {
RoutedCommandName = "ApplicationCommands.Copy",
OwnerInstanceName = "OtherNamedInstance",
Groups = new BindingGroupCollection { bindingGroup } },
delegate { results.Add("OtherSuperSetTest"); });
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate {
RoutedCommandName = "ApplicationCommands.Copy",
OwnerInstanceName = "NamedInstance",
Groups = new BindingGroupCollection { bindingGroup } },
delegate { results.Add("SuperSetTest"); });
SDCommandManager.UnregisterNamedUIElement("OtherNamedInstance", otherUIElement);
Assert.AreEqual(0, otherUIElement.InputBindings.Count);
Assert.IsTrue(results.Contains("SubSetTest"));
Assert.IsTrue(results.Contains("OtherSuperSetTest"));
Assert.IsFalse(results.Contains("SuperSetTest"));
Assert.AreEqual(1, otherUIElement.InputBindings.Count);
SDCommandManager.UnregisterNamedUIElement("OtherNamedInstance", otherUIElement);
Assert.IsEmpty(otherUIElement.InputBindings);
}
[Test]

652
src/Main/ICSharpCode.Core.Presentation/Test/CommandManagerTests.cs

@ -31,402 +31,166 @@ namespace ICSharpCode.Core.Presentation.Tests @@ -31,402 +31,166 @@ namespace ICSharpCode.Core.Presentation.Tests
}
[Test]
public void InvokeInputBindingUpdateHandlersManually()
public void InvokeBindingUpdateHandlersManually()
{
var testResult = false;
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeTest" },
delegate { testResult = true; });
SDCommandManager.BindingsChanged += delegate(object sender, NotifyBindingsChangedEventArgs args) {
if(args.Action == NotifyBindingsChangedAction.NamedTypeModified && args.OldNamedTypes.Contains(typeof(UIElement))) {
testResult = true;
}
};
SDCommandManager.InvokeInputBindingUpdateHandlers(
SDCommandManager.InvokeBindingsChanged(
null,
new BindingsUpdatedHandlerArgs(),
BindingInfoMatchType.SubSet,
new BindingInfoTemplate { RoutedCommandName = "InvokeTest" });
new NotifyBindingsChangedEventArgs(
NotifyBindingsChangedAction.NamedTypeModified,
"SomeType",
new [] { typeof(UIElement) },
new Type[0]));
Assert.IsTrue(testResult);
}
[Test]
public void InvokeInputBindingUpdateHandlersWithTwoParamsManually()
{
var testResults = new List<string>();
System.IO.File.AppendAllText("C:/test.txt", "Add" + Environment.NewLine);
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerTypeName = "InvokeOwner" },
delegate { testResults.Add("TwoExactAttributes"); });
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeTest" },
delegate { testResults.Add("LessMatchingAttributes"); });
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeTest2" },
delegate { testResults.Add("LessNotMatchingAttributes"); });
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate(),
delegate { testResults.Add("NoAttributes"); });
SDCommandManager.InvokeInputBindingUpdateHandlers(
null,
new BindingsUpdatedHandlerArgs(),
BindingInfoMatchType.SubSet,
new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerTypeName = "InvokeOwner" });
Assert.IsTrue(testResults.Contains("TwoExactAttributes"));
Assert.IsTrue(testResults.Contains("LessMatchingAttributes"));
Assert.IsFalse(testResults.Contains("LessNotMatchingAttributes"));
Assert.IsTrue(testResults.Contains("NoAttributes"));
}
[Test]
public void InvokeInputBindingsOnRoutedCommandRegistration()
{
var testResults = new HashSet<string>();
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeTest" },
delegate { testResults.Add("test1"); });
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerTypeName = "TestOwner" },
delegate { testResults.Add("test2"); });
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "ApplicationCommands.Copy" },
delegate { testResults.Add("ApplicationCommands.Copy"); });
SDCommandManager.RegisterRoutedUICommand("InvokeTest", "text");
Assert.IsTrue(testResults.Contains("test1"));
Assert.IsTrue(testResults.Contains("test2"));
Assert.IsFalse(testResults.Contains("ApplicationCommands.Copy"));
SDCommandManager.RegisterRoutedUICommand(ApplicationCommands.Copy);
Assert.IsTrue(testResults.Contains("ApplicationCommands.Copy"));
}
[Test]
public void InvokeCommandBindingsOnRoutedCommandRegistration()
{
var testResults = new HashSet<string>();
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeTest" },
delegate { testResults.Add("test1"); });
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerTypeName = "TestOwner" },
delegate { testResults.Add("test2"); });
var testResult = false;
SDCommandManager.BindingsChanged += delegate(object sender, NotifyBindingsChangedEventArgs args) {
if(args.Action == NotifyBindingsChangedAction.RoutedUICommandModified && args.RoutedCommandName == "InvokeTest") {
testResult = true;
}
};
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "ApplicationCommands.Copy" },
delegate { testResults.Add("ApplicationCommands.Copy"); });
var existingCommandTestResult = false;
SDCommandManager.BindingsChanged += delegate(object sender, NotifyBindingsChangedEventArgs args) {
if(args.Action == NotifyBindingsChangedAction.RoutedUICommandModified && args.RoutedCommandName == "ApplicationCommands.Copy") {
existingCommandTestResult = true;
}
};
SDCommandManager.RegisterRoutedUICommand("InvokeTest", "text");
Assert.IsTrue(testResults.Contains("test1"));
Assert.IsTrue(testResults.Contains("test2"));
Assert.IsFalse(testResults.Contains("ApplicationCommands.Copy"));
Assert.IsTrue(testResult);
Assert.IsFalse(existingCommandTestResult);
SDCommandManager.RegisterRoutedUICommand(ApplicationCommands.Copy);
Assert.IsTrue(testResults.Contains("ApplicationCommands.Copy"));
Assert.IsTrue(existingCommandTestResult);
}
[Test]
public void InvokeInputBindingsOnOwnerTypeRegistration()
{
var testResults = new HashSet<string>();
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { OwnerTypeName = "TestOwnerType" },
delegate { testResults.Add("TestOwnerType1"); });
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "RoutedCommand", OwnerTypeName = "TestOwnerType" },
delegate { testResults.Add("TestOwnerType2"); });
SDCommandManager.RegisterNamedUIType("TestOwnerType", typeof(UserControl));
Assert.IsTrue(testResults.Contains("TestOwnerType1"));
Assert.IsTrue(testResults.Contains("TestOwnerType2"));
}
[Test]
public void InvokeCommandBindingsOnOwnerTypeRegistration()
{
var testResults = new HashSet<string>();
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { OwnerTypeName = "TestOwnerType" },
delegate { testResults.Add("TestOwnerType1"); });
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "RoutedCommand", OwnerTypeName = "TestOwnerType" },
delegate { testResults.Add("TestOwnerType2"); });
SDCommandManager.RegisterNamedUIType("TestOwnerType", typeof(UserControl));
var results = new HashSet<string>();
Assert.IsTrue(testResults.Contains("TestOwnerType1"));
Assert.IsTrue(testResults.Contains("TestOwnerType2"));
}
[Test]
public void InvokeCommandBindingsOnOwnerTypeUnregistration()
{
var testResults = new HashSet<string>();
SDCommandManager.BindingsChanged += delegate(object sender, NotifyBindingsChangedEventArgs args) {
if(args.Action == NotifyBindingsChangedAction.NamedTypeModified && args.TypeName == "TestOwnerType") {
if(args.NewNamedTypes.Contains(typeof(UserControl)) && !args.OldNamedTypes.Contains(typeof(UserControl))) {
results.Add("UserControlAdded");
}
if(args.OldNamedTypes.Contains(typeof(UserControl)) && !args.NewNamedTypes.Contains(typeof(UserControl))) {
results.Add("UserControlRemoved");
}
}
};
results.Clear();
SDCommandManager.RegisterNamedUIType("TestOwnerType", typeof(UserControl));
Assert.IsTrue(results.Contains("UserControlAdded"));
Assert.IsFalse(results.Contains("UserControlRemoved"));
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { OwnerTypeName = "TestOwnerType" },
delegate { testResults.Add("TestOwnerType1"); });
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "RoutedCommand", OwnerTypeName = "TestOwnerType" },
delegate { testResults.Add("TestOwnerType2"); });
results.Clear();
SDCommandManager.UnregisterNamedUIType("TestOwnerType", typeof(UserControl));
Assert.IsTrue(testResults.Contains("TestOwnerType1"));
Assert.IsTrue(testResults.Contains("TestOwnerType2"));
Assert.IsFalse(results.Contains("UserControlAdded"));
Assert.IsTrue(results.Contains("UserControlRemoved"));
}
[Test]
public void InvokeInputBindingsOnOwnerInstanceRegistration()
{
var testResults = new HashSet<string>();
var results = new HashSet<string>();
var uiElement = new UIElement();
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { OwnerInstanceName = "TestOwnerInstance" },
delegate { testResults.Add("TestOwnerInstance1"); });
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "RoutedCommand", OwnerInstanceName = "TestOwnerInstance" },
delegate { testResults.Add("TestOwnerInstance2"); });
SDCommandManager.BindingsChanged += delegate(object sender, NotifyBindingsChangedEventArgs args) {
if(args.Action == NotifyBindingsChangedAction.NamedInstanceModified && args.UIElementName == "TestOwner") {
if(args.NewNamedUIElements.Contains(uiElement) && !args.OldNamedUIElements.Contains(uiElement)) {
results.Add("UIElementAdded");
}
if(!args.NewNamedUIElements.Contains(uiElement) && args.OldNamedUIElements.Contains(uiElement)) {
results.Add("UIElementRemoved");
}
}
};
SDCommandManager.RegisterNamedUIElement("TestOwnerInstance", new UIElement());
results.Clear();
SDCommandManager.RegisterNamedUIElement("TestOwner", uiElement);
Assert.IsTrue(results.Contains("UIElementAdded"));
Assert.IsFalse(results.Contains("UIElementRemoved"));
Assert.IsTrue(testResults.Contains("TestOwnerInstance1"));
Assert.IsTrue(testResults.Contains("TestOwnerInstance2"));
results.Clear();
SDCommandManager.UnregisterNamedUIElement("TestOwner", uiElement);
Assert.IsFalse(results.Contains("UIElementAdded"));
Assert.IsTrue(results.Contains("UIElementRemoved"));
}
[Test]
public void InvokeCommandBindingsOnOwnerInstanceRegistration()
public void InvokeBindingsUpdateHandlersOnInputBindingInfoRegistration()
{
var testResults = new HashSet<string>();
var uiElement = new UIElement();
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { OwnerInstanceName = "TestOwnerInstance" },
delegate { testResults.Add("TestOwnerInstance1"); });
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "RoutedCommand", OwnerInstanceName = "TestOwnerInstance" },
delegate { testResults.Add("TestOwnerInstance2"); });
SDCommandManager.RegisterNamedUIElement("TestOwnerInstance", new UIElement());
var testResult = false;
Assert.IsTrue(testResults.Contains("TestOwnerInstance1"));
Assert.IsTrue(testResults.Contains("TestOwnerInstance2"));
}
[Test]
public void InvokeCommandBindingsOnOwnerInstanceUnregistration()
{
var testResults = new HashSet<string>();
var uiElement = new UIElement();
SDCommandManager.RegisterNamedUIElement("TestOwnerInstance", uiElement);
SDCommandManager.RegisterNamedUIElement("TestOwnerInstance", new UIElement());
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { OwnerInstanceName = "TestOwnerInstance" },
delegate { testResults.Add("TestOwnerInstance1"); });
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "RoutedCommand", OwnerInstanceName = "TestOwnerInstance" },
delegate { testResults.Add("TestOwnerInstance2"); });
SDCommandManager.UnregisterNamedUIElement("TestOwnerInstance", uiElement);
Assert.IsTrue(testResults.Contains("TestOwnerInstance1"));
Assert.IsTrue(testResults.Contains("TestOwnerInstance2"));
}
[Test]
public void InvokeBindingsUpdateHandlersOnInputBindingInfoRegistration()
{
var testResults = new HashSet<string>();
var bindingInfo = new InputBindingInfo { RoutedCommandName = "InvokeTest", OwnerInstanceName = "TestOwnerInstance", DefaultGestures = new ObservableInputGestureCollection { new KeyGesture(Key.K, ModifierKeys.Control) } };
// Update handles is interested about changes in routed command
SDCommandManager.RegisterRoutedUICommand("RoutedCommandName", "RoutedCommandText");
var routedCommand = SDCommandManager.GetRoutedUICommand("RoutedCommandName");
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeSomethingUnrelatedTest" },
delegate { testResults.Add("commandTest0"); });
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "RoutedCommandName" },
delegate { testResults.Add("commandTest1"); });
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "RoutedCommandName", OwnerTypeName = "TestOwner" },
delegate { testResults.Add("commandTest2"); });
SDCommandManager.RegisterInputBinding(new InputBindingInfo {
RoutedCommandName = "RoutedCommandName",
OwnerTypeName = "SomeOwner"});
Assert.IsFalse(testResults.Contains("commandTest0"));
Assert.IsTrue(testResults.Contains("commandTest1"));
Assert.IsFalse(testResults.Contains("commandTest2"));
// Update handles is interested about changes in owner type
var testType = typeof(UserControl);
SDCommandManager.RegisterNamedUIType("TestOwner", testType);
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeSomethingUnrelatedTest" },
delegate { testResults.Add("typeTest0"); });
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeTest" },
delegate { testResults.Add("typeTest1"); });
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerTypeName = "TestOwner" },
delegate { testResults.Add("typeTest2"); });
SDCommandManager.RegisterInputBinding(new InputBindingInfo {
RoutedCommandName = "InvokeTest",
OwnerTypeName = "TestOwner"});
Assert.IsFalse(testResults.Contains("typeTest0"));
Assert.IsTrue(testResults.Contains("typeTest1"));
Assert.IsTrue(testResults.Contains("typeTest2"));
// Update handles is interested about changes in owner instance
var testInstance = new UIElement();
SDCommandManager.RegisterNamedUIElement("TestOwnerInstance", testInstance);
SDCommandManager.RegisterRoutedUICommand("InvokeTest", "RoutedCommandText");
SDCommandManager.RegisterNamedUIElement("TestOwnerInstance", uiElement);
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeSomethingUnrelatedTest" },
delegate { testResults.Add("instanceTest0"); });
SDCommandManager.BindingsChanged += delegate(object sender, NotifyBindingsChangedEventArgs args) {
var template = new BindingInfoTemplate(bindingInfo, false);
var contains = args.ModifiedBindingInfoTemplates.Contains(template);
if(args.Action == NotifyBindingsChangedAction.BindingInfoModified && contains) {
testResult = true;
}
};
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeTest" },
delegate { testResults.Add("instanceTest1"); });
Assert.IsEmpty(uiElement.InputBindings);
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerInstanceName = "TestOwnerInstance" },
delegate { testResults.Add("instanceTest2"); });
SDCommandManager.RegisterInputBinding(bindingInfo);
SDCommandManager.RegisterInputBinding(new InputBindingInfo {
RoutedCommandName = "InvokeTest",
OwnerInstanceName = "TestOwnerInstance"});
Assert.IsFalse(testResults.Contains("instanceTest0"));
Assert.IsTrue(testResults.Contains("instanceTest1"));
Assert.IsTrue(testResults.Contains("instanceTest2"));
Assert.IsTrue(testResult);
Assert.AreEqual(1, uiElement.InputBindings.Count);
Assert.AreEqual("InvokeTest", ((RoutedUICommand)uiElement.InputBindings[0].Command).Name);
}
[Test]
public void InvokeBindingsUpdateHandlersOnCommandBindingInfoRegistration()
{
var testResults = new HashSet<string>();
// Update handles is interested about changes in routed command
SDCommandManager.RegisterRoutedUICommand("RoutedCommandName", "RoutedCommandText");
var routedCommand = SDCommandManager.GetRoutedUICommand("RoutedCommandName");
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeSomethingUnrelatedTest" },
delegate { testResults.Add("commandTest0"); });
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "RoutedCommandName" },
delegate { testResults.Add("commandTest1"); });
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "RoutedCommandName", OwnerTypeName = "TestOwner" }, delegate { testResults.Add("commandTest2"); });
SDCommandManager.RegisterCommandBinding(new CommandBindingInfo {
RoutedCommandName = "RoutedCommandName",
OwnerTypeName = "SomeOwner"});
Assert.IsFalse(testResults.Contains("commandTest0"));
Assert.IsTrue(testResults.Contains("commandTest1"));
Assert.IsFalse(testResults.Contains("commandTest2"));
// Update handles is interested about changes in owner type
var testType = typeof(UserControl);
SDCommandManager.RegisterNamedUIType("TestOwner", testType);
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeSomethingUnrelatedTest" },
delegate { testResults.Add("typeTest0"); });
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeTest" },
delegate { testResults.Add("typeTest1"); });
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerTypeName = "TestOwner" },
delegate { testResults.Add("typeTest2"); });
SDCommandManager.RegisterCommandBinding(new CommandBindingInfo {
RoutedCommandName = "InvokeTest",
OwnerTypeName = "TestOwner"});
Assert.IsFalse(testResults.Contains("typeTest0"));
Assert.IsTrue(testResults.Contains("typeTest1"));
Assert.IsTrue(testResults.Contains("typeTest2"));
var testResult = false;
// Update handles is interested about changes in owner instance
var testInstance = new UIElement();
SDCommandManager.RegisterNamedUIElement("TestOwnerInstance", testInstance);
var uiElement = new UIElement();
var bindingInfo = new CommandBindingInfo { RoutedCommandName = "InvokeTest", OwnerInstanceName = "TestOwnerInstance"};
SDCommandManager.RegisterRoutedUICommand("InvokeTest", "RoutedCommandText");
SDCommandManager.RegisterNamedUIElement("TestOwnerInstance", uiElement);
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeSomethingUnrelatedTest" },
delegate { testResults.Add("instanceTest0"); });
SDCommandManager.BindingsChanged += delegate(object sender, NotifyBindingsChangedEventArgs args) {
if(args.Action == NotifyBindingsChangedAction.BindingInfoModified && args.ModifiedBindingInfoTemplates.Contains(bindingInfo)) {
testResult = true;
}
};
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeTest" },
delegate { testResults.Add("instanceTest1"); });
Assert.IsEmpty(uiElement.InputBindings);
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerInstanceName = "TestOwnerInstance" },
delegate { testResults.Add("instanceTest2"); });
SDCommandManager.RegisterCommandBinding(bindingInfo);
SDCommandManager.RegisterCommandBinding(new CommandBindingInfo {
RoutedCommandName = "InvokeTest",
OwnerInstanceName = "TestOwnerInstance"});
Assert.IsFalse(testResults.Contains("instanceTest0"));
Assert.IsTrue(testResults.Contains("instanceTest1"));
Assert.IsTrue(testResults.Contains("instanceTest2"));
Assert.IsTrue(testResult);
Assert.AreEqual(1, uiElement.CommandBindings.Count);
Assert.AreEqual("InvokeTest", ((RoutedUICommand)uiElement.CommandBindings[0].Command).Name);
}
[Test]
public void InvokeUpdateHandlersOnGroupsSetTest()
public void GroupAddRemoveTests()
{
var testResults = new HashSet<string>();
@ -439,44 +203,36 @@ namespace ICSharpCode.Core.Presentation.Tests @@ -439,44 +203,36 @@ namespace ICSharpCode.Core.Presentation.Tests
Groups = new BindingGroupCollection { removedGroup }
};
SDCommandManager.RegisterCommandBinding(bindingInfo);
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { Groups = new BindingGroupCollection { removedGroup } },
delegate { testResults.Add("removedGroup"); });
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { Groups = new BindingGroupCollection { addedGroup } },
delegate { testResults.Add("addedGroup"); });
bindingInfo.Groups = new BindingGroupCollection { addedGroup };
Assert.IsTrue(testResults.Contains("addedGroup"));
Assert.IsTrue(testResults.Contains("removedGroup"));
}
[Test]
public void InvokeUpdateHandlersOnGroupsClearTest()
{
var testResults = new HashSet<string>();
var removedGroup = new BindingGroup();
var addedGroup = new BindingGroup();
var bindingInfo = new CommandBindingInfo {
RoutedCommandName = "RoutedCommandName",
OwnerTypeName = "SomeOwner",
Groups = new BindingGroupCollection { removedGroup }
CommandManager.BindingsChanged += delegate(object sender, NotifyBindingsChangedEventArgs args) {
if(args.Action == NotifyBindingsChangedAction.GroupAttachmendsModified && args.Groups.Contains(addedGroup)) {
testResults.Add("GroupAdded");
}
if(args.Action == NotifyBindingsChangedAction.GroupAttachmendsModified && args.Groups.Contains(removedGroup)) {
testResults.Add("GroupRemoved");
}
};
SDCommandManager.RegisterCommandBinding(bindingInfo);
SDCommandManager.RegisterCommandBindingsUpdateHandler(
new BindingInfoTemplate { Groups = new BindingGroupCollection { removedGroup } },
delegate { testResults.Add("removedGroup"); });
testResults.Clear();
bindingInfo.Groups = new BindingGroupCollection { addedGroup };
Assert.IsTrue(testResults.Contains("GroupAdded"));
Assert.IsTrue(testResults.Contains("GroupRemoved"));
bindingInfo.Groups.Clear();
testResults.Clear();
bindingInfo.Groups.Add(addedGroup);
Assert.IsTrue(testResults.Contains("GroupAdded"));
testResults.Clear();
bindingInfo.Groups.Remove(addedGroup);
Assert.IsTrue(testResults.Contains("GroupAdded"));
Assert.IsTrue(testResults.Contains("removedGroup"));
bindingInfo.Groups.Add(removedGroup);
testResults.Clear();
bindingInfo.Groups.Clear();
Assert.IsTrue(testResults.Contains("GroupRemoved"));
}
[Test]
@ -508,5 +264,167 @@ namespace ICSharpCode.Core.Presentation.Tests @@ -508,5 +264,167 @@ namespace ICSharpCode.Core.Presentation.Tests
// Map backward (after GC)
Assert.Throws(typeof(ArgumentNullException), delegate { SDCommandManager.GetUIElementNameCollection(uiElement); });
}
[Test]
public void InvokeGesturesChangedManualyTest()
{
var result = false;
var oldGestures = new InputGestureCollection();
var newGestures = new InputGestureCollection();
var identifier = new InputBindingIdentifier { OwnerInstanceName = "SomeOwner", RoutedCommandName = "SomeCommand" };
SDCommandManager.GesturesChanged += delegate(object sender, NotifyGesturesChangedEventArgs args) {
if(args.ModificationDescriptions.Count == 1
&& args.ModificationDescriptions.All(
d => d.InputBindingIdentifier.Equals(identifier)
&& d.OldGestures == oldGestures
&& d.NewGestures == newGestures)) {
result = true;
}
};
SDCommandManager.InvokeGesturesChanged(
null,
new NotifyGesturesChangedEventArgs(
new GesturesModificationDescription(
identifier,
oldGestures,
newGestures
)));
Assert.IsTrue(result);
}
[Test]
public void InvokeGesturesChangedOnCurrentProfileSetTest()
{
var results = new HashSet<string>();
var newGestures = new InputGestureCollection();
newGestures.Add(new KeyGesture(Key.C, ModifierKeys.Alt));
newGestures.Add(new KeyGesture(Key.D, ModifierKeys.Alt));
var identifier = new InputBindingIdentifier { OwnerInstanceName = "SomeOwner", RoutedCommandName = "SomeCommand" };
SDCommandManager.GesturesChanged += delegate(object sender, NotifyGesturesChangedEventArgs args) {
if(args.ModificationDescriptions.Count == 1
&& args.ModificationDescriptions.Any(
d => d.InputBindingIdentifier.Equals(identifier)
&& d.OldGestures.Count == 0
&& d.NewGestures.Count == 2)) {
results.Add("SetResult");
}
if(args.ModificationDescriptions.Count == 1
&& args.ModificationDescriptions.Any(
d => d.InputBindingIdentifier.Equals(identifier)
&& d.OldGestures.Count == 2
&& d.NewGestures.Count == 0)) {
results.Add("ResetResult");
}
};
var profile = new UserGesturesProfile();
profile[identifier] = newGestures;
results.Clear();
UserDefinedGesturesManager.CurrentProfile = profile;
Assert.IsTrue(results.Contains("SetResult"));
Assert.IsFalse(results.Contains("ResetResult"));
results.Clear();
UserDefinedGesturesManager.CurrentProfile = null;
Assert.IsFalse(results.Contains("SetResult"));
Assert.IsTrue(results.Contains("ResetResult"));
}
[Test]
public void InvokeGesturesChangedOnDefaultGesturesSetTest()
{
var results = new HashSet<string>();
var gestures = new InputGestureCollection();
gestures.Add(new KeyGesture(Key.C, ModifierKeys.Alt));
gestures.Add(new KeyGesture(Key.D, ModifierKeys.Alt));
var profileGestures = new InputGestureCollection();
profileGestures.Add(new KeyGesture(Key.T, ModifierKeys.Alt));
var bindingInfo = new InputBindingInfo();
bindingInfo.OwnerInstanceName = "SomeOwner";
bindingInfo.RoutedCommandName = "SomeCommand";
bindingInfo.DefaultGestures.AddRange(gestures);
SDCommandManager.RegisterInputBinding(bindingInfo);
SDCommandManager.GesturesChanged += delegate(object sender, NotifyGesturesChangedEventArgs args) {
if(args.ModificationDescriptions.Count == 1
&& args.ModificationDescriptions.Any(
d => d.InputBindingIdentifier.Equals(bindingInfo.Identifier)
&& d.OldGestures.Count == 2
&& d.NewGestures.Count == 3)) {
results.Add("GestureAdded");
}
if(args.ModificationDescriptions.Count == 1
&& args.ModificationDescriptions.Any(
d => d.InputBindingIdentifier.Equals(bindingInfo.Identifier)
&& d.OldGestures.Count == 3
&& d.NewGestures.Count == 2)) {
results.Add("GestureRemoved");
}
if(args.ModificationDescriptions.Count == 1
&& args.ModificationDescriptions.Any(
d => d.InputBindingIdentifier.Equals(bindingInfo.Identifier)
&& d.OldGestures.Count == 0
&& d.NewGestures.Count == 2)) {
results.Add("GesturesSet");
}
if(args.ModificationDescriptions.Count == 1
&& args.ModificationDescriptions.Any(
d => d.InputBindingIdentifier.Equals(bindingInfo.Identifier)
&& d.OldGestures.Count == 2
&& d.NewGestures.Count == 0)) {
results.Add("GesturesReset");
}
};
var key = new KeyGesture(Key.M, ModifierKeys.Control | ModifierKeys.Shift);
results.Clear();
var c = bindingInfo.DefaultGestures.Count;
bindingInfo.DefaultGestures.Add(key);
Assert.IsTrue(results.Contains("GestureAdded"));
Assert.IsFalse(results.Contains("GestureRemoved"));
results.Clear();
bindingInfo.DefaultGestures.Remove(key);
Assert.IsTrue(results.Contains("GestureRemoved"));
Assert.IsFalse(results.Contains("GestureAdded"));
var profile = new UserGesturesProfile();
profile[bindingInfo.Identifier] = new InputGestureCollection();
UserDefinedGesturesManager.CurrentProfile = profile;
// User defined gestures are used
results.Clear();
bindingInfo.DefaultGestures.Add(key);
bindingInfo.DefaultGestures.Remove(key);
Assert.IsFalse(results.Contains("GestureRemoved"));
Assert.IsFalse(results.Contains("GestureAdded"));
profile[bindingInfo.Identifier] = null;
results.Clear();
var backupDefaultGestures = bindingInfo.DefaultGestures;
bindingInfo.DefaultGestures = null;
Assert.IsTrue(results.Contains("GesturesReset"));
bindingInfo.DefaultGestures = backupDefaultGestures;
Assert.IsTrue(results.Contains("GesturesSet"));
}
}
}

Loading…
Cancel
Save