Example #1
0
        private void Subscribe()

        {
            if (this.Allowed)

            {
                if (this.subscriberID == null)
                {
                    this.subscriberID = Utility.MachineID;
                }

                this.AdditionalOfflineDisplayInfo = "connecting...";

                if (this.sc == null)

                {
                    Growl.Daemon.Subscriber subscriber = new Growl.Daemon.Subscriber(this.subscriberID, Environment.MachineName, Growl.Connector.GrowlConnector.TCP_PORT);

                    this.sc = new Growl.Daemon.SubscriptionConnector(subscriber, this.Password, this.IPAddress, this.Port);

                    this.sc.EncryptionAlgorithm = Growl.Connector.Cryptography.SymmetricAlgorithmType.PlainText;

                    this.sc.OKResponse += new Growl.Daemon.SubscriptionConnector.ResponseEventHandler(sc_OKResponse);

                    this.sc.ErrorResponse += new Growl.Daemon.SubscriptionConnector.ResponseEventHandler(sc_ErrorResponse);
                }

                this.sc.Subscribe();
            }
        }
Example #2
0
 internal void Kill()
 {
     if (this.sc != null)
     {
         this.sc.StopRenewing();
         this.sc = null;
     }
 }
Example #3
0
 private void button2_Click(object sender, EventArgs e)
 {
     this.subscriberID = System.Guid.NewGuid().ToString();
     Growl.Daemon.Subscriber            subscriber = new Growl.Daemon.Subscriber(this.subscriberID, "Superman", 24000);
     Growl.Daemon.SubscriptionConnector sc         = new Growl.Daemon.SubscriptionConnector(subscriber, password, "127.0.0.1");
     sc.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText;
     sc.OKResponse         += new Growl.Daemon.SubscriptionConnector.ResponseEventHandler(sc_OKResponse);
     sc.ErrorResponse      += new Growl.Daemon.SubscriptionConnector.ResponseEventHandler(sc_ErrorResponse);
     sc.Subscribe();
 }
 public override void Kill()
 {
     if (this.sc != null)
     {
         this.sc.StopRenewing();
         this.sc.OKResponse    -= new Growl.Daemon.SubscriptionConnector.ResponseEventHandler(sc_OKResponse);
         this.sc.ErrorResponse -= new Growl.Daemon.SubscriptionConnector.ResponseEventHandler(sc_ErrorResponse);
         this.sc.Dispose();
         this.sc = null;
     }
 }
 public override void Subscribe()
 {
     if (this.Enabled && !this.isSubscribing)
     {
         this.isSubscribing = true;
         if (this.subscriberID == null) this.subscriberID = Utility.MachineID;
         this.AdditionalDisplayInfo = "connecting...";
         if (this.sc == null)
         {
             Growl.Daemon.Subscriber subscriber = new Growl.Daemon.Subscriber(this.subscriberID, Environment.MachineName, Growl.Connector.GrowlConnector.TCP_PORT);
             this.sc = new Growl.Daemon.SubscriptionConnector(subscriber, this.Password, this.IPAddress, this.Port);
             this.sc.EncryptionAlgorithm = Growl.Connector.Cryptography.SymmetricAlgorithmType.PlainText;
             this.sc.OKResponse += new Growl.Daemon.SubscriptionConnector.ResponseEventHandler(sc_OKResponse);
             this.sc.ErrorResponse += new Growl.Daemon.SubscriptionConnector.ResponseEventHandler(sc_ErrorResponse);
         }
         this.sc.Subscribe();
     }
 }
 public override void Kill()
 {
     if (this.sc != null)
     {
         this.sc.StopRenewing();
         this.sc.OKResponse -= new Growl.Daemon.SubscriptionConnector.ResponseEventHandler(sc_OKResponse);
         this.sc.ErrorResponse -= new Growl.Daemon.SubscriptionConnector.ResponseEventHandler(sc_ErrorResponse);
         this.sc.Dispose();
         this.sc = null;
     }
 }
Example #7
0
 internal void Kill()
 {
     if (this.sc != null)
     {
         this.sc.StopRenewing();
         this.sc = null;
     }
 }
Example #8
0
 private void button2_Click(object sender, EventArgs e)
 {
     this.subscriberID = System.Guid.NewGuid().ToString();
     Growl.Daemon.Subscriber subscriber = new Growl.Daemon.Subscriber(this.subscriberID, "Superman", 24000);
     Growl.Daemon.SubscriptionConnector sc = new Growl.Daemon.SubscriptionConnector(subscriber, password, "127.0.0.1");
     sc.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText;
     sc.OKResponse += new Growl.Daemon.SubscriptionConnector.ResponseEventHandler(sc_OKResponse);
     sc.ErrorResponse += new Growl.Daemon.SubscriptionConnector.ResponseEventHandler(sc_ErrorResponse);
     sc.Subscribe();
 }