Day chat
This commit is contained in:
parent
227372ac3d
commit
dc9796ed31
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using DiscordRPC;
|
||||
using MafiaCommon.Packets;
|
||||
@ -193,6 +194,10 @@ namespace MafiaGame
|
||||
MainWindow.Instance.GameVotingActiveChat.Items.Add(message);
|
||||
MainWindow.Instance.GameVotingActiveChat.ScrollIntoView(message);
|
||||
break;
|
||||
case ChatType.Day:
|
||||
MainWindow.Instance.GameDayChat.Items.Add(message);
|
||||
MainWindow.Instance.GameDayChat.ScrollIntoView(message);
|
||||
break;
|
||||
}
|
||||
}));
|
||||
break;
|
||||
@ -234,7 +239,7 @@ namespace MafiaGame
|
||||
break;
|
||||
}
|
||||
|
||||
App.Instance.GetRpcClient().UpdateDetails("Голосование");
|
||||
App.Instance.GetRpcClient().UpdateDetails("Ночь");
|
||||
break;
|
||||
case PacketType.EndGame:
|
||||
App.Current.Dispatcher.Invoke((Action) (() =>
|
||||
@ -243,8 +248,26 @@ namespace MafiaGame
|
||||
}));
|
||||
App.Instance.GetRpcClient().UpdateDetails("Ожидание старта");
|
||||
break;
|
||||
case PacketType.GameStateChanged:
|
||||
switch (((GameStageChangedPacket)packet).GameState)
|
||||
{
|
||||
case GameState.Day:
|
||||
App.Current.Dispatcher.Invoke((Action) (() =>
|
||||
{
|
||||
MainWindow.Instance.HideAll();
|
||||
MainWindow.Instance.GameDay.Visibility = Visibility.Visible;
|
||||
}));
|
||||
App.Instance.GetRpcClient().UpdateDetails("День");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void WorkPacket(Packet packet)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user