Esempio n. 1
0
		MemoryContentCommandLoader(IWpfCommandManager wpfCommandManager, MemoryToolWindowContentCreator memoryToolWindowContentCreator, IMainToolWindowManager mainToolWindowManager) {
			var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW);
			for (int i = 0; i < DebugRoutedCommands.ShowMemoryCommands.Length; i++) {
				var info = memoryToolWindowContentCreator.Contents[i];
				cmds.Add(DebugRoutedCommands.ShowMemoryCommands[i], new RelayCommand(a => mainToolWindowManager.Show(info.Guid)));
			}
			for (int i = 0; i < DebugRoutedCommands.ShowMemoryCommands.Length && i < 10; i++) {
				var cmd = DebugRoutedCommands.ShowMemoryCommands[i];
				if (i == 0)
					cmds.Add(cmd, ModifierKeys.Alt, Key.D6);
				cmds.Add(cmd, ModifierKeys.Control | ModifierKeys.Alt, Key.D0 + (i + 1) % 10);
			}
		}
Esempio n. 2
0
        MemoryContentCommandLoader(IWpfCommandManager wpfCommandManager, MemoryToolWindowContentCreator memoryToolWindowContentCreator, IMainToolWindowManager mainToolWindowManager)
        {
            var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW);

            for (int i = 0; i < DebugRoutedCommands.ShowMemoryCommands.Length; i++)
            {
                var info = memoryToolWindowContentCreator.Contents[i];
                cmds.Add(DebugRoutedCommands.ShowMemoryCommands[i], new RelayCommand(a => mainToolWindowManager.Show(info.Guid)));
            }
            for (int i = 0; i < DebugRoutedCommands.ShowMemoryCommands.Length && i < 10; i++)
            {
                var cmd = DebugRoutedCommands.ShowMemoryCommands[i];
                if (i == 0)
                {
                    cmds.Add(cmd, ModifierKeys.Alt, Key.D6);
                }
                cmds.Add(cmd, ModifierKeys.Control | ModifierKeys.Alt, Key.D0 + (i + 1) % 10);
            }
        }