-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added userControl (ExchangeRateWatcher), used in charts screen, minor…
… UI enhancements
- Loading branch information
Showing
9 changed files
with
295 additions
and
58 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,50 @@ | ||
using LiveCharts.Wpf; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows.Media; | ||
using static WpfTest.Currency.CurrencySymbol; | ||
|
||
namespace WpfTest | ||
{ | ||
public class Currency | ||
{ | ||
public string Name { get; set; } | ||
|
||
public bool Enabled { get; set; } = true; | ||
|
||
public Color Color { get; set; } | ||
|
||
public double CurrentTrend { get; set; } = 0d; | ||
|
||
public int Volatility { get; set; } = 50; | ||
|
||
public Series ChartSerie { get; set; } | ||
|
||
public CurrencySymbol Symbol { get; set; } | ||
|
||
public string Format(double ammount) | ||
{ | ||
if (Symbol.Location == SymbolLocation.Left) | ||
{ | ||
return String.Format("{0} {1:0.00}", Symbol.Symbol, ammount); | ||
} | ||
else | ||
{ | ||
return String.Format("{0:0.00} {1}", ammount, Symbol.Symbol); | ||
} | ||
} | ||
|
||
public class CurrencySymbol | ||
{ | ||
public enum SymbolLocation | ||
{ | ||
Left, Right | ||
} | ||
public String Symbol { get; set; } | ||
public SymbolLocation Location { get; set; } = SymbolLocation.Right; | ||
} | ||
} | ||
} |
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,14 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace WpfTest | ||
{ | ||
public class CurrencyPair | ||
{ | ||
public Currency BaseCurrency { get; set; } | ||
public Currency TargetCurrency { get; set; } | ||
} | ||
} |
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,16 @@ | ||
<UserControl x:Class="WpfTest.UserControls.ExchangeRateWatcher" | ||
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:WpfTest.UserControls" | ||
mc:Ignorable="d" | ||
d:DesignHeight="50" d:DesignWidth="162" Width="162"> | ||
<Border BorderThickness="1" BorderBrush="LightGray"> | ||
<Grid> | ||
<Label Content="▲" FontSize="16" Margin="5,3,0,3" HorizontalAlignment="Left" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Name="ArrowTextBlock"/> | ||
<Label Content="76,00" FontSize="18" Margin="0,16,0,0" HorizontalAlignment="Center" Name="ValueLabel" Width="116" HorizontalContentAlignment="Center"/> | ||
<Label Content="EUR / BTC" FontSize="12" Margin="0,0,0,25" HorizontalAlignment="Center" Name="CurrenciesLabel" Width="116" HorizontalContentAlignment="Center"/> | ||
</Grid> | ||
</Border> | ||
</UserControl> |
Oops, something went wrong.