/// <summary>
        ///     Called when the local player joins the lobby.
        /// </summary>
        /// <param name="connection"></param>
        private void OnLobbyLocalPeerConnected(SteamConnection connection)
        {
            network.LocalConnection = connection;
            network.MaxPlayers      = SteamMatchmaking.GetLobbyMemberLimit(connection.LobbyID);
            network.OnSetDefaultLobbyMemberData(connection);

            // Get Lobby Member Data
            int numMembers = SteamMatchmaking.GetNumLobbyMembers(connection.LobbyID);

            for (int i = 0; i < numMembers; i++)
            {
                CSteamID id = SteamMatchmaking.GetLobbyMemberByIndex(connection.LobbyID, i);
                if (id == connection.SteamID)
                {
                    continue;
                }
                connection.AddConnection(id);
            }

            //GetModule<AuthModule>().BeginAuthentication(authenticationLevel);
            if (connection.IsHost)
            {
                HostSetup?.Invoke(connection);
            }
            else
            {
                ClientSetup?.Invoke(connection);
            }

            connection.IsConnected = true;
        }
예제 #2
0
        /// <summary>
        /// Get clients setup (one client with channels to all servers)
        /// </summary>
        /// <returns></returns>
        public override ClientSetup[] GetClientsSetups()
        {
            var setup = new ClientSetup
            {
                EnableStatus = EnableStatusService,
                Ports        = Enumerable.Range(Port, ServersCount).ToArray(),
            };

            return(new ClientSetup[] { setup });
        }
        public static void SeedDatabase(IApplicationBuilder app)
        {
            // TODO: Only seed if needed
            using (var serviceScope = app.ApplicationServices.GetService <IServiceScopeFactory>().CreateScope())
            {
                var identityServerConfigurationDbContext = serviceScope.ServiceProvider.GetRequiredService <ConfigurationDbContext>();

                ClientSetup.EnsureClientsRegistered(identityServerConfigurationDbContext);
                ApiResourceSetup.EnsureApiResourcesRegistered(identityServerConfigurationDbContext);
                IdentityResourceSetup.EnsureClientsRegistered(identityServerConfigurationDbContext);
            }
        }
예제 #4
0
        public Form1()
        {
            InitializeComponent();

            _clientSetup = new ClientSetup(_callbackContract);

            _callbackContract.GeneralStatusChanged    += _onGeneralStatusChanged;
            _callbackContract.OperationsQueueChanged  += _onOperationQueueChanged;
            _callbackContract.CurrentOperationChanged += _onCurrentActionChanged;

            tbClientName.Text = _clientSetup.ClientId.ToString();
        }
예제 #5
0
        /// <summary>
        /// Setup clients
        /// </summary>
        private void SetupClients()
        {
            var clientSetup = new ClientSetup
            {
                EnableStatus = true,
                Name         = "Default client",
                TimeoutMs    = 1000,
                Ports        = Enumerable.Range(0, _serverCount).Select(i => _port + i).ToArray()
            };

            _clientServices = ClientSetupUtil.CreateProvider(null, clientSetup);
        }
예제 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClientSetupServiceSoapClient clientSetupServiceSoapClient = new ClientSetupServiceSoapClient();
            ClientSetup clientSeup = clientSetupServiceSoapClient.GetClientSetup();

            LabelCompanyName.Text = clientSeup.LegalName;

            if (Session["CurrentUser"] != null)
            {
                AccessControl accessCntrl = (AccessControl)Session["CurrentUserRole"];
                LabelLoginUserInfo.Text = Session["CurrentUser"].ToString();
            }
            else
            {
                LabelLoginUserInfo.Text = "N/A";
            }
        }
예제 #7
0
        public ClientSetupInfo GetClientSetup()
        {
            DataAccess      dataAccess      = new DataAccess();
            ClientSetup     clientSetup     = dataAccess.getClientSetup();
            ClientSetupInfo clientSetupInfo = new ClientSetupInfo();

            clientSetupInfo.ClientId             = clientSetup.ClientId;
            clientSetupInfo.LegalName            = clientSetup.LegalName;
            clientSetupInfo.AddressLine          = clientSetup.AddressLine;
            clientSetupInfo.City                 = clientSetup.City;
            clientSetupInfo.State                = clientSetup.State;
            clientSetupInfo.PostalCode           = clientSetup.PostalCode;
            clientSetupInfo.Country              = clientSetup.Country;
            clientSetupInfo.CompanyLogoBase64Str = clientSetup.CompanyLogo != null?Converter.ImageToBase64(clientSetup.CompanyLogo, System.Drawing.Imaging.ImageFormat.Bmp) : "";

            clientSetupInfo.CompanyLogo         = null;
            clientSetupInfo.DataRefreshInterval = clientSetup.DataRefreshInterval;
            return(clientSetupInfo);
        }
예제 #8
0
 public void Start()
 {
     Cs = new ClientSetup();
 }