Exemple #1
0
		MemoryContentCommandLoader(IWpfCommandService wpfCommandService, MemoryToolWindowContentProvider memoryToolWindowContentProvider, IDsToolWindowService toolWindowService) {
			var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_MAINWINDOW);
			for (int i = 0; i < DebugRoutedCommands.ShowMemoryCommands.Length; i++) {
				var info = memoryToolWindowContentProvider.Contents[i];
				cmds.Add(DebugRoutedCommands.ShowMemoryCommands[i], new RelayCommand(a => toolWindowService.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.Shift, Key.D0 + (i + 1) % 10);
			}
		}
Exemple #2
0
        MemoryContentCommandLoader(IWpfCommandService wpfCommandService, MemoryToolWindowContentProvider memoryToolWindowContentProvider, IDsToolWindowService toolWindowService)
        {
            var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_MAINWINDOW);

            for (int i = 0; i < DebugRoutedCommands.ShowMemoryCommands.Length; i++)
            {
                var info = memoryToolWindowContentProvider.Contents[i];
                cmds.Add(DebugRoutedCommands.ShowMemoryCommands[i], new RelayCommand(a => toolWindowService.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.Shift, Key.D0 + (i + 1) % 10);
            }
        }