public MatchedBetOrderListViewModel(BetfairService service, string marketId) { this.service = service; this.marketId = marketId; GetOrdersForMarket(); }
public MarketSelectorViewModel(BetfairService service, MarketSettings settings) { this.settings = settings; this.service = service; GetMeetings(); }
public AccountSummaryViewModel(BetfairService service, BetfairAccount account, int refreshInterval) { this.service = service; this.account = account; this.refreshInterval = refreshInterval; SetupTimer(); this.timer.Start(); }
/// <summary> /// Initializes a new instance of the <see cref="MainWindowViewModel"/> class. /// </summary> /// <param name="settings"></param> public MainWindowViewModel(AssistantSettings settings) { this.settings = settings; this.service = new BetfairService(); RegisterMessages(); this.AccountView = new SessionLoginViewModel(service, settings.ApplicationSettings.Key); }
public MatchedBetRaceViewModel(BetfairService service, IRace race) { this.race = race; this.service = service; CreateRunners(); SetupTimer(); this.timer.Start(); }
public MatchedBetActionViewModel(BetfairService service, string marketId, double currentFunds) { this.service = service; this.marketId = marketId; this.currentFunds = currentFunds; this.safetyMode = true; Messenger.Default.Register<MatchedBetCalculatedMessage>(this, MatchedBetCalculated); Messenger.Default.Register<AccountBalanceChangedMessage>(this, AccountBalanceChanged); Messenger.Default.Register<MatchedBetTargetChangedMessage>(this, MatchedBetTargetChanged); Messenger.Default.Register<MatchedBetTargetLayAmountAvailableChangedMessage>(this, TargetDetailsChanged); SetStatus(); }
public MatchedBetViewModel(BetfairService service, IRace race, double currentFunds) { this.service = service; this.race = race; this.matchedBetCalculator = new MatchedBetCalculatorViewModel(); this.matchedBetRace = new MatchedBetRaceViewModel(service, race); this.orders = new MatchedBetOrderListViewModel(service, race.MarketId); this.CurrentRaceView = this.matchedBetRace; this.ShowRunners = true; this.ShowOrders = false; this.action = new MatchedBetActionViewModel(service, race.MarketId, currentFunds); }
private void Close() { Console.WriteLine("Closing Application"); KillTimer(); DisposeViewModel(this.MainView); this.MainView = null; DisposeViewModel(this.AccountView); this.AccountView = null; if (this.service != null) { this.service.Close(); this.service.Dispose(); this.service = null; } }
public SessionLoginViewModel(BetfairService service, string applicationKey) { this.service = service; this.applicationKey = applicationKey; }