Add API key management. #10
No files matched your search
@@ -115,11 +115,15 @@ public class MainWindowViewModel : ViewModelBase {
|
|||||||
|
|
||||||
// TODO Clear the text boxes.
|
// TODO Clear the text boxes.
|
||||||
});
|
});
|
||||||
|
|
||||||
// Change TotalValue anytime SelectedCoin.TotalPrice changes.
|
// Update TotalValue anytime a coin's quantity changes.
|
||||||
// TODO: fix this. Should update when a coin within the collection is changed.
|
// Possible null reference is currently ignored - SelectedCoin will never be null.
|
||||||
// Possible null deref - how do you remove this?
|
|
||||||
this.WhenAnyValue(x => x.SelectedCoin.TotalPrice)
|
this.WhenAnyValue(x => x.SelectedCoin.TotalPrice)
|
||||||
.Subscribe(_ => TotalValue = ConnectedCoinDatabase.Collection.Sum(x => x.TotalPrice));
|
.Subscribe(_ => TotalValue = ConnectedCoinDatabase.Collection.Sum(x => x.TotalPrice));
|
||||||
|
|
||||||
|
// Update TotalValue anytime a coin is added or removed.
|
||||||
|
ConnectedCoinDatabase.Collection.CollectionChanged += (sender, args) => {
|
||||||
|
TotalValue = ConnectedCoinDatabase.Collection.Sum(x => x.TotalPrice);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
Binding="{Binding Designation}"
|
Binding="{Binding Designation}"
|
||||||
IsReadOnly="True" />
|
IsReadOnly="True" />
|
||||||
<DataGridTextColumn Header="Est. Price" Width="*"
|
<DataGridTextColumn Header="Est. Price" Width="*"
|
||||||
Binding="{Binding PriceGuideValue}"
|
Binding="{Binding PriceGuideValue, StringFormat='${0:0.00}'}"
|
||||||
IsReadOnly="True" />
|
IsReadOnly="True" />
|
||||||
<DataGridTextColumn Header="PCGS #" Width="*"
|
<DataGridTextColumn Header="PCGS #" Width="*"
|
||||||
Binding="{Binding PCGSNo}"
|
Binding="{Binding PCGSNo}"
|
||||||
@@ -77,4 +77,4 @@
|
|||||||
</DockPanel>
|
</DockPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</SplitView>
|
</SplitView>
|
||||||
</Window>
|
</Window>
|
||||||
Reference in new issue
Block a user