public void StartGame() { GameStarted = true; GameInfo gameInfo = new GameInfo(); foreach (var client in this.Clients) gameInfo.Users.Add(client.NickName); gameInfo.FieldsToFill = ServerMan.GameFields; gameInfo.GenereteNewCharacter(); SendToAll(MessageTypes.StartGame, Serializer.GetSerializedClass<GameInfo>(gameInfo)); }
private void Context_OnGameStart(object t1, GameInfo t2) { _ViewModelBase.Dispather.InvokeIfRequired(delegate() { CloseWindowJoin(); Context.GameInfo = t2; GamePanel1.Items = Context.GameInfo.FieldsToFill.AllFields; GamePanel1.FirstCharacter = t2.GameCharacter.ToString(); TabControl_Main.SelectedIndex = 1; }, System.Windows.Threading.DispatcherPriority.Normal); }