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

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

-fixed pathfinding
-fixed line drawing
-added Colorpicker
-fixed lock/unlock at TextInputWrapper
-feature: Background and TextForeground in TextInputWrapper added
-fixed a issue With loading and such
-WorkspaceModel doesn't throw exception anymore (Samples functional again)
-fixed some Styles
-Startable implemented and loaded right
-Startable Logo moved

File size: 1.8 KB
RevLine 
[1807]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
[1991]20            //if (caption == "PresentationOption" && state == PluginViewState.Presentation)
21            //    return Visibility.Collapsed;
22            //else if (caption == "PresentationOption" && state != PluginViewState.Presentation)
23            //    return Visibility.Visible;
[1834]24
[1807]25            if (caption == "SettingsPanel" && state == PluginViewState.Setting)
26                return Visibility.Visible;
27
28            if (caption == "LogPanel" && state == PluginViewState.Log)
29                return Visibility.Visible;
30
31            if (caption == "DataPanel" && state == PluginViewState.Data)
32                return Visibility.Visible;
33
[1991]34            if(caption == "OptionPanel" && state != PluginViewState.Min)
[1807]35                return Visibility.Visible;
36
[1991]37            //if (caption == null && state == PluginViewState.Min)
38            //    return Visibility.Visible;
[1834]39
40            return Visibility.Collapsed;
[1807]41        }
42
43        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
44        {
45            throw new NotImplementedException();
46        }
47    }
48}
Note: See TracBrowser for help on using the repository browser.