-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
208 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
//----------------------------------------------------------------------- | ||
// <copyright file="RemainingMonsterViewModel.cs" company="Wohs"> | ||
// Missing Copyright information from a valid stylecop.json file. | ||
// </copyright> | ||
//----------------------------------------------------------------------- | ||
|
||
namespace Lurker.UI.ViewModels | ||
{ | ||
using Lurker.Patreon.Events; | ||
|
||
public class RemainingMonsterViewModel : Caliburn.Micro.PropertyChangedBase | ||
{ | ||
#region Fields | ||
|
||
private MonstersRemainEvent _monsterEvent; | ||
|
||
#endregion | ||
|
||
#region Constructors | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="RemainingMonsterViewModel"/> class. | ||
/// </summary> | ||
/// <param name="monsterEvent">The monster event.</param> | ||
public RemainingMonsterViewModel(MonstersRemainEvent monsterEvent) | ||
{ | ||
this._monsterEvent = monsterEvent; | ||
} | ||
|
||
#endregion | ||
|
||
#region Properties | ||
|
||
/// <summary> | ||
/// Gets or sets the monster remaining. | ||
/// </summary> | ||
public int MonsterCount => this._monsterEvent.MonsterCount; | ||
|
||
/// <summary> | ||
/// Gets a value indicating whether [less than50]. | ||
/// </summary> | ||
public bool LessThan50 => this.MonsterCount < 50; | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<UserControl x:Class="Lurker.UI.Views.RemainingMonsterView" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:Lurker.UI.Views" | ||
mc:Ignorable="d" | ||
d:DesignHeight="450" d:DesignWidth="800"> | ||
<Grid ShowGridLines="True"> | ||
<Ellipse Height="80" Width="80"> | ||
<Ellipse.Style> | ||
<Style TargetType="Ellipse"> | ||
<Setter Property="Fill" Value="#972e1b"/> | ||
<Style.Triggers> | ||
<DataTrigger Binding="{Binding LessThan50}" Value="true"> | ||
<Setter Property="Fill" Value="#3ace3a"/> | ||
</DataTrigger> | ||
</Style.Triggers> | ||
</Style> | ||
</Ellipse.Style> | ||
</Ellipse> | ||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="28" Foreground="White" Text="{Binding MonsterCount}"/> | ||
</Grid> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//----------------------------------------------------------------------- | ||
// <copyright file="RemainingMonsterView.xaml.cs" company="Wohs"> | ||
// Missing Copyright information from a valid stylecop.json file. | ||
// </copyright> | ||
//----------------------------------------------------------------------- | ||
|
||
namespace Lurker.UI.Views | ||
{ | ||
using System.Windows.Controls; | ||
|
||
/// <summary> | ||
/// Interaction logic for RemainingMonsterView.xaml | ||
/// </summary> | ||
public partial class RemainingMonsterView : UserControl | ||
{ | ||
public RemainingMonsterView() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.