You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

StatusBarOfCircumstance.xaml.cs 2.2 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Shapes;
  14. using Protobuf;
  15. namespace Client
  16. {
  17. /// <summary>
  18. /// StatusBarOfCircumstance.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class StatusBarOfCircumstance : UserControl
  21. {
  22. public StatusBarOfCircumstance(Grid parent, int Row, int Column)
  23. {
  24. InitializeComponent();
  25. parent.Children.Add(this);
  26. Grid.SetColumn(this, Column);
  27. Grid.SetColumnSpan(this, 2);
  28. Grid.SetRow(this, Row);
  29. Grid.SetRowSpan(this, 2);
  30. }
  31. public void SetFontSize(double fontsize)
  32. {
  33. time.FontSize = scoresofstudents.FontSize = scoresoftrickers.FontSize = status.FontSize = prop.FontSize = fontsize;
  34. }
  35. public void SetValue(MessageOfAll obj)
  36. {
  37. time.Text = "Time⏳: " + Convert.ToString(obj.GameTime);
  38. status.Text = "📱: " + Convert.ToString(obj.SubjectLeft) + "\n🚪: ";
  39. if(obj.GateOpened)
  40. {
  41. status.Text += "Open\n🆘: ";
  42. }
  43. else
  44. {
  45. status.Text += "Close\n🆘: ";
  46. }
  47. if(obj.HiddenGateRefreshed)
  48. {
  49. if(obj.HiddenGateOpened)
  50. {
  51. status.Text += "Open\n🏃: ";
  52. }
  53. else
  54. {
  55. status.Text += "Refreshed\n🏃: ";
  56. }
  57. }
  58. else
  59. {
  60. status.Text += "Unrefreshed\n🏃: ";
  61. }
  62. status.Text += Convert.ToString(obj.StudentGraduated)+ "\n⚰️: ";
  63. status.Text += Convert.ToString(obj.StudentQuited);
  64. scoresofstudents.Text = "Scores of Survivors: " + Convert.ToString(obj.StudentScore);
  65. scoresoftrickers.Text = "Scores of Hunters: " + Convert.ToString(obj.TrickerScore);
  66. }
  67. }
  68. }