wip rating
This commit is contained in:
parent
7fa87480da
commit
eb629d9f3e
5 changed files with 35 additions and 0 deletions
35
BookAStar/BookAStar/Converters/RatingText.cs
Normal file
35
BookAStar/BookAStar/Converters/RatingText.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace BookAStar.Converters
|
||||
{
|
||||
class RatingText : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
var rating = (int)value;
|
||||
if (rating == 1)
|
||||
return "Disappointed!";
|
||||
if (rating == 2)
|
||||
return "Not a fan!";
|
||||
if (rating == 3)
|
||||
return "It's Ok!";
|
||||
if (rating == 4)
|
||||
return "Like it!";
|
||||
if (rating == 5)
|
||||
return "Love it!";
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
BIN
BookAStar/BookAStar/Images/Validation/error.png
Normal file
BIN
BookAStar/BookAStar/Images/Validation/error.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
BIN
BookAStar/BookAStar/Images/Validation/star_outline.png
Normal file
BIN
BookAStar/BookAStar/Images/Validation/star_outline.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
BookAStar/BookAStar/Images/Validation/star_selected.png
Normal file
BIN
BookAStar/BookAStar/Images/Validation/star_selected.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
BIN
BookAStar/BookAStar/Images/Validation/success.png
Normal file
BIN
BookAStar/BookAStar/Images/Validation/success.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
Loading…
Add table
Add a link
Reference in a new issue