source: trunk/CrypPlugins/WorkspaceManager/View/VisualComponents/DataPresentation.xaml.cs @ 1929

Last change on this file since 1929 was 1929, checked in by kopal, 11 years ago
  • some optimization
  • Benchmark now loggs Plugins/sec and Memory Usage to logg files (only for testing purposes; will be removed in later releases)
File size: 1.7 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows;
6using System.Windows.Controls;
7using System.Windows.Data;
8using System.Windows.Documents;
9using System.Windows.Input;
10using System.Windows.Media;
11using System.Windows.Media.Imaging;
12using System.Windows.Navigation;
13using System.Windows.Shapes;
14using WorkspaceManager.View.Container;
15
16namespace WorkspaceManager.View.VisualComponents
17{
18    /// <summary>
19    /// Interaction logic for DataPresentation.xaml
20    /// </summary>
21    public partial class DataPresentation : UserControl
22    {
23        public ConnectorView Connector { get; set; }
24
25        public DataPresentation()
26        {
27            InitializeComponent();
28        }
29
30        public DataPresentation(ConnectorView connector)
31        {
32            setBaseControl(connector);
33            InitializeComponent();
34        }
35
36        private void setBaseControl(ConnectorView connector)
37        {
38            this.Connector = connector;
39            this.DataContext = connector;
40        }
41
42        public void update()
43        {
44            if(Connector.Model.HasData)
45                Data.Text = Connector.Model.Data.ToString();
46
47            return;
48        }
49
50        private void Border_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
51        {
52            if (DataPanel.Visibility == Visibility.Collapsed)
53            {
54                DataPanel.Visibility = Visibility.Visible;
55                return;
56            }
57
58            if (DataPanel.Visibility == Visibility.Visible)
59            {
60                DataPanel.Visibility = Visibility.Collapsed;
61                return;
62            }
63
64        }
65    }
66}
Note: See TracBrowser for help on using the repository browser.