public Growl.UI.DestinationSettingsPanel GetSettingsPanel(DestinationBase db)
 {
     return new Growl.UI.RssSubscriptionInputs();
 }
        public Growl.Destinations.DestinationSettingsPanel GetSettingsPanel(DestinationBase fd)

        {
            return(new Growl.UI.ForwardDestinationInputs());
        }
 public DestinationSettingsPanel GetSettingsPanel(DestinationBase db)
 {
     return(new Growl.UI.ToastyForwardInputs());
 }
Beispiel #4
0
        public Growl.Destinations.DestinationSettingsPanel GetSettingsPanel(DestinationBase db)

        {
            return(new Growl.UI.NotifyIOSubscriptionInputs());
        }
Beispiel #5
0
        private void buttonSave_Click(object sender, EventArgs e)

        {
            if (this.dbEdit != null)

            {
                try

                {
                    this.settingsPanel.Update(this.dbEdit);
                }

                catch

                {
                    Utility.WriteDebugInfo(String.Format("EXCEPTION: '{0}' Update() failed", this.dbEdit.Description));
                }



                if (this.isSubscription)
                {
                    this.controller.EditSubscription((Subscription)this.dbEdit);
                }

                else
                {
                    this.controller.EditForwardDestination((ForwardDestination)this.dbEdit);
                }
            }

            else

            {
                DestinationBase db = null;

                try

                {
                    db = this.settingsPanel.Create();
                }

                catch

                {
                    Utility.WriteDebugInfo("EXCEPTION: Create() forward destination or subscription failed");
                }



                if (this.isSubscription)
                {
                    this.controller.AddSubscription((Subscription)db);
                }

                else
                {
                    this.controller.AddForwardDestination((ForwardDestination)db);
                }
            }

            this.Close();
        }
 public Growl.Destinations.DestinationSettingsPanel GetSettingsPanel(DestinationBase db)
 {
     return(new Growl.UI.TwitterForwardInputs());
 }
Beispiel #7
0
        private void ChooseForwarding_Load(object sender, EventArgs e)

        {
            this.SuspendLayout();



            this.BackColor = Color.FromArgb(240, 240, 240);



            this.forwardListView1.AllDisabled = false;

            if (this.controller != null && this.prefs != null)

            {
                if (this.controller.ForwardDestinations != null && this.controller.ForwardDestinations.Count > 0)

                {
                    /*
                     *
                     * Dictionary<string, DestinationBase> computers = new Dictionary<string, DestinationBase>();
                     *
                     * foreach (ForwardDestination fc in this.controller.ForwardDestinations.Values)
                     *
                     * {
                     *
                     *  bool enabled = this.prefs.PrefForwardCustomList.Contains(fc.Key);
                     *
                     *  DestinationBase clone = fc.Clone();
                     *
                     *  clone.Key = fc.Key;
                     *
                     *  clone.Enabled = enabled;
                     *
                     *  computers.Add(clone.Description, clone);
                     *
                     * }
                     *
                     * this.forwardListView1.Computers = computers;
                     *
                     * this.forwardListView1.Draw();
                     *
                     * */



                    DestinationBase[] computers = new DestinationBase[this.controller.ForwardDestinations.Count];

                    int i = 0;

                    foreach (ForwardDestination fc in this.controller.ForwardDestinations.Values)

                    {
                        bool enabled = this.prefs.PrefForwardCustomList.Contains(fc.Key);

                        DestinationBase clone = fc.Clone();

                        clone.Key = fc.Key;

                        clone.Enabled = enabled;

                        computers[i++] = clone;
                    }

                    this.forwardListView1.Computers = computers;

                    this.forwardListView1.Draw();
                }

                else

                {
                    // need to show some kind of 'no computers available message'
                }
            }

            else

            {
                this.Close();
            }



            this.ResumeLayout();
        }
        public static ISubscriptionHandler GetHandler(DestinationBase db)
        {
            Type type = db.GetType();

            return(GetHandler(type));
        }