/// <summary> /// Registers the specified application with GfW. /// </summary> /// <param name="application">The <see cref="Growl.Connector.Application"/> to register</param> /// <param name="notificationTypes">A list of <see cref="Growl.Connector.NotificationType"/>s to register</param> protected void Register(Growl.Connector.Application application, Growl.Connector.NotificationType[] notificationTypes) { if (this.Enabled) { this.growl.Register(application, notificationTypes); } }
public override void ForwardRegistration(Growl.Connector.Application application, List <Growl.Connector.NotificationType> notificationTypes, Growl.Connector.RequestInfo requestInfo, bool isIdle) { // IGNORE REGISTRATION NOTIFICATIONS (since we have no way of filtering out already-registered apps at this point) //Send(application.Name, Properties.Resources.SystemNotification_AppRegistered_Title, String.Format(Properties.Resources.SystemNotification_AppRegistered_Text, application.Name)); requestInfo.SaveHandlingInfo("Forwarding to Prowl cancelled - Application Registrations are not forwarded."); }
private void InitializeAddIn() { this.cf = new ConfigForm(); this.cf.PasswordChanged += new EventHandler(cf_PasswordChanged); this.appIcon = ConvertImageToBytes(global::GrowlExtras.VisualStudioAddIn.Properties.Resources.vs); this.successIcon = ConvertImageToBytes(global::GrowlExtras.VisualStudioAddIn.Properties.Resources.vs_success); this.failureIcon = ConvertImageToBytes(global::GrowlExtras.VisualStudioAddIn.Properties.Resources.vs_failed); //string password = Growl.Connector.GrowlConnector.TEST_PASSWORD; //TODO: //this.growl = new Growl.Connector.GrowlConnector(password); this.growl = new Growl.Connector.GrowlConnector(Properties.Settings.Default.Password); this.growl.EncryptionAlgorithm = Growl.Connector.Cryptography.SymmetricAlgorithmType.PlainText; this.application = new Growl.Connector.Application("Visual Studio"); this.application.Icon = new Growl.CoreLibrary.BinaryData(this.appIcon); this.ntSolutionSuccess = new Growl.Connector.NotificationType("Solution Succeeded", "Solution Succeeded", new Growl.CoreLibrary.BinaryData(this.successIcon), true); this.ntSolutionFailed = new Growl.Connector.NotificationType("Solution Failed", "Solution Failed", new Growl.CoreLibrary.BinaryData(this.failureIcon), true); this.ntProjectSuccess = new Growl.Connector.NotificationType("Project Succeeded", "Project Succeeded", new Growl.CoreLibrary.BinaryData(this.successIcon), true); this.ntProjectFailed = new Growl.Connector.NotificationType("Project Failed", "Project Failed", new Growl.CoreLibrary.BinaryData(this.failureIcon), true); this.growl.Register(application, new Growl.Connector.NotificationType[] { ntSolutionSuccess, ntSolutionFailed, ntProjectSuccess, ntProjectFailed }); this._applicationObject.Events.BuildEvents.OnBuildDone += new _dispBuildEvents_OnBuildDoneEventHandler(BuildEvents_OnBuildDone); this._applicationObject.Events.BuildEvents.OnBuildProjConfigDone += new _dispBuildEvents_OnBuildProjConfigDoneEventHandler(BuildEvents_OnBuildProjConfigDone); }
private void growlBootUp() { notificationType = new Growl.Connector.NotificationType(sampleNotificationType, "Sample Notification"); growl = new Growl.Connector.GrowlConnector(); growl.EncryptionAlgorithm = Growl.Connector.Cryptography.SymmetricAlgorithmType.PlainText; growlapp = new Growl.Connector.Application("WPanel"); growl.Register(growlapp, new Growl.Connector.NotificationType[] { notificationType }); }
public override void ForwardRegistration(Growl.Connector.Application application, List <Growl.Connector.NotificationType> notificationTypes, Growl.Connector.RequestInfo requestInfo, bool isIdle) { Growl.UDPLegacy.NotificationType[] types = new Growl.UDPLegacy.NotificationType[notificationTypes.Count]; for (int i = 0; i < notificationTypes.Count; i++) { Growl.Connector.NotificationType notificationType = notificationTypes[i]; Growl.UDPLegacy.NotificationType nt = new Growl.UDPLegacy.NotificationType(notificationType.Name, notificationType.Enabled); types[i] = nt; } Growl.UDPLegacy.MessageSender netgrowl = new Growl.UDPLegacy.MessageSender(this.IPAddress, this.Port, application.Name, this.Password); netgrowl.Register(ref types); }
public GrowlPlugin() { this.OnPlayerPlayEvent += new _IiTunesEvents_OnPlayerPlayEventEventHandler(growlPlugin_OnPlayerPlayEvent); this.OnPlayerPlayingTrackChangedEvent += new _IiTunesEvents_OnPlayerPlayingTrackChangedEventEventHandler(growlPlugin_OnPlayerPlayingTrackChangedEvent); // old this.udpGrowl = new Growl.UDPLegacy.MessageSender("ITunes Growl Plug-in", Properties.Settings.Default.GrowlPassword); this.udpNotificationType = new Growl.UDPLegacy.NotificationType("Track Changed", true); this.udpNotificationTypes = new Growl.UDPLegacy.NotificationType[] { this.udpNotificationType }; // new this.application = new Growl.Connector.Application("iTunes"); this.application.Icon = String.Format(@"{0}\icon.png", System.Windows.Forms.Application.StartupPath); this.growl = new Growl.Connector.GrowlConnector(Properties.Settings.Default.GrowlPassword); this.growl.NotificationCallback +=new Growl.Connector.GrowlConnector.CallbackEventHandler(growl_NotificationCallback); this.growl.EncryptionAlgorithm = Growl.Connector.Cryptography.SymmetricAlgorithmType.PlainText; this.nt1 = new Growl.Connector.NotificationType("Track Changed", "Track Changed"); this.notificationTypes = new Growl.Connector.NotificationType[] { this.nt1 }; }
public GrowlPlugin() { this.OnPlayerPlayEvent += new _IiTunesEvents_OnPlayerPlayEventEventHandler(growlPlugin_OnPlayerPlayEvent); this.OnPlayerPlayingTrackChangedEvent += new _IiTunesEvents_OnPlayerPlayingTrackChangedEventEventHandler(growlPlugin_OnPlayerPlayingTrackChangedEvent); // old this.udpGrowl = new Growl.UDPLegacy.MessageSender("ITunes Growl Plug-in", Properties.Settings.Default.GrowlPassword); this.udpNotificationType = new Growl.UDPLegacy.NotificationType("Track Changed", true); this.udpNotificationTypes = new Growl.UDPLegacy.NotificationType[] { this.udpNotificationType }; // new this.application = new Growl.Connector.Application("iTunes"); this.application.Icon = String.Format(@"{0}\icon.png", System.Windows.Forms.Application.StartupPath); this.growl = new Growl.Connector.GrowlConnector(Properties.Settings.Default.GrowlPassword); this.growl.NotificationCallback += new Growl.Connector.GrowlConnector.CallbackEventHandler(growl_NotificationCallback); this.growl.EncryptionAlgorithm = Growl.Connector.Cryptography.SymmetricAlgorithmType.PlainText; this.nt1 = new Growl.Connector.NotificationType("Track Changed", "Track Changed"); this.notificationTypes = new Growl.Connector.NotificationType[] { this.nt1 }; }
private void ThisApplication_Startup(object sender, System.EventArgs e) { BuildMenu(); this.NewMailEx += new Microsoft.Office.Interop.Outlook.ApplicationEvents_11_NewMailExEventHandler(ThisApplication_NewMailEx); this.Reminder += new Microsoft.Office.Interop.Outlook.ApplicationEvents_11_ReminderEventHandler(ThisApplication_Reminder); this.Reminders.BeforeReminderShow += new Microsoft.Office.Interop.Outlook.ReminderCollectionEvents_BeforeReminderShowEventHandler(Reminders_BeforeReminderShow); // setup our growl object System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly(); Uri uri = new Uri(assembly.CodeBase); string path = System.IO.Path.GetDirectoryName(uri.LocalPath); string icon = String.Format(@"{0}\outlook.png", path); this.application = new Growl.Connector.Application(APP_NAME); this.application.Icon = icon; this.notificationTypes = new Growl.Connector.NotificationType[] { reminder, newmail }; this.growl = new Growl.Connector.GrowlConnector(Properties.Settings.Default.Password); this.growl.EncryptionAlgorithm = Growl.Connector.Cryptography.SymmetricAlgorithmType.PlainText; this.growl.NotificationCallback +=new Growl.Connector.GrowlConnector.CallbackEventHandler(growl_NotificationCallback); this.growl.Register(this.application, this.notificationTypes); }
private void ThisApplication_Startup(object sender, System.EventArgs e) { BuildMenu(); this.NewMailEx += new Microsoft.Office.Interop.Outlook.ApplicationEvents_11_NewMailExEventHandler(ThisApplication_NewMailEx); this.Reminder += new Microsoft.Office.Interop.Outlook.ApplicationEvents_11_ReminderEventHandler(ThisApplication_Reminder); this.Reminders.BeforeReminderShow += new Microsoft.Office.Interop.Outlook.ReminderCollectionEvents_BeforeReminderShowEventHandler(Reminders_BeforeReminderShow); // setup our growl object System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly(); Uri uri = new Uri(assembly.CodeBase); string path = System.IO.Path.GetDirectoryName(uri.LocalPath); string icon = String.Format(@"{0}\outlook.png", path); this.application = new Growl.Connector.Application(APP_NAME); this.application.Icon = icon; this.notificationTypes = new Growl.Connector.NotificationType[] { reminder, newmail }; this.growl = new Growl.Connector.GrowlConnector(Properties.Settings.Default.Password); this.growl.EncryptionAlgorithm = Growl.Connector.Cryptography.SymmetricAlgorithmType.PlainText; this.growl.NotificationCallback += new Growl.Connector.GrowlConnector.CallbackEventHandler(growl_NotificationCallback); this.growl.Register(this.application, this.notificationTypes); }
public static string getPathToIcon(Growl.Connector.Application app) { string returnValue = ""; if (app.Icon != null) { if (app.Icon.IsSet) { if (app.Icon.IsUrl) { returnValue = app.Icon.Url; } else { returnValue = Path.GetTempFileName(); System.Drawing.Image Icon = app.Icon; Icon.Save(returnValue); } } } return(returnValue); }
public Application() { this.app = new Growl.Connector.Application("Unidentified Application"); }
public List<string> ProcessRegistration(Growl.UDPLegacy.RegistrationPacket rp, string receivedFrom) { /* THIS METHOD RESENDS THE UDP MESSAGE AS A LOCAL GNTP MESSAGE Growl.Connector.Application application = new Growl.Connector.Application(rp.ApplicationName); List<Growl.Connector.NotificationType> notificationTypes = new List<Growl.Connector.NotificationType>(); foreach (Growl.UDPLegacy.NotificationType nt in rp.NotificationTypes) { Growl.Connector.NotificationType notificationType = new Growl.Connector.NotificationType(nt.Name, nt.Name, null, nt.Enabled); notificationTypes.Add(notificationType); } Growl.Connector.GrowlConnector udpToGNTPForwarder = new Growl.Connector.GrowlConnector(); udpToGNTPForwarder.Password = rp.Password; udpToGNTPForwarder.EncryptionAlgorithm = Growl.Connector.Cryptography.SymmetricAlgorithmType.PlainText; udpToGNTPForwarder.Register(application, notificationTypes.ToArray()); * */ /* THIS METHOD AVOIDS SENDING ANOTHER MESSAGE, BUT TRADES THE DETAILED GNTP LOGGING */ Growl.Connector.Application application = new Growl.Connector.Application(rp.ApplicationName); List<Growl.Connector.NotificationType> notificationTypes = new List<Growl.Connector.NotificationType>(); foreach (Growl.UDPLegacy.NotificationType nt in rp.NotificationTypes) { Growl.Connector.NotificationType notificationType = new Growl.Connector.NotificationType(nt.Name, nt.Name, null, nt.Enabled); notificationTypes.Add(notificationType); } Growl.Connector.RequestInfo requestInfo = new Growl.Connector.RequestInfo(); gntpListener_RegisterReceived(application, notificationTypes, requestInfo); List<string> extraLogInfo = (requestInfo != null ? requestInfo.HandlingInfo : null); return extraLogInfo; }
public override void ForwardRegistration(Growl.Connector.Application application, List <Growl.Connector.NotificationType> notificationTypes, Growl.Connector.RequestInfo requestInfo, bool isIdle) { // IGNORE REGISTRATION NOTIFICATIONS requestInfo.SaveHandlingInfo("Forwarding to Email cancelled - Application Registrations are not forwarded."); }
/// <summary> /// Called when an application registration is received by GfW. /// </summary> /// <param name="application">The application.</param> /// <param name="notificationTypes">The notification types.</param> /// <param name="requestInfo">The request info.</param> /// <param name="isIdle"><c>true</c> if the user is currently idle;<c>false</c> otherwise</param> /// <remarks> /// Many types of forwarders can just ignore this event. /// </remarks> public override void ForwardRegistration(Growl.Connector.Application application, List <Growl.Connector.NotificationType> notificationTypes, Growl.Connector.RequestInfo requestInfo, bool isIdle) { // do nothing }