public MultiplayerControl(Control Control, MultiplayerScreen MultiplayerScreen, string UserName, SecureString Password) { this.MultiplayerScreen = MultiplayerScreen; this.Control = Control; this.UserName = UserName; this.Password = Password; Data.SaveMultiplayerUserName(UserName); RefreshServerList(); // background worker BackgroundWorkerWaitForPlayer2.DoWork += BackgroundWorkerWaitForPlayer2_DoWork; BackgroundWorkerWaitForPlayer2.RunWorkerCompleted += BackgroundWorkerWaitForPlayer2_RunWorkerCompleted; }
public void ShowMultiplayerScreen(string UserName, SecureString Password) { QuitCurrentScreen(); MultiplayerScreen = new MultiplayerScreen(this, UserName, Password); MainWindow.ContentControl_Main.Content = MultiplayerScreen; }