source: trunk/CrypPlugins/WorkspaceManager/View/Converter/NotificationLevelConverter.cs @ 1991

Last change on this file since 1991 was 1831, checked in by matkovic, 11 years ago

-LogInfo now pops up
-Added new icon for NotificationLevels
-Several style changes on LogPresentation

File size: 1.6 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows.Data;
6using Cryptool.PluginBase;
7using System.Windows.Media;
8using System.Windows.Media.Imaging;
9
10namespace WorkspaceManager.View.Converter
11{
12    class NotificationLevelConverter : IValueConverter
13    {
14        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
15        {
16            NotificationLevel level = (NotificationLevel)value;
17            BitmapImage image = null;
18            switch (level)
19            {
20                case NotificationLevel.Error:
21                    image = new BitmapImage(new Uri("../Image/error2.png", UriKind.RelativeOrAbsolute));
22                    break;
23                case NotificationLevel.Warning:
24                    image = new BitmapImage(new Uri("../Image/warn.png", UriKind.RelativeOrAbsolute));
25                    break;
26                case NotificationLevel.Info:
27                    image = new BitmapImage(new Uri("../Image/info.png", UriKind.RelativeOrAbsolute));
28                    break;
29                case NotificationLevel.Debug:
30                    image = new BitmapImage(new Uri("../Image/debug.png", UriKind.RelativeOrAbsolute));
31                    break;
32            }
33
34            return image;
35        }
36
37        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
38        {
39            throw new NotImplementedException();
40        }
41    }
42}
Note: See TracBrowser for help on using the repository browser.