protected TweetDeckBridge(FormBrowser form, FormNotificationMain notification) { this.form = form; this.notification = notification; }
public Notification(FormBrowser form, FormNotificationMain notification) : base(form, notification) { }
public TabSettingsNotifications(FormNotificationMain notification) { InitializeComponent(); this.notification = notification; this.notification.CanMoveWindow = () => radioLocCustom.Checked; this.notification.Move += (sender, args) => { if (radioLocCustom.Checked && this.notification.Location != ControlExtensions.InvisibleLocation) { Config.CustomNotificationPosition = this.notification.Location; } }; this.notification.Initialized += (sender, args) => { this.InvokeAsyncSafe(() => this.notification.ShowNotificationForSettings(true)); }; this.notification.Activated += notification_Activated; this.notification.Show(); switch (Config.NotificationPosition) { case TweetNotification.Position.TopLeft: radioLocTL.Checked = true; break; case TweetNotification.Position.TopRight: radioLocTR.Checked = true; break; case TweetNotification.Position.BottomLeft: radioLocBL.Checked = true; break; case TweetNotification.Position.BottomRight: radioLocBR.Checked = true; break; case TweetNotification.Position.Custom: radioLocCustom.Checked = true; break; } comboBoxDisplay.Enabled = trackBarEdgeDistance.Enabled = !radioLocCustom.Checked; toolTip.SetToolTip(trackBarDuration, toolTip.GetToolTip(labelDurationValue)); trackBarDuration.SetValueSafe(Config.NotificationDurationValue); labelDurationValue.Text = Config.NotificationDurationValue + " ms/c"; comboBoxIdlePause.Items.Add("Disabled"); comboBoxIdlePause.Items.Add("30 seconds"); comboBoxIdlePause.Items.Add("1 minute"); comboBoxIdlePause.Items.Add("2 minutes"); comboBoxIdlePause.Items.Add("5 minutes"); comboBoxIdlePause.SelectedIndex = Math.Max(0, Array.FindIndex(IdlePauseSeconds, val => val == Config.NotificationIdlePauseSeconds)); comboBoxDisplay.Items.Add("(Same As " + Program.BrandName + ")"); foreach (Screen screen in Screen.AllScreens) { comboBoxDisplay.Items.Add(screen.DeviceName + " (" + screen.Bounds.Width + "x" + screen.Bounds.Height + ")"); } comboBoxDisplay.SelectedIndex = Math.Min(comboBoxDisplay.Items.Count - 1, Config.NotificationDisplay); checkColumnName.Checked = Config.DisplayNotificationColumn; checkNotificationTimer.Checked = Config.DisplayNotificationTimer; checkTimerCountDown.Enabled = checkNotificationTimer.Checked; checkTimerCountDown.Checked = Config.NotificationTimerCountDown; checkSkipOnLinkClick.Checked = Config.NotificationSkipOnLinkClick; checkNonIntrusive.Checked = Config.NotificationNonIntrusiveMode; trackBarEdgeDistance.SetValueSafe(Config.NotificationEdgeDistance); labelEdgeDistanceValue.Text = trackBarEdgeDistance.Value.ToString(CultureInfo.InvariantCulture) + " px"; Disposed += (sender, args) => this.notification.Dispose(); }