コード例 #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
        public InitConnection(int leaguesID, int roundsID, IProfileRepository profileRepository, 
            IErrorMessagesPresenter errorPresenter, IConnectionRelayer connectionRelayer,
            IGameMatch gameMatch)
        {
            InitializeComponent();
            this.DataContext = this;
            IpAddress = "Automatic";
            this.leaguesID = leaguesID;
            this.roundsID = roundsID;
            this.profile = profileRepository;
            this.errorPresenter = errorPresenter;
            this.connectionRelayer = connectionRelayer;
            this.gameMatch = gameMatch;

            auth = new Authentication(profileRepository.Username, profileRepository.IPAddress);
        }
コード例 #3
0
ファイル: ConnectionDialog.xaml.cs プロジェクト: MartyIX/SoTh
        public ConnectionDialog(string ipAddress, int port, int leaguesID, int roundsID, 
            IProfileRepository profileRepository, IErrorMessagesPresenter errorPresenter, 
            IConnectionRelayer connectionRelayer, IGameMatch gameMatch)
        {
            InitializeComponent();
            this.DataContext = this;
            this.leaguesID = leaguesID;
            this.roundsID = roundsID;
            this.profile = profileRepository;
            this.errorPresenter = errorPresenter;
            this.connectionRelayer = connectionRelayer;
            this.port = port;
            this.ipAddress = ipAddress;
            this.gameMatch = gameMatch;
            endTheThread = 0;

            auth = new Authentication(profileRepository.Username, profileRepository.IPAddress);
        }
コード例 #4
0
 public void Initialize(IErrorMessagesPresenter errorPresenter,
     IProfileRepository profileRepository, IConnectionRelayer connectionRelayer,
     IConnectionDialogPresenter connectionDialogPresenter)
 {
     this.profile = profileRepository;
     this.profileRepository = profileRepository;
     this.errorPresenter = errorPresenter;
     this.connectionRelayer = connectionRelayer;
     this.connectionDialogPresenter = connectionDialogPresenter;
     this.Refresh();
 }