Rename items
RENAME
WalletWasabi.Fluent/ViewModels/CoinControl/Core/CoinItem.cs
WalletWasabi.Fluent/ViewModels/CoinControl/Core/CoinCoinControlItemViewModel.cs
@@ -4,9 +4,9 @@ using WalletWasabi.Blockchain.TransactionOutputs;
namespace WalletWasabi.Fluent.ViewModels.CoinControl.Core;
-internal class CoinItem : ItemBase
+internal class CoinCoinControlItemViewModel : CoinControlItemViewModelBase
{
- public CoinItem(SmartCoin smartCoin)
+ public CoinCoinControlItemViewModel(SmartCoin smartCoin)
{
Amount = smartCoin.Amount;
IsConfirmed = smartCoin.Confirmed;

RENAME
WalletWasabi.Fluent/ViewModels/CoinControl/Core/ItemBase.cs
WalletWasabi.Fluent/ViewModels/CoinControl/Core/CoinControlItemViewModelBase.cs
@@ -5,11 +5,11 @@ using WalletWasabi.Fluent.Helpers;
namespace WalletWasabi.Fluent.ViewModels.CoinControl.Core;
-public abstract class ItemBase
+public abstract class CoinControlItemViewModelBase
{
- protected ItemBase() : this(new List<ItemBase>()) { }
+ protected CoinControlItemViewModelBase() : this(new List<CoinControlItemViewModelBase>()) { }
- protected ItemBase(IReadOnlyCollection<ItemBase> children)
+ protected CoinControlItemViewModelBase(IReadOnlyCollection<CoinControlItemViewModelBase> children)
{
Children = children;
}
@@ -20,7 +20,7 @@ public abstract class ItemBase
public bool IsNonPrivate => !IsSemiPrivate && !IsPrivate;
- public IReadOnlyCollection<ItemBase> Children { get; }
+ public IReadOnlyCollection<CoinControlItemViewModelBase> Children { get; }
public abstract bool IsConfirmed { get; }

RENAME
WalletWasabi.Fluent/ViewModels/CoinControl/Core/PocketItem.cs
WalletWasabi.Fluent/ViewModels/CoinControl/Core/PocketCoinControlItemViewModel.cs
@@ -5,9 +5,9 @@ using WalletWasabi.Fluent.Models;
namespace WalletWasabi.Fluent.ViewModels.CoinControl.Core;
-internal class PocketItem : ItemBase
+internal class PocketCoinControlItemViewModel : CoinControlItemViewModelBase
{
- public PocketItem(Pocket pocket) : base(pocket.Coins.OrderByDescending(x => x.Amount).Select(coin => new CoinItem(coin)).ToList())
+ public PocketCoinControlItemViewModel(Pocket pocket) : base(pocket.Coins.OrderByDescending(x => x.Amount).Select(coin => new CoinCoinControlItemViewModel(coin)).ToList())
{
Amount = pocket.Amount;
IsConfirmed = pocket.Coins.All(x => x.Confirmed);

MODIFY
WalletWasabi.Fluent/ViewModels/CoinControl/SelectCoinsDialogViewModel.cs
WalletWasabi.Fluent/ViewModels/CoinControl/SelectCoinsDialogViewModel.cs
@@ -31,7 +31,7 @@ public partial class SelectCoinsDialogViewModel : DialogViewModelBase<IEnumerabl
var pockets = walletViewModel.Wallet.GetPockets();
var items = CreateItems(pockets);
- Source = new HierarchicalTreeDataGridSource<ItemBase>(items)
+ Source = new HierarchicalTreeDataGridSource<CoinControlItemViewModelBase>(items)
{
Columns =
{
@@ -50,70 +50,70 @@ public partial class SelectCoinsDialogViewModel : DialogViewModelBase<IEnumerabl
EnableBack = true;
}
- public HierarchicalTreeDataGridSource<ItemBase> Source { get; }
+ public HierarchicalTreeDataGridSource<CoinControlItemViewModelBase> Source { get; }
- private static IColumn<ItemBase> ChildrenColumn()
+ private static IColumn<CoinControlItemViewModelBase> ChildrenColumn()
{
- return new HierarchicalExpanderColumn<ItemBase>(
- new PrivacyTextColumn<ItemBase>("", _ => "", GridLength.Auto, null),
+ return new HierarchicalExpanderColumn<CoinControlItemViewModelBase>(
+ new PrivacyTextColumn<CoinControlItemViewModelBase>("", _ => "", GridLength.Auto, null),
group => group.Children,
node => node.Children.Count > 1,
node => node.IsExpanded);
}
- private static IColumn<ItemBase> AmountColumn()
+ private static IColumn<CoinControlItemViewModelBase> AmountColumn()
{
- return new PrivacyTextColumn<ItemBase>(
+ return new PrivacyTextColumn<CoinControlItemViewModelBase>(
"Amount",
node => node.Amount.ToFormattedString(),
GridLength.Auto,
- new ColumnOptions<ItemBase>
+ new ColumnOptions<CoinControlItemViewModelBase>
{
- CompareAscending = SortAscending<ItemBase, Money>(x => x.Amount),
- CompareDescending = SortDescending<ItemBase, Money>(x => x.Amount)
+ CompareAscending = SortAscending<CoinControlItemViewModelBase, Money>(x => x.Amount),
+ CompareDescending = SortDescending<CoinControlItemViewModelBase, Money>(x => x.Amount)
});
}
- private static IColumn<ItemBase> IndicatorsColumn()
+ private static IColumn<CoinControlItemViewModelBase> IndicatorsColumn()
{
- return new TemplateColumn<ItemBase>(
+ return new TemplateColumn<CoinControlItemViewModelBase>(
"",
- new FuncDataTemplate<ItemBase>((_, _) => new IndicatorsCellView(), true),
+ new FuncDataTemplate<CoinControlItemViewModelBase>((_, _) => new IndicatorsCellView(), true),
GridLength.Auto,
- new ColumnOptions<ItemBase>
+ new ColumnOptions<CoinControlItemViewModelBase>
{
- CompareAscending = SortAscending<ItemBase, int>(GetIndicatorPriority),
- CompareDescending = SortDescending<ItemBase, int>(GetIndicatorPriority)
+ CompareAscending = SortAscending<CoinControlItemViewModelBase, int>(GetIndicatorPriority),
+ CompareDescending = SortDescending<CoinControlItemViewModelBase, int>(GetIndicatorPriority)
});
}
- private static IColumn<ItemBase> PrivacyScore()
+ private static IColumn<CoinControlItemViewModelBase> PrivacyScore()
{
- return new PrivacyTextColumn<ItemBase>(
+ return new PrivacyTextColumn<CoinControlItemViewModelBase>(
new AnonymityScoreHeaderViewModel(),
node => node.AnonymityScore.ToString(),
GridLength.Auto,
- new TextColumnOptions<ItemBase>
+ new TextColumnOptions<CoinControlItemViewModelBase>
{
- CompareAscending = SortAscending<ItemBase, int?>(b => b.AnonymityScore),
- CompareDescending = SortDescending<ItemBase, int?>(b => b.AnonymityScore)
+ CompareAscending = SortAscending<CoinControlItemViewModelBase, int?>(b => b.AnonymityScore),
+ CompareDescending = SortDescending<CoinControlItemViewModelBase, int?>(b => b.AnonymityScore)
});
}
- private static IColumn<ItemBase> PocketColumn()
+ private static IColumn<CoinControlItemViewModelBase> PocketColumn()
{
- return new TemplateColumn<ItemBase>(
+ return new TemplateColumn<CoinControlItemViewModelBase>(
"Pocket",
- new FuncDataTemplate<ItemBase>((_, _) => new LabelsCellView(), true),
+ new FuncDataTemplate<CoinControlItemViewModelBase>((_, _) => new LabelsCellView(), true),
GridLength.Star,
- new ColumnOptions<ItemBase>
+ new ColumnOptions<CoinControlItemViewModelBase>
{
- CompareAscending = SortAscending<ItemBase, int>(GetLabelPriority),
- CompareDescending = SortDescending<ItemBase, int>(GetLabelPriority)
+ CompareAscending = SortAscending<CoinControlItemViewModelBase, int>(GetLabelPriority),
+ CompareDescending = SortDescending<CoinControlItemViewModelBase, int>(GetLabelPriority)
});
}
- private static int GetLabelPriority(ItemBase coin)
+ private static int GetLabelPriority(CoinControlItemViewModelBase coin)
{
if (coin.Labels == CoinPocketHelper.PrivateFundsText)
{
@@ -128,7 +128,7 @@ public partial class SelectCoinsDialogViewModel : DialogViewModelBase<IEnumerabl
return 1;
}
- private static int GetIndicatorPriority(ItemBase x)
+ private static int GetIndicatorPriority(CoinControlItemViewModelBase x)
{
if (x.IsCoinjoining)
{
@@ -148,10 +148,10 @@ public partial class SelectCoinsDialogViewModel : DialogViewModelBase<IEnumerabl
return 0;
}
- private static IReadOnlyCollection<ItemBase> CreateItems(IEnumerable<Pocket> pockets)
+ private static IReadOnlyCollection<CoinControlItemViewModelBase> CreateItems(IEnumerable<Pocket> pockets)
{
return pockets
- .Select(pocket => new PocketItem(pocket))
+ .Select(pocket => new PocketCoinControlItemViewModel(pocket))
.ToList();
}

MODIFY
WalletWasabi.Fluent/Views/CoinControl/Core/Cells/IndicatorsCellView.axaml
WalletWasabi.Fluent/Views/CoinControl/Core/Cells/IndicatorsCellView.axaml
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:core="clr-namespace:WalletWasabi.Fluent.ViewModels.CoinControl.Core"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
- x:DataType="core:ItemBase"
+ x:DataType="core:CoinControlItemViewModelBase"
x:CompileBindings="True"
x:Class="WalletWasabi.Fluent.Views.CoinControl.Core.Cells.IndicatorsCellView">

MODIFY
WalletWasabi.Fluent/Views/CoinControl/Core/Cells/LabelsCellView.axaml
WalletWasabi.Fluent/Views/CoinControl/Core/Cells/LabelsCellView.axaml
xmlns:core="clr-namespace:WalletWasabi.Fluent.ViewModels.CoinControl.Core"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="WalletWasabi.Fluent.Views.CoinControl.Core.Cells.LabelsCellView"
- x:DataType="core:ItemBase"
+ x:DataType="core:CoinControlItemViewModelBase"
x:CompileBindings="True">
<UserControl.Resources>

Rename items