void ProcessNotification(ITrayNotification currentEvent) { var currentNotifyEvent = currentEvent as TrayNotification; if (currentNotifyEvent != null) { ProcessBalloon(currentNotifyEvent); return; } var current2ChoiceEvent = currentEvent as TwoChoiceTrayNotification; if (current2ChoiceEvent != null) { Process2Choice(current2ChoiceEvent); return; } var current3ChoiceEvent = currentEvent as ThreeChoiceTrayNotification; if (current3ChoiceEvent != null) { Process3Choice(current3ChoiceEvent); } }
void TryProcessNotification(ITrayNotification currentEvent) { try { ProcessNotification(currentEvent); } catch (XmlException e) { ProcessNotificationException(e); } catch (XamlParseException e) { ProcessNotificationException(e); } catch (XamlException e) { ProcessNotificationException(e); } }
void NotifyTray(ITrayNotification trayNotification) { _trayNotificationObservable.OnNext(trayNotification); }
void ProcessNotification(ITrayNotification currentEvent) { var currentNotifyEvent = currentEvent as TrayNotification; if (currentNotifyEvent != null) { ProcessBalloon(currentNotifyEvent); return; } var current2ChoiceEvent = currentEvent as TwoChoiceTrayNotification; if (current2ChoiceEvent != null) { Process2Choice(current2ChoiceEvent); return; } var current3ChoiceEvent = currentEvent as ThreeChoiceTrayNotification; if (current3ChoiceEvent != null) Process3Choice(current3ChoiceEvent); }