public override void Update(DestinationBase fd) { ProwlForwardDestination pfd = fd as ProwlForwardDestination; if (pfd != null) { pfd.Description = this.textBoxDescription.Text; pfd.APIKey = this.textBoxAPIKey.Text; pfd.OnlyWhenIdle = this.checkBoxOnlyWhenIdle.Checked; PrefPriority prefPriority = this.comboBoxMinimumPriority.SelectedItem as PrefPriority; pfd.MinimumPriority = (prefPriority != null ? prefPriority.Priority : null); SendConfirmation(pfd); } }
public override DestinationBase Create() { Growl.Connector.Priority?priority = null; PrefPriority prefPriority = this.comboBoxMinimumPriority.SelectedItem as PrefPriority; if (prefPriority != null) { priority = prefPriority.Priority.Value; } TwitterForwardDestination tfd = new TwitterForwardDestination(String.Format("@{0}", this.textBoxUsername.Text), true, this.textBoxUsername.Text, this.textBoxPassword.Text, this.textBoxFormat.Text, priority, this.checkBoxOnlyWhenIdle.Checked); return(tfd); }
public override DestinationBase Create() { Growl.Connector.Priority?priority = null; PrefPriority prefPriority = this.comboBoxMinimumPriority.SelectedItem as PrefPriority; if (prefPriority != null) { priority = prefPriority.Priority.Value; } ProwlForwardDestination pfd = new ProwlForwardDestination(this.textBoxDescription.Text, true, this.textBoxAPIKey.Text, priority, this.checkBoxOnlyWhenIdle.Checked); SendConfirmation(pfd); return(pfd); }
public override void Update(DestinationBase fd) { TwitterForwardDestination tfd = fd as TwitterForwardDestination; if (tfd != null) { tfd.Username = this.textBoxUsername.Text; tfd.Password = this.textBoxPassword.Text; tfd.Format = this.textBoxFormat.Text; tfd.OnlyWhenIdle = this.checkBoxOnlyWhenIdle.Checked; PrefPriority prefPriority = this.comboBoxMinimumPriority.SelectedItem as PrefPriority; tfd.MinimumPriority = (prefPriority != null ? prefPriority.Priority : null); } }
public override DestinationBase Create() { Growl.Connector.Priority?priority = null; PrefPriority prefPriority = this.comboBoxMinimumPriority.SelectedItem as PrefPriority; if (prefPriority != null) { priority = prefPriority.Priority.Value; } EmailForwardDestination efd = new EmailForwardDestination(this.textBoxDescription.Text, true, this.textBoxUsername.Text, this.smtp, priority, this.checkBoxOnlyWhenIdle.Checked); return(efd); }
public override void Update(DestinationBase fd) { EmailForwardDestination efd = fd as EmailForwardDestination; if (efd != null) { efd.Description = this.textBoxDescription.Text; efd.To = this.textBoxUsername.Text; efd.OnlyWhenIdle = this.checkBoxOnlyWhenIdle.Checked; PrefPriority prefPriority = this.comboBoxMinimumPriority.SelectedItem as PrefPriority; efd.MinimumPriority = (prefPriority != null ? prefPriority.Priority : null); efd.SMTPConfiguration = this.smtp; } }
public override void Initialize(bool isSubscription, DestinationListItem fdli, DestinationBase fd) { this.doValidation = true; this.panelSMTPSettings.Visible = false; PrefPriority[] priorityChoices = PrefPriority.GetList(false); this.comboBoxMinimumPriority.Items.Add(Properties.Resources.AddProwl_AnyPriority); for (int i = 0; i < priorityChoices.Length; i++) { this.comboBoxMinimumPriority.Items.Add(priorityChoices[i]); } this.comboBoxMinimumPriority.SelectedIndex = 0; // set text box values this.textBoxDescription.Text = String.Empty; this.textBoxDescription.Enabled = true; this.textBoxUsername.Text = String.Empty; this.textBoxUsername.Enabled = true; this.comboBoxMinimumPriority.SelectedIndex = 0; this.comboBoxMinimumPriority.Enabled = true; EmailForwardDestination efd = fd as EmailForwardDestination; if (efd != null) { this.textBoxDescription.Text = efd.Description; this.textBoxUsername.Text = efd.To; if (efd.MinimumPriority != null && efd.MinimumPriority.HasValue) { this.comboBoxMinimumPriority.SelectedItem = PrefPriority.GetByValue(efd.MinimumPriority.Value); } this.checkBoxOnlyWhenIdle.Checked = efd.OnlyWhenIdle; this.smtp = efd.SMTPConfiguration; } this.labelSMTPValues.Text = String.Format("{0}", this.smtp.Host); ValidateInputs(); this.textBoxDescription.Focus(); }
public override void Initialize(bool isSubscription, DestinationListItem fdli, DestinationBase fd) { this.doValidation = true; PrefPriority[] priorityChoices = PrefPriority.GetList(false); this.comboBoxMinimumPriority.Items.Add(Properties.Resources.AddProwl_AnyPriority); for (int i = 0; i < priorityChoices.Length; i++) { this.comboBoxMinimumPriority.Items.Add(priorityChoices[i]); } this.comboBoxMinimumPriority.SelectedIndex = 0; // set text box values this.textBoxUsername.Text = String.Empty; this.textBoxUsername.Enabled = true; this.textBoxPassword.Text = String.Empty; this.textBoxPassword.Enabled = true; this.textBoxFormat.Text = TwitterForwardDestination.DefaultFormat; this.textBoxFormat.Enabled = true; this.comboBoxMinimumPriority.SelectedIndex = 0; this.comboBoxMinimumPriority.Enabled = true; TwitterForwardDestination tfd = fd as TwitterForwardDestination; if (tfd != null) { this.textBoxUsername.Text = tfd.Username; this.textBoxPassword.Text = tfd.Password; this.textBoxFormat.Text = tfd.Format; this.checkBoxOnlyWhenIdle.Checked = tfd.OnlyWhenIdle; if (tfd.MinimumPriority != null && tfd.MinimumPriority.HasValue) { this.comboBoxMinimumPriority.SelectedItem = PrefPriority.GetByValue(tfd.MinimumPriority.Value); } } ValidateInputs(); this.textBoxUsername.Focus(); }
public override void Initialize(bool isSubscription, DestinationListItem fdli, DestinationBase fd) { this.doValidation = true; PrefPriority[] priorityChoices = PrefPriority.GetList(false); this.comboBoxMinimumPriority.Items.Add(Properties.Resources.AddProwl_AnyPriority); for (int i = 0; i < priorityChoices.Length; i++) { this.comboBoxMinimumPriority.Items.Add(priorityChoices[i]); } this.comboBoxMinimumPriority.SelectedIndex = 0; // set text box values this.textBoxDescription.Text = String.Empty; this.textBoxDescription.Enabled = true; this.textBoxAPIKey.Text = String.Empty; this.textBoxAPIKey.Enabled = true; this.comboBoxMinimumPriority.SelectedIndex = 0; this.comboBoxMinimumPriority.Enabled = true; ProwlForwardDestination pfd = fd as ProwlForwardDestination; if (pfd != null) { this.textBoxDescription.Text = pfd.Description; this.textBoxAPIKey.Text = pfd.APIKey; if (pfd.MinimumPriority != null && pfd.MinimumPriority.HasValue) { this.comboBoxMinimumPriority.SelectedItem = PrefPriority.GetByValue(pfd.MinimumPriority.Value); } this.checkBoxOnlyWhenIdle.Checked = pfd.OnlyWhenIdle; } ValidateInputs(); this.textBoxDescription.Focus(); }