Wip theme+estimate

This commit is contained in:
Paul Schneider 2016-09-25 00:44:30 +02:00
commit 6c409d6d71
12 changed files with 253 additions and 125 deletions

View file

@ -1,12 +1,12 @@

using System;
namespace BookAStar.Model.Workflow
{
public class CommandLine
{
public long Id { get; set; }
public string Comment { get; set; }
public BaseProduct Article { get; set; }
public string Description { get; set; }
public TimeSpan Duration { get; set; }
public int Count { get; set; }
public decimal UnitaryCost { get; set; }
}

View file

@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace BookAStar.Model.Workflow
{
@ -67,5 +68,32 @@ namespace BookAStar.Model.Workflow
return DataManager.Current.Contacts.LocalGet(ClientId);
}
}
public FormattedString FormattedTotal
{
get
{
OnPlatform<Font> lfs = (OnPlatform < Font >) App.Current.Resources["LargeFontSize"];
OnPlatform<Color> etc = (OnPlatform<Color>)App.Current.Resources["EmphasisTextColor"];
return new FormattedString
{
Spans = {
new Span { Text = "Total TTC: " },
new Span { Text = Total.ToString(),
ForegroundColor = etc.Android ,
FontSize = (double) lfs.Android.FontSize },
new Span { Text = "€", FontSize = (double) lfs.Android.FontSize }
}
};
}
set { }
}
public decimal Total { get
{
return Bill?.Aggregate((decimal)0, (t, l) => t + l.Count * l.UnitaryCost) ?? (decimal)0;
}
}
}
}