views:

16

answers:

1

Hello,

below code says I can not convert from void to bool, thats ok but how can I define a callback for a fired event in CAB ?

internal bool IsÖrtlichkeitFocused()
    {
      return this.WorkItem.EventTopics[EventTopicNames.IsOertlichkeitFocusChanged].Fire(this, new EventArgs<bool?>(null), this.WorkItem, PublicationScope.WorkItem);             
    }
A: 

try this [EventSubscription(EventTopicNames.IsOertlichkeitFocusChanged, ThreadOption.WorkItem)] public void IsÖrtlichkeitFocusedEventHandler(object sender, EventArgs e) { //do something }

B-Rain
but I want to return a bool value to the IsÖrtlichkeitFocused() method, I do not see how I can do that with your code!
msfanboy
ThreadOption.WorkItem does not exist here
msfanboy