English 中文(简体)
ICommand Implementation 问 题
原标题:ICommand Implementation Question
最佳回答
问题回答

我可能错了,但是,如果我知道一般是如何执行的,而且我可以理解辅导,就会有ug,应该读。

public bool CanExecute(object parameter) {
   return _execute == null ? false : true;
}

或 或许是——申请转交的一个功能物体。 在该案中,辅导不明确。

无论如何,我将与提交人磋商他所铭记的内容。

我认为,这部法典的作者希望通过图象代表来贬低CanExecute逻辑,即基地指挥阶层的继承人可以决定轮 the或不能像这样决定。

class DefaultCommand:BaseCommand
{
    //_canExecute is supposed protected Predicate<string> in base class
    public DefaultCommand()
    {
       base._canExecute =x=>x=="SomeExecutable";
    }
}

默认的假设是,除非通过毛坯代表进行其他评估,否则CanExecute永远是真实的。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签