add the name of clients and change the display mode of the timertags/0.1.0
| @@ -702,7 +702,7 @@ namespace Client | |||||
| { | { | ||||
| foreach (var data in listOfAll) | foreach (var data in listOfAll) | ||||
| { | { | ||||
| StatusBarsOfCircumstance.SetValue(data, gateOpened, isEmergencyDrawed, isEmergencyOpened); | |||||
| StatusBarsOfCircumstance.SetValue(data, gateOpened, isEmergencyDrawed, isEmergencyOpened,playerID); | |||||
| } | } | ||||
| if (!hasDrawed && mapFlag) | if (!hasDrawed && mapFlag) | ||||
| DrawMap(); | DrawMap(); | ||||
| @@ -14,10 +14,11 @@ | |||||
| <RowDefinition Height="20*"/> | <RowDefinition Height="20*"/> | ||||
| </Grid.RowDefinitions> | </Grid.RowDefinitions> | ||||
| <Grid.ColumnDefinitions> | <Grid.ColumnDefinitions> | ||||
| <ColumnDefinition Width="20*"/> | |||||
| <ColumnDefinition Width="62*"/> | |||||
| <ColumnDefinition Width="41*"/> | |||||
| <ColumnDefinition Width="41*"/> | |||||
| </Grid.ColumnDefinitions> | </Grid.ColumnDefinitions> | ||||
| <TextBox Name="time" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="Time⏳: " Grid.Row="0" Grid.ColumnSpan="2" FontSize="14"/> | |||||
| <TextBox Name="time" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="Time⏳: " Grid.Row="0" Grid.ColumnSpan="1" FontSize="14"/> | |||||
| <TextBox Name="name" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="🚀" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="1" FontSize="14"/> | |||||
| <TextBox Name="status" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="📱: 
🚪: 
🆘: 
🏃: 
⚰️: " Grid.Row="1" Grid.ColumnSpan="2" FontSize="13"/> | <TextBox Name="status" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="📱: 
🚪: 
🆘: 
🏃: 
⚰️: " Grid.Row="1" Grid.ColumnSpan="2" FontSize="13"/> | ||||
| <TextBox Name="scoresOfStudents" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="Scores of Students: " Grid.Row="2" Grid.ColumnSpan="2" FontSize="12"/> | <TextBox Name="scoresOfStudents" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="Scores of Students: " Grid.Row="2" Grid.ColumnSpan="2" FontSize="12"/> | ||||
| <TextBox Name="scoresOfTrickers" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="Scores of Tricker: " Grid.Row="3" Grid.ColumnSpan="2" FontSize="12"/> | <TextBox Name="scoresOfTrickers" IsReadOnly="True" BorderBrush="LightGray" TextWrapping="Wrap" Text="Scores of Tricker: " Grid.Row="3" Grid.ColumnSpan="2" FontSize="12"/> | ||||
| @@ -32,14 +32,43 @@ namespace Client | |||||
| public void SetFontSize(double fontsize) | public void SetFontSize(double fontsize) | ||||
| { | { | ||||
| status.FontSize = 13 * fontsize / 12; | status.FontSize = 13 * fontsize / 12; | ||||
| time.FontSize = 13 * fontsize / 12; | |||||
| time.FontSize = 14 * fontsize / 12; | |||||
| name.FontSize = 14 * fontsize / 12; | |||||
| scoresOfStudents.FontSize = scoresOfTrickers.FontSize = fontsize; | scoresOfStudents.FontSize = scoresOfTrickers.FontSize = fontsize; | ||||
| } | } | ||||
| public void SetValue(MessageOfAll obj, bool gateOpened, bool hiddenGateRefreshed, bool hiddenGateOpened) | |||||
| public void SetValue(MessageOfAll obj, bool gateOpened, bool hiddenGateRefreshed, bool hiddenGateOpened,long playerId) | |||||
| { | { | ||||
| time.Text = "Time⏳: " + Convert.ToString(obj.GameTime); | |||||
| status.Text = "📱: " + Convert.ToString(obj.SubjectFinished) + "\n🚪: "; | |||||
| int min, sec; | |||||
| sec = obj.GameTime / 1000; | |||||
| min = sec / 60; | |||||
| sec = sec % 60; | |||||
| time.Text = "Time⏳: " + Convert.ToString(min)+": "; | |||||
| if(sec/10==0) | |||||
| { | |||||
| time.Text += "0" ; | |||||
| time.Text += Convert.ToString(sec); | |||||
| } | |||||
| else | |||||
| { | |||||
| time.Text += Convert.ToString(sec); | |||||
| } | |||||
| if(playerId==4) | |||||
| { | |||||
| name.Text = "🚀 Tricker's"; | |||||
| } | |||||
| else | |||||
| { | |||||
| name.Text = "🚀 Student"+ Convert.ToString(playerId)+"'s"; | |||||
| } | |||||
| if(obj.SubjectFinished< Preparation.Utility.GameData.numOfGeneratorRequiredForRepair) | |||||
| { | |||||
| status.Text = "📱: " + Convert.ToString(obj.SubjectFinished) + "\n🚪: "; | |||||
| } | |||||
| else | |||||
| { | |||||
| status.Text = "📱: Gate can be opened" + "\n🚪: "; | |||||
| } | |||||
| if (gateOpened) | if (gateOpened) | ||||
| { | { | ||||
| status.Text += "Open\n🆘: "; | status.Text += "Open\n🆘: "; | ||||
| @@ -6,10 +6,10 @@ ping -n 2 127.0.0.1 > NUL | |||||
| start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 4 --type 2 --occupation 2 | start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 4 --type 2 --occupation 2 | ||||
| start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 0 --type 1 --occupation 1 | |||||
| start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 0 --type 1 --occupation 3 | |||||
| start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 1 --type 1 --occupation 2 | |||||
| start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 1 --type 1 --occupation 3 | |||||
| start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 2 --type 1 --occupation 1 | |||||
| start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 2 --type 1 --occupation 3 | |||||
| start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 3 --type 1 --occupation 2 | |||||
| start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 3 --type 1 --occupation 3 | |||||