1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
5
using ICSharpCode.Core;
6
using ICSharpCode.WpfDesign.Designer;
8
namespace ICSharpCode.WpfDesign.AddIn.Commands
11
/// Invokes Cut command on the Design surface.
13
class Cut : AbstractMenuCommand
15
public override void Run()
17
var surface = Owner as DesignSurface;
24
/// Invokes Copy command on the Design surface.
26
class Copy : AbstractMenuCommand
28
public override void Run()
30
var surface = Owner as DesignSurface;
38
/// Invokes Paste operation on the Design surface.
40
class Paste : AbstractMenuCommand
42
public override void Run()
44
var surface = Owner as DesignSurface;
51
/// Provides implementation of <see cref="IConditionEvaluator"/> for <see cref="Cut"/> and <see cref="Copy"/>.
53
class IsCutCopyEnabled : IConditionEvaluator
55
public bool IsValid(object owner, Condition condition)
57
var surface = owner as DesignSurface;
59
return surface.CanCopyOrCut();
66
/// Provides implementation of <see cref="IConditionEvaluator"/> for <see cref="Paste"/>.
68
class IsPasteEnabled : IConditionEvaluator
70
public bool IsValid(object owner, Condition condition)
72
var surface = owner as DesignSurface;
74
return surface.CanPaste();