[WIP] Show coin status in CoinList
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinListView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/CoinListView.xaml
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<UserControl.Resources>
<converters:PrivacyLevelValueConverter x:Key="PrivacyLevelValueConverter" />
+ <converters:CoinStatusStringConverter x:Key="CoinStatusStringConverter" />
+ <converters:CoinStatusColorConverter x:Key="CoinStatusColorConverter" />
</UserControl.Resources>
<UserControl.Styles>
<Style Selector="TextBlock">
</UserControl.Styles>
<DockPanel LastChildFill="True">
- <Grid ColumnDefinitions="30,30,100,100,Auto" Margin="35 0" DockPanel.Dock="Top">
+ <Grid ColumnDefinitions="30,30,100,100,100,Auto" Margin="35 0" DockPanel.Dock="Top">
<TextBlock Text="" />
<TextBlock Text="" Grid.Column="1" />
<TextBlock Text="Amount (BTC)" Grid.Column="2" />
<TextBlock Text="Privacy" Grid.Column="3" Margin="20 0 0 0" />
- <TextBlock Text="History" Grid.Column="4" />
+ <TextBlock Text="Status" Grid.Column="4" />
+ <TextBlock Text="History" Grid.Column="5" />
</Grid>
<ListBox Items="{Binding Coins}" VirtualizationMode="None">
<ListBox.ItemTemplate>
</Grid>
</StackPanel>
</Expander>
- <Grid ColumnDefinitions="30,30,100,100,Auto" Margin="30 0 0 0" VerticalAlignment="Top">
+ <Grid ColumnDefinitions="30,30,100,100,100,Auto" Margin="30 0 0 0" VerticalAlignment="Top">
<CheckBox HorizontalContentAlignment="Left" IsChecked="{Binding IsSelected}" />
<Path HorizontalAlignment="Left" Grid.Column="1" Data="F1 M 23.7501,33.25L 34.8334,44.3333L 52.2499,22.1668L 56.9999,26.9168L 34.8334,53.8333L 19.0001,38L 23.7501,33.25 Z" Fill="#22B14C" Height="16" Width="16" IsVisible="{Binding Confirmed}" Stretch="Fill">
<ToolTip.Tip>
ToolTip.Tip="{Binding ToolTip}">
<DrawingPresenter Drawing="{Binding Icon}" Margin="0 0 25 0" />
</Panel>
- <controls:ExtendedTextBox Classes="selectableTextBlock" Grid.Column="4" Text="{Binding History}" />
- <TextBlock Text="" Grid.Column="5" />
+ <controls:ExtendedTextBox Classes="selectableTextBlock" Grid.Column="4" Text="{Binding Status, Converter={StaticResource CoinStatusStringConverter}}" Background="{Binding Status, Converter={StaticResource CoinStatusColorConverter}}"/>
+ <controls:ExtendedTextBox Classes="selectableTextBlock" Grid.Column="5" Text="{Binding History}" />
+ <TextBlock Text="" Grid.Column="6" />
</Grid>
</Grid>
</DataTemplate>

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinViewModel.cs
@@ -10,9 +10,14 @@ using System.Linq;
namespace WalletWasabi.Gui.Controls.WalletExplorer
{
+ public enum CoinStatusEnum
+ {
+ None,
+ }
public class CoinViewModel : ViewModelBase
{
private bool _isSelected;
+ private CoinStatusEnum _status;
public CoinViewModel(SmartCoin model)
{
@@ -76,5 +81,13 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
public string InCoinJoin => Model.CoinJoinInProgress ? "Yes" : "No";
public string History => string.Join(", ", Global.WalletService.GetHistory(Model, Enumerable.Empty<SmartCoin>()).Select(x => x.Label).Distinct());
+
+ public CoinStatusEnum Status
+ {
+ get => _status;
+ set { this.RaiseAndSetIfChanged(ref _status, value); }
+ }
+
+
}
}

[WIP] Show coin status in CoinList