source: trunk/CrypPlugins/P2PEditor/GUI/Controls/ConnectTab.xaml.cs @ 1917

Last change on this file since 1917 was 1917, checked in by Paul Lelgemann, 11 years ago

o KeySearcher: fixed "+unendlich years" as estimated finish date display bug
o P2PEditor: fixed behavior of new button without p2p connection and participate button with not job selected
o P2PEditor: minor refactoring, removed unused code and classes

File size: 1.1 KB
Line 
1using System;
2using System.Windows;
3using Cryptool.P2P;
4
5namespace Cryptool.P2PEditor.GUI.Controls
6{
7    public partial class ConnectTab
8    {
9        public static readonly DependencyProperty IsP2PConnectingProperty =
10            DependencyProperty.Register("IsP2PConnecting",
11                                        typeof(
12                                            Boolean),
13                                        typeof(
14                                            ConnectTab), new PropertyMetadata(false));
15
16        public Boolean IsP2PConnecting
17        {
18            get { return (Boolean)GetValue(IsP2PConnectingProperty); }
19            set { SetValue(IsP2PConnectingProperty, value); }
20        }
21
22        public ConnectTab()
23        {
24            InitializeComponent();
25        }
26
27        private void ConnectButtonClick(object sender, RoutedEventArgs e)
28        {
29            if (!P2PManager.IsConnected)
30                P2PManager.Connect();
31
32            ((P2PEditorPresentation) P2PEditor.Presentation).UpdateConnectionState();
33        }
34    }
35}
Note: See TracBrowser for help on using the repository browser.