Esempio n. 1
0
        private void OnReminder(string title, string informativeText)
        {
            if (_parentWindow.TryBeginInvoke(OnReminder, title, informativeText))
            {
                return;
            }

            void StartButtonClick()
            {
                _taskbarIcon.CloseBalloon();
                var guid = Toggl.Start("", "", 0, 0, "", "", true);

                _parentWindow.ShowOnTop();
                if (guid != null)
                {
                    Toggl.Edit(guid, true, Toggl.Description);
                }
            }

            var reminder =
                new ReminderNotification(_taskbarIcon.CloseBalloon, _parentWindow.ShowOnTop, StartButtonClick)
            {
                Title = title, Message = informativeText
            };

            if (!_taskbarIcon.ShowNotification(reminder, PopupAnimation.Slide, TimeSpan.FromSeconds(10)))
            {
                _taskbarIcon.ShowBalloonTip(title, informativeText, Properties.Resources.toggl, largeIcon: true);
            }
        }
Esempio n. 2
0
        private void onDisplayPomodoro(string title, string informativetext)
        {
            if (this.TryBeginInvoke(onDisplayPomodoro, title, informativetext))
            {
                return;
            }

            this.Message = informativetext;
            this.Title   = title;

            this.RemoveFromParent();

            if (!icon.ShowNotification(this, PopupAnimation.Slide, null))
            {
                icon.ShowBalloonTip(title, informativetext, Properties.Resources.toggl, largeIcon: true);
            }
            else
            {
                System.Media.SystemSounds.Asterisk.Play();
            }
        }
Esempio n. 3
0
        private void onReminder(string title, string informative_text)
        {
            if (this.TryBeginInvoke(onReminder, title, informative_text))
            {
                return;
            }

            Title   = title;
            Message = informative_text;

            this.RemoveFromParent();

            if (!icon.ShowNotification(this, PopupAnimation.Slide, TimeSpan.FromSeconds(10)))
            {
                icon.ShowBalloonTip(title, informative_text, Properties.Resources.toggl, largeIcon: true);
            }
        }