示例#1
0
        private static void ShowNotification(object state)
        {
            if (growlNotifications == null)
            {
                growlNotifications = new GrowlNotifiactions()
                {
                    Top = SystemParameters.WorkArea.Top + topOffset,
                    Left = SystemParameters.WorkArea.Left + SystemParameters.WorkArea.Width - leftOffset
                };
            }

            WordListEntry entry = wordList[i % wordList.Count];
            string defaultImageUri = "pack://application:,,,/Resources/quizlet.png";
            growlNotifications.AddNotification(new Notification
            {
                Title = entry.Phrase
                ,
                ImageUrl = String.IsNullOrEmpty(entry.ImageUri)? defaultImageUri : entry.ImageUri
                ,
                Message = entry.Translation
            });

            ++i;
        }
示例#2
0
 private void InitNotifications()
 {
     notifications = new GrowlNotifiactions();
     notifications.Top = SystemParameters.WorkArea.Top + 20;
     notifications.Left = SystemParameters.WorkArea.Left + SystemParameters.WorkArea.Width - 380;
 }