/// <summary> /// Open/select an it in the main window. /// </summary> /// <param name="openObjectEventArgs">The event arguments.</param> public void OnOpenObject(OpenObjectEventArgs openObjectEventArgs) { // Notify the owner of this service that it should navigate to the item in the matching blotter that was selected by the user. if (this.OpenObject != null) { this.OpenObject(this, openObjectEventArgs); } }
/// <summary> /// Marshals the data needed to navigate the client application to the accepted item in the Match blotter. /// </summary> /// <param name="parameter">The thread initialization data.</param> private void AcceptNegotiationThread(Object parameter) { // Extract the parameters. Guid matchId = (Guid)parameter; // The main goal of this section of code is to construct an object that can be used to navigate the // client container to the selected item in the blotter. OpenObjectEventArgs openObjectEventArgs = null; lock (DataModel.SyncRoot) { // The 'BlotterMatchDetail' can be used to open up a Blotter in a viewer and select the Match. MatchRow matchRow = DataModel.Match.MatchKey.Find(matchId); if (matchRow != null) { openObjectEventArgs = new OpenObjectEventArgs( new Blotter(matchRow.WorkingOrderRow.BlotterRow.EntityRow), new Match[] { new Match(matchRow.MatchId) }); } } this.negotiationService.OnOpenObject(openObjectEventArgs); }