source: trunk/CrypPlugins/WorkspaceManager/View/Converter/ViewStateConverter.cs @ 1807

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

-Logging added
-Progress bar added
-DataPresentation now updating
-PluginContainerView complete rebuilt
-Several images added

File size: 1.5 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;
8
9namespace WorkspaceManager.View.Converter
10{
11    class ViewStateConverter : IValueConverter
12    {
13        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
14        {
15            PluginViewState state = (PluginViewState)value;
16            String caption = (String)parameter;
17            if (caption == "PresentationPanel" && state == PluginViewState.Presentation)
18                return Visibility.Visible;
19
20            if (caption == "SettingsPanel" && state == PluginViewState.Setting)
21                return Visibility.Visible;
22
23            if (caption == "LogPanel" && state == PluginViewState.Log)
24                return Visibility.Visible;
25
26            if (caption == "DataPanel" && state == PluginViewState.Data)
27                return Visibility.Visible;
28
29            if(caption == "OptionPanel" && state == PluginViewState.Min)
30                return Visibility.Collapsed;
31            else if(caption == "OptionPanel" && state != PluginViewState.Min)
32                return Visibility.Visible;
33
34            return Visibility.Collapsed;
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.