获取BooleanElement's
ValueChanged
事件发生需要特殊技巧吗?
如果我切换状态,则永远不会执行以下代码:
this.oElementSenderCC = new BooleanElement ("Send Copy To Myself" ), true);
this.oElementSenderCC.ValueChanged += (sender, e) => this.SelectedSenderCC = this.oElementSenderCC.Value;
答案 0 :(得分:2)
这似乎对我有用
BooleanElement boolElm = new BooleanElement("Bool",false);
boolElm.ValueChanged+=delegate
{ Console.WriteLine(boolElm.Value); };