public Growler( string applicationName, NotificationType[] notificationTypes) { _notificationTypes = notificationTypes; _application = new Application(applicationName); _growl = new GrowlConnector { EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText }; _growl.Register(_application, _notificationTypes); }
public void RegisterForGrowl(string password, string hostName, string tcpPort) { this.notificationType = new NotificationType(NotificationName, NotificationName); int portNum; bool isValidPortNum = int.TryParse(tcpPort, out portNum); if (!string.IsNullOrEmpty(hostName) && isValidPortNum) { // use this if you want to connect to a remote Growl instance on another machine this.growl = new GrowlConnector(password, hostName, portNum); } else { // use this if you need to set a password - you can also pass null or an empty string to this constructor to use no password this.growl = new GrowlConnector(password); } //this.growl.NotificationCallback += new GrowlConnector.CallbackEventHandler(growl_NotificationCallback); // set this so messages are sent in plain text (easier for debugging) this.growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText; this.application = new Growl.Connector.Application(ApplicationName); this.growl.Register(application, new NotificationType[] { notificationType }); }
public GrowlPublisher() { _growler = new GrowlConnector(); _growler.Register( new Application(Properties.Resources.Growl_Application) { Icon = Properties.Resources.tomato_work }, new[]{ new NotificationType( Properties.Resources.NotificationType_WorkStart, Properties.Resources.NotificationDisplay_WorkStart, Properties.Resources.tomato_work, true), new NotificationType( Properties.Resources.NotificationType_WorkComplete, Properties.Resources.NotificationDisplay_WorkComplete, Properties.Resources.tomato_work, true), new NotificationType( Properties.Resources.NotificationType_RestStart, Properties.Resources.NotificationDisplay_RestStart, Properties.Resources.tomato_rest, true), new NotificationType( Properties.Resources.NotificationType_RestComplete, Properties.Resources.NotificationDisplay_RestComplete, Properties.Resources.tomato_rest, true), }); }
public Form1() { InitializeComponent(); log4net.Config.XmlConfigurator.Configure(); textBox1.Text = ConfigurationManager.AppSettings["Path"]; _application = new Application(ApplicationName); _workerFiber = new PoolFiber(); _workerFiber.Start(); _importar = new Channel<string>(); _importar.Subscribe(_workerFiber, Work); _notificationType = new NotificationType(SampleNotificationType, "Sample Notification"); _growl = new GrowlConnector { EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.AES }; _growl.NotificationCallback += GrowlNotificationCallback; _growl.Register(_application, new[] { _notificationType }); folderWatch.Created += FolderWatchCreated; folderWatch.Renamed += FolderWatchRenamed; folderWatch.Deleted += FolderWatchDeleted; InitDatabase(); if (!_autostart) return; Operar(true,true); }
private GrowlConnector GetGrowlConnector(string hostname, int port, string password) { var growlConnector = new GrowlConnector(password, hostname, port); growlConnector.OKResponse += GrowlOKResponse; growlConnector.ErrorResponse += GrowlErrorResponse; return growlConnector; }
public GrowlInterop() { growl = new GrowlConnector(); //growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText; Register(); }
//Create growl object to register application and send notification. public void createGrowlObject() { //Growl object growl = new GrowlConnector(); //Check growl running or not. if (GrowlConnector.IsGrowlRunningLocally()) { //Application name(Spotify) as seen in growl GUI. Growl.Connector.Application application = new Growl.Connector.Application("Spotify"); //Application Icon. application.Icon = getCurrentWorkingDirectory(); NotificationType Spotify_notification_type = new NotificationType("SPOTIFYNOTIFICATION", "Display Notification"); //Register "Spotify" application growl.Register(application, new NotificationType[] { Spotify_notification_type }); //return growl object to show notification. // return growl; } else MessageBox.Show("check Growl running or not","Growl Not Found",MessageBoxButtons.OK,MessageBoxIcon.Exclamation); }
private void InitializeGrowlInstance() { if (this.configuration.Enabled) { if (!string.IsNullOrEmpty(this.configuration.Hostname)) { growl = new GrowlConnector(this.configuration.Password, this.configuration.Hostname, this.configuration.Port); } else if (!string.IsNullOrEmpty(this.configuration.Password)) { growl = new GrowlConnector(this.configuration.Password); } else { growl = new GrowlConnector(); } this.RegisterApplication(); monitor.Polled += Monitor_Polled; monitor.BuildOccurred += Monitor_BuildOccurred; monitor.MessageReceived += Monitor_MessageReceived; } }
public GrowlNotification() { var icon = Path.Combine(Directory.GetCurrentDirectory(), @"img\ycombinator-logo.gif"); var application = new Application(ApplicationName) {Icon = icon}; var newStory = new NotificationType(NotificationTypeName, "New Story"); _growl = new GrowlConnector(); _growl.Register(application, new[] {newStory}); }
public static void simpleGrowl(string title, string message = "") { GrowlConnector simpleGrowl = new GrowlConnector(); global::Growl.Connector.Application thisApp = new global::Growl.Connector.Application("Forseti"); NotificationType simpleGrowlType = new NotificationType(GrowlType, "JavaScript test/spec result"); simpleGrowl.Register(thisApp, new NotificationType[] { simpleGrowlType }); Notification myGrowl = new Notification("Forseti", GrowlType, title, title, message); simpleGrowl.Notify(myGrowl); }
public static void simpleGrowl(string title, string message = "") { GrowlConnector simpleGrowl = new GrowlConnector(); Growl.Connector.Application thisApp = new Growl.Connector.Application(System.Windows.Forms.Application.ProductName); NotificationType simpleGrowlType = new NotificationType("SIMPLEGROWL"); simpleGrowl.Register(thisApp, new NotificationType[] { simpleGrowlType }); Notification myGrowl = new Notification(System.Windows.Forms.Application.ProductName, "SIMPLEGROWL", title, title, message); simpleGrowl.Notify(myGrowl); }
public void Notify(string title, string message = "", NotificationType notificationType = NotificationType.None) { var simpleGrowl = new GrowlConnector(); var thisApplication = new Growl.Connector.Application("Jubilee"); var simpleGrowlType = new Growl.Connector.NotificationType("SIMPLEGROWL"); simpleGrowl.Register(thisApplication, new Growl.Connector.NotificationType[] { simpleGrowlType }); var myGrowl = new Notification("Jubilee", "SIMPLEGROWL", title, title, message); simpleGrowl.Notify(myGrowl); }
public static void simpleGrowl(string title, string message = "") { var simpleGrowl = new GrowlConnector(); var thisApp = new Growl.Connector.Application(System.Reflection.Assembly.GetExecutingAssembly().GetName().Name); var simpleGrowlType = new NotificationType("SIMPLEGROWL"); simpleGrowl.Register(thisApp, new NotificationType[] { simpleGrowlType }); var myGrowl = new Notification(System.Reflection.Assembly.GetExecutingAssembly().GetName().Name, "SIMPLEGROWL", title, title, message); simpleGrowl.Notify(myGrowl); }
public void RegisterGrowl() { _growl = new GrowlConnector(); _notificationTypeSucces = new NotificationType("SUCCESS_NOTIFICATION", "Notification Succes"); _notificationTypeFailure = new NotificationType("FAILURE_NOTIFICATION", "NotificationFailure"); _application = new Application("NUnit build notifier"); NotificationType[] notificationList = {_notificationTypeSucces, _notificationTypeFailure}; _growl.Register(_application, notificationList); Thread.Sleep(2000); }
private void button1_Click(object sender, RoutedEventArgs e) { var growlConnector = new GrowlConnector(); var application = new Growl.Connector.Application("Hello, growl!"); var notificationType = new NotificationType("sample", "Test"); growlConnector.Register(application, new [] {notificationType}); var notification = new Notification(application.Name, notificationType.Name, "1", "Test", "Hello there!"); growlConnector.Notify(notification); }
public void SendNotification(string title, string message, string notificationTypeName, string hostname, int port, string password) { var notificationType = _notificationTypes.Single(n => n.Name == notificationTypeName); var notification = new GrowlNotification("NzbDrone", notificationType.Name, DateTime.Now.Ticks.ToString(), title, message); _growlConnector = new GrowlConnector(password, hostname, port); _logger.Debug("Sending Notification to: {0}:{1}", hostname, port); _growlConnector.Notify(notification); }
public AppContext() : base() { bool ok = false; if (Environment.OSVersion.Version.Major > 5) { // Vista & higher ok = true; MMDeviceEnumerator devEnum = new MMDeviceEnumerator(); this.defaultDevice = devEnum.GetDefaultAudioEndpoint(EDataFlow.eRender, ERole.eMultimedia); this.defaultDevice.AudioEndpointVolume.OnVolumeNotification += new AudioEndpointVolumeNotificationDelegate(AudioEndpointVolume_OnVolumeNotification); } else { this.spkrVolumeControlID = MM.GetControlID(spkrComponent, spkrVolumeControl); this.spkrMuteControlID = MM.GetControlID(spkrComponent, spkrMuteControl); if (this.spkrVolumeControlID > 0) { ok = true; int v = MM.GetVolume(spkrVolumeControl, spkrComponent); this.currentVolume = ConvertToPercentage(v); this.hwnd = new Hwnd(WndProc); int iw = (int)this.hwnd.Handle; // ... and we can now activate the message monitor bool b = MM.MonitorControl(iw); } } if (ok) { NotificationType ntUp = new NotificationType(ntNameVolumeUp); NotificationType ntDown = new NotificationType(ntNameVolumeDown); NotificationType[] types = new NotificationType[] { ntUp, ntDown }; Growl.Connector.Application app = new Growl.Connector.Application(appName); app.Icon = Properties.Resources.volumeter; this.growl = new GrowlConnector(); this.growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText; this.growl.Register(app, types); this.timer = new System.Timers.Timer(buffer); this.timer.AutoReset = false; this.timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed); } else { MessageBox.Show("No speaker/line out component found to monitor"); } }
static NotificationQueue() { growl = new GrowlConnector(); growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText; queue = new Queue<QueuedNotification>(); timer = new Timer(INTERVAL * 1000); timer.AutoReset = true; timer.Elapsed += new ElapsedEventHandler(timer_Elapsed); }
void Initialize() { notificationType = new NotificationType("BUILD_RESULT_NOTIFICATION", "Sample Notification"); application = new Application("Giles"); growl = new GrowlConnector { EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText }; growl.Register(application, new[] { notificationType }); }
private void Form1_Load(object sender, EventArgs e) { this.notificationType = new NotificationType(sampleNotificationType, "Sample Notification"); this.growl = new GrowlConnector(); //this.growl = new GrowlConnector("password"); // use this if you need to set a password - you can also pass null or an empty string to this constructor to use no password //this.growl = new GrowlConnector("password", "hostname", GrowlConnector.TCP_PORT); // use this if you want to connect to a remote Growl instance on another machine this.growl.NotificationCallback += new GrowlConnector.CallbackEventHandler(growl_NotificationCallback); // set this so messages are sent in plain text (easier for debugging) this.growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText; }
public GrowlNotifier() { this.notificationType = new NotificationType(SAMPLENOTIFICATIONTYPE, "Sample Notification"); this.growl = new GrowlConnector(); this.growl.NotificationCallback += new GrowlConnector.CallbackEventHandler(growl_NotificationCallback); // set this so messages are sent in plain text (easier for debugging) this.growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText; RegisterToGrowl(); }
static Configuration() { application_name = Properties.Settings.Default.application_name; updateUserConfig(); // configure growl growl = new GC.GrowlConnector(); application = new GC.Application(Configuration.application_name); application.Icon = @"Icon.ico"; // Notifications types available to register torrent_started = new GC.NotificationType("STARTED", "Torrent Started"); torrent_completed = new GC.NotificationType("COMPLETED", "Torrent Completed"); connection_error = new GC.NotificationType("ERROR", "Connection Error"); }
public GrowlNotifier() { notificationType = new NotificationType(sampleNotificationType, "Network ARP change notification"); growl = new GrowlConnector(); //this.growl = new GrowlConnector("password"); // use this if you need to set a password - you can also pass null or an empty string to this constructor to use no password //this.growl.NotificationCallback += new GrowlConnector.CallbackEventHandler(growl_NotificationCallback); // set this so messages are sent in plain text (easier for debugging) growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText; application = new Application("MacNotifier"); growl.Register(application, new NotificationType[] { notificationType }); }
public Form1() { InitializeComponent(); growl = new GrowlConnector(); //growl.Password = this.textBox2.Text; this.growl.OKResponse += new GrowlConnector.ResponseEventHandler(growl_OKResponse); this.growl.ErrorResponse += new GrowlConnector.ResponseEventHandler(growl_ErrorResponse); this.growl.NotificationCallback += new GrowlConnector.CallbackEventHandler(growl_NotificationCallback); growl.KeyHashAlgorithm = Cryptography.HashAlgorithmType.SHA256; growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText; //growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.DES; //growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.TripleDES; //growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.AES; this.app = new Growl.Connector.Application("SurfWriter"); //app.Icon = "http://atomicbride.com/Apple.gif"; //app.Icon = "http://www.thetroyers.com/images/Apple_Logo.jpg"; //app.Icon = @"c:\apple.png"; //app.Icon = Properties.Resources.Apple; //app.CustomTextAttributes.Add("Creator", "Apple Software"); //app.CustomTextAttributes.Add("Application-ID", "08d6c05a21512a79a1dfeb9d2a8f262f"); //app.CustomBinaryAttributes.Add("Sound", "http://fake.net/app.wav"); app.Icon = @"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IAAAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1JREFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jqch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0vr4MkhoXe0rZigAAAABJRU5ErkJggg=="; Growl.CoreLibrary.Detector detector = new Detector(); if (detector.IsInstalled) { InvokeWrite(String.Format("Growl (v{0}; f{1}; a{2}) is installed at {3} ({4})", detector.FileVersion.ProductVersion, detector.FileVersion.FileVersion, detector.AssemblyVersion.ToString(), detector.InstallationFolder, detector.DisplaysFolder)); } else { InvokeWrite("Growl is not available on this machine"); } if (growl.IsGrowlRunning()) { InvokeWrite("Growl is running"); } else { InvokeWrite("Growl is not running"); } }
public Form1() { InitializeComponent(); growl = new GrowlConnector(); //growl.Password = this.textBox2.Text; this.growl.OKResponse += new GrowlConnector.ResponseEventHandler(growl_OKResponse); this.growl.ErrorResponse += new GrowlConnector.ResponseEventHandler(growl_ErrorResponse); this.growl.NotificationCallback +=new GrowlConnector.CallbackEventHandler(growl_NotificationCallback); growl.KeyHashAlgorithm = Cryptography.HashAlgorithmType.SHA256; growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText; //growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.DES; //growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.TripleDES; //growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.AES; this.app = new Growl.Connector.Application("SurfWriter"); //app.Icon = "http://atomicbride.com/Apple.gif"; //app.Icon = "http://www.thetroyers.com/images/Apple_Logo.jpg"; //app.Icon = @"c:\apple.png"; //app.Icon = Properties.Resources.Apple; //app.CustomTextAttributes.Add("Creator", "Apple Software"); //app.CustomTextAttributes.Add("Application-ID", "08d6c05a21512a79a1dfeb9d2a8f262f"); //app.CustomBinaryAttributes.Add("Sound", "http://fake.net/app.wav"); app.Icon = @"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IAAAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1JREFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jqch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0vr4MkhoXe0rZigAAAABJRU5ErkJggg=="; Growl.CoreLibrary.Detector detector = new Detector(); if (detector.IsInstalled) { InvokeWrite(String.Format("Growl (v{0}; f{1}; a{2}) is installed at {3} ({4})", detector.FileVersion.ProductVersion, detector.FileVersion.FileVersion, detector.AssemblyVersion.ToString(), detector.InstallationFolder, detector.DisplaysFolder)); } else { InvokeWrite("Growl is not available on this machine"); } if (growl.IsGrowlRunning()) { InvokeWrite("Growl is running"); } else { InvokeWrite("Growl is not running"); } }
/* Using this doesn't work either private PropertySet _propertySet = new PropertySet(BasePropertySet.IdOnly) { ItemSchema.Body }; */ public MainWindow() { InitializeComponent(); notificationType = new NotificationType(SampleNotificationType, "Sample Notification"); growl = new GrowlConnector(); growl.NotificationCallback += new GrowlConnector.CallbackEventHandler(GrowlNotificationCallback); RegisterGrowl(); growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText; _exchangeService = new ExchangeService(ExchangeVersion.Exchange2007_SP1); //_exchangeService.Credentials = new NetworkCredential("{Active Directory ID}", "{Password}", "{Domain Name}"); bool success = ConfigureExchange(); if (!success) { messageTextBox.AppendText("Not connected"); } }
void Initialize() { informationNotificationType = new NotificationType("BUILD_RESULT_NOTIFICATION", "Sample Notification"); successNotificationType = new NotificationType("SUCCESS_NOTIFICATION", "Success Notification"); failureNotificationType = new NotificationType("FAILURE_NOTIFICATION", "Failure Notification"); application = new Application("Giles"); growl = new GrowlConnector { EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText }; growl.Register(application, new[] { informationNotificationType, successNotificationType, failureNotificationType }); }
public NUnitGrowlAddIn() { growlConnector = new GrowlConnector(); if (growlConnector.IsGrowlRunning()) { growlApplication = new Application("NUnit"); NotificationType[] notificationTypeArr1 = new NotificationType[] { new NotificationType("NUnit.TestRun.Started"), new NotificationType("NUnit.TestRun.Succeeded"), new NotificationType("NUnit.TestRun.Failed"), new NotificationType("NUnit.TestRun.FirstTestFailed"), new NotificationType("NUnit.TestRun.Exception") }; NotificationType[] notificationTypes = notificationTypeArr1; growlConnector.Register(growlApplication, notificationTypes); } }
public GrowlTrayAppContext() : base() { this.hwnd = new Hwnd(WndProc); NotificationType ntInfo = new NotificationType(ntNameInfo, ntNameInfo, Properties.Resources.info, true); NotificationType ntWarning = new NotificationType(ntNameWarning, ntNameWarning, Properties.Resources.warning, true); NotificationType ntError = new NotificationType(ntNameError, ntNameError, Properties.Resources.error, true); NotificationType ntOther = new NotificationType(ntNameOther, ntNameOther, Properties.Resources.windows, true); NotificationType[] types = new NotificationType[] { ntInfo, ntWarning, ntError, ntOther }; Growl.Connector.Application app = new Growl.Connector.Application(appName); app.Icon = Properties.Resources.windows; this.growl = new GrowlConnector(); this.growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText; this.growl.NotificationCallback += new GrowlConnector.CallbackEventHandler(growl_NotificationCallback); if(GROWL) this.growl.Register(app, types); timer = new Timer(); timer.Interval = 5 * 1000; timer.Tick += new EventHandler(timer_Tick); }
private void Test_Register(string testName, Growl.Connector.Application app, List<NotificationType> types, Cryptography.SymmetricAlgorithmType ea, Cryptography.HashAlgorithmType ha) { GrowlConnector g = new GrowlConnector(this.textBox2.Text); g.EncryptionAlgorithm = ea; g.KeyHashAlgorithm = ha; //string r = g.Register(app, types.ToArray()); //WriteTestRequest(r); }
public SystemBalloonIntercepter(IntPtr handle) : base(handle) { this.handle = handle; this.app = new Growl.Connector.Application("Windows"); this.app.Icon = System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath, @"icons\info.png"); this.ntBalloon = new NotificationType("balloon", "System Balloons"); this.growl = new GrowlConnector(); this.growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText; }