Beispiel #1
0
		static void Initialize(ILSpyTreeNode[] nodes, MenuItem menuItem)
		{
			nodes = DeleteTypeDefCommand.FilterOutGlobalTypes(nodes);
			if (nodes.Length == 1)
				menuItem.Header = string.Format("Delete {0}", UIUtils.EscapeMenuItemHeader(nodes[0].ToString()));
			else
				menuItem.Header = string.Format("Delete {0} types", nodes.Length);
		}
Beispiel #2
0
			protected override void Execute(Context ctx)
			{
				DeleteTypeDefCommand.Execute(ctx.Nodes);
			}
Beispiel #3
0
			protected override bool CanExecute(Context ctx)
			{
				return ctx.ReferenceSegment.IsLocalTarget &&
					DeleteTypeDefCommand.CanExecute(ctx.Nodes);
			}
Beispiel #4
0
			protected override void Initialize(ILSpyTreeNode[] nodes, MenuItem menuItem)
			{
				DeleteTypeDefCommand.Initialize(nodes, menuItem);
			}
Beispiel #5
0
			protected override void ExecuteInternal(ILSpyTreeNode[] nodes)
			{
				DeleteTypeDefCommand.Execute(nodes);
			}
Beispiel #6
0
			protected override bool CanExecuteInternal(ILSpyTreeNode[] nodes)
			{
				return DeleteTypeDefCommand.CanExecute(nodes);
			}
Beispiel #7
0
		void DeleteExecuted(object sender, ExecutedRoutedEventArgs e)
		{
			DeleteTypeDefCommand.Execute(MainWindow.Instance.SelectedNodes);
		}
Beispiel #8
0
		void DeleteCanExecute(object sender, CanExecuteRoutedEventArgs e)
		{
			e.CanExecute = DeleteTypeDefCommand.CanExecute(MainWindow.Instance.SelectedNodes);
		}
Beispiel #9
0
			protected override void Initialize(Context ctx, MenuItem menuItem)
			{
				DeleteTypeDefCommand.Initialize(ctx.Nodes, menuItem);
			}