public ExecutionViewModel(FixConnectionSystem fixConnectionSystem) { _fixConnectionSystem = fixConnectionSystem; Executions = new ObservableCollection <ExecutionRecord>(); _fixConnectionSystem.Fix42ExecReportEvent += new Action <QuickFix.FIX42.ExecutionReport>(HandleExecutionReport); }
//public ICommand ConnectCommand { get; set; } //public ICommand DisconnectCommand { get; set; } public ConnectionViewModel(FixConnectionSystem fixConnectionSystem, FixConnectionEvent fxce) { _fixConnectionSystem = fixConnectionSystem; _fxce = fxce; // initialize SessionString HashSet <QuickFix.SessionID> sidset = _fixConnectionSystem.MySessionSettings.GetSessions(); Trace.WriteLine("Sessions count in config: " + sidset.Count); //foreach (QuickFix.SessionID sid in sidset) // Trace.WriteLine("-> " + sid.ToString()); this.SessionString = sidset.First().SenderCompID.ToString() + " " + sidset.First().TargetCompID.ToString(); //this.PriceSessionString = sidset.ElementAt(1).TargetCompID.ToString(); // command definitions //ConnectCommand = new RelayCommand(Connect); //DisconnectCommand = new RelayCommand(Disconnect); fixConnectionSystem.OrderSessionLogonEvent += new Action(delegate() { IsOrderConnected = true; _fxce.isConnectedToFIXTTServer(); }); fixConnectionSystem.OrderSessionLogoutEvent += new Action(delegate() { IsOrderConnected = false; _fxce.isDisconnectedFromFIXTTServer(); }); fixConnectionSystem.PriceSessionLogonEvent += new Action(delegate() { IsPriceConnected = true; }); fixConnectionSystem.PriceSessionLogoutEvent += new Action(delegate() { IsPriceConnected = false; }); }
public FIXMessageViewModel(FixConnectionSystem fixConnectionSystem) { this._fixConnectionSystem = fixConnectionSystem; Messages = new ObservableCollection <MessageRecord>(); _fixConnectionSystem.MessageEvent += new Action <QuickFix.Message, bool>(HandleMessage); }
public OrderViewModel(FixConnectionSetupAndMethods fixConnSetupAndMethods, FixConnectionSystem fixConnectionSystem) { this._fixConnectionSystem = fixConnectionSystem; Orders = new ObservableCollection <OrderRecord>(); _fixConnectionSystem.Fix42ExecReportEvent += new Action <QuickFix.FIX42.ExecutionReport>(HandleExecutionReport); fixConnSetupAndMethods.OrderEvent += new Action <QuickFix.FIX42.NewOrderSingle>(displayOrder); }