AddTradeNetworksViewViewModel.cs 593 B

123456789101112131415161718192021222324
  1. using System;
  2. using System.Collections.Generic;
  3. using ReactiveUI;
  4. using Acosta.Models;
  5. using Acosta.Views;
  6. using Avalonia.Controls;
  7. namespace Acosta.ViewModels
  8. {
  9. public class AddTradeNetworksViewViewModel : ReactiveObject
  10. {
  11. SuharevaContext myC;
  12. TradeNetwork? currentTrade;
  13. public AddTradeNetworksViewViewModel(SuharevaContext myC)
  14. {
  15. this.myC = myC;
  16. CurrentTrade = new TradeNetwork();
  17. myC.Add(CurrentTrade);
  18. }
  19. public TradeNetwork? CurrentTrade { get => currentTrade; set => currentTrade = value; }
  20. }
  21. }