/// <summary> /// This is where we actually deal with the notification. The Growl client will call this method /// when a notification is received that is configured to use this display. /// </summary> protected override void HandleNotification(Notification notification, string displayName) { // 1. create your notification window // 2. call SetNotification to set the title, description, image, etc // 3. set any other custom settings // 4. call this.Show(win) - NOTE: you should always call the display's Show method // rather than calling win.Show() directly. this ensures that all necessary events // for click callbacks and layout management. SampleVisualWindow win = new SampleVisualWindow(); win.SetNotification(notification); win.BackColor = GetColorFromSetting(SETTING_BGCOLOR, BGCOLOR); this.Show(win); }
/// <summary> /// This is where we actually deal with the notification. The Growl client will call this method /// when a notification is received that is configured to use this display. /// </summary> protected override void HandleNotification(Notification notification, string displayName) { // 1. create your notification window // 2. call SetNotification to set the title, description, image, etc // 3. set any other custom settings // 4. call this.Show(win) - NOTE: you should always call the display's Show method // rather than calling win.Show() directly. this ensures that all necessary events // for click callbacks and layout management. SampleVisualWindow win = new SampleVisualWindow(); win.SetNotification(notification); win.BackColor = GetColorFromSetting(SETTING_BGCOLOR, BGCOLOR); this.Show(win); }