Changeset 1538


Ignore:
Timestamp:
May 30, 2010, 7:10:06 PM (12 years ago)
Author:
Paul Lelgemann
Message:

o fixed bug in event handling of the editor presentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/P2PEditor/GUI/P2PEditorPresentation.xaml.cs

    r1537 r1538  
    5050            P2PEditorPresentation = this;
    5151
    52             P2PManager.OnP2PConnectionStateChangeOccurred += P2PManager_OnP2PConnectionStateChangeOccurred;
     52            P2PManager.OnP2PConnectionStateChangeOccurred += HandleChangedPeerToPeerConnectionState;
    5353
    5454            InitializeComponent();
     
    5757        }
    5858
    59         private void P2PManager_OnP2PConnectionStateChangeOccurred(object sender, bool newState)
     59        private void HandleChangedPeerToPeerConnectionState(object sender, bool newState)
    6060        {
    61             IsP2PConnected = newState;
     61            Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(UpdateConnectionState));
     62        }
     63
     64        private void UpdateConnectionState()
     65        {
     66            IsP2PConnected = P2PManager.Instance.P2PConnected();
    6267        }
    6368
Note: See TracChangeset for help on using the changeset viewer.