public override Control GetSessionWindow() { if (_sessionWindow == null) { _sessionWindow = new SampleSessionWindow(); } return(_sessionWindow); }
public override void OnOpenConnection(string username, SecureString password) { if (_sessionWindow == null) { throw new ProtocolException(beRemoteExInfoPackage.MajorInformationPackage, "Session window not initialized!"); } SampleSessionWindow sessionWnd = (SampleSessionWindow)_sessionWindow; //sessionWnd.OpenNewConnection(username, password); sessionWnd.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, (System.Threading.ThreadStart) delegate() { sessionWnd.OpenNewConnection(username, password); } ); }