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

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

-fixed input control bug

File size: 1.3 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows.Data;
6using WorkspaceManager.View.Container;
7using System.Windows;
8using System.Windows.Controls;
9
10namespace WorkspaceManager.View.Converter
11{
12    class OverlapConverter : IValueConverter
13    {
14        #region IValueConverter Members
15
16        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
17        {
18            PluginViewState state = (PluginViewState)value;
19            String caption = (String)parameter;
20            if (caption == "PresentationPanel" && state == PluginViewState.Presentation)
21                return 1000;
22
23            if (caption == "SettingsPanel" && state == PluginViewState.Setting)
24                return 1000;
25
26            if (caption == "LogPanel" && state == PluginViewState.Log)
27                return 1000;
28
29            if (caption == "DataPanel" && state == PluginViewState.Data)
30                return 1000;
31
32            return 0;
33        }
34
35        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
36        {
37            throw new NotImplementedException();
38        }
39
40        #endregion
41    }
42}
Note: See TracBrowser for help on using the repository browser.