private async void OnNavigationBarAddClicked(object sender, EventArgs e) { var clientData = await ViewModel.SaveNewClient(); if (ClientCreated != null) { ClientCreated.Invoke(clientData); } }
public static PrimusClient CreateClient() { var client = new PrimusClient(Guid.NewGuid()); _clients.Add(client.Guid, client); ClientCreated?.Invoke(client); return(client); }
public void Awake() { instance = this; DontDestroyOnLoad(this); GetUserInfo.UpdateUserInfo(); playerInfo = new PlayerInfo(GetUserInfo.GetUserName(), GetUserInfo.GetUserID()); NetPeerConfiguration Config = new NetPeerConfiguration("BeatSaberMultiplayer") { MaximumHandshakeAttempts = 2, AutoFlushSendQueue = false }; NetworkClient = new NetClient(Config); ClientCreated?.Invoke(); }
internal static void RaiseClientCreated(ConnectionClient client) { Log.Out.Info($"Raising 'ClientCreated' event for {client.EndPoint}"); ClientCreated?.Invoke(new ClientCreatedEventArgs(client)); }