Пример #1
0
 private void DrawTeachers(IEnumerable<Unit> teachers, CaseDrawer drawer)
 {
     if (teachers.Count() > 0)
     {
         var formattedText = new FormattedText(
                 teachers.Count().ToString(),
                 CultureInfo.GetCultureInfo("en-us"),
                 FlowDirection.LeftToRight,
                 new Typeface("Charlemagne STD"),
                 12,
                 Brushes.PaleVioletRed);
         drawer.Draw(formattedText, (BitmapImage)FindResource(TeacherTexture));
     }
 }
Пример #2
0
 private void DrawStudents(IEnumerable<Unit> students, CaseDrawer drawer)
 {
     if (students.Count() > 0)
     {
         var formattedText = new FormattedText(
                 students.Count().ToString(),
                 CultureInfo.GetCultureInfo("en-us"),
                 FlowDirection.LeftToRight,
                 new Typeface("Charlemagne STD"),
                 12,
                 Brushes.White);
         drawer.Draw((BitmapImage)FindResource(StudentSmallTexture), formattedText);
     }
 }
Пример #3
0
 private void DrawIron(int amount, CaseDrawer drawer)
 {
     if (amount > 0)
     {
         var formattedText = new FormattedText(
             amount.ToString(),
             CultureInfo.GetCultureInfo("en-us"),
             FlowDirection.LeftToRight,
             new Typeface("Charlemagne STD"),
             12,
             Brushes.Red);
         drawer.Draw(formattedText, (BitmapImage)FindResource(IronTexture));
     }
 }
Пример #4
0
 private void DrawIron(int amount, CaseDrawer drawer)
 {
     if (amount > 0)
     {
         drawer.Draw((BitmapImage)FindResource(IronTexture));
     }
 }