コード例 #1
0
        public void Show(string ipAddress, int port, int leaguesID, int roundsID, IProfileRepository profileRepository, IErrorMessagesPresenter errorPresenter, IConnectionRelayer connectionRelayer, IGameMatch gameMatch)
        {
            if (connectionDialog != null)
            {
                connectionDialog.Close();
            }

            connectionDialog = new ConnectionDialog(ipAddress, port, leaguesID, roundsID,
                    ProfileRepository.Instance, consolePane, this, null);
            connectionDialog.Owner = this;
            connectionDialog.Closing += new System.ComponentModel.CancelEventHandler(modalWindow_Closing);
            connectionDialog.Show();
        }
コード例 #2
0
ファイル: Window1.xaml.cs プロジェクト: MartyIX/SoTh
        private void btnStartClient_Click(object sender, RoutedEventArgs e)
        {
            if (connectionDialog != null)
            {
                connectionDialog.Terminate();
                connectionDialog.Close();
            }

            DummyProfileRepository profile2 = new DummyProfileRepository();
            profile2.username = "******";

            connectionDialog = new ConnectionDialog("10.0.0.5", 56726, 1, 1, profile2, null, this, null);
            connectionDialog.Show();
        }