private void eventController_ShowBetPlacementControl(object sender, Events.ShowPlaceBetControlEventArgs e) { Clear(); m_betRequest = e.Bet; if (e.SelectionName == null) { lblRunnerName.Text = e.Bet.selectionId.ToString(); } else { lblRunnerName.Text = e.SelectionName; } }
//private void btnCancel_Click(object sender, EventArgs e) //{ // if (Visible) // { // Visible = false; // } //} /// <summary> /// Handles the ShowBetPlacementControl event of the UIEventController control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="Lignite.Controls.Events.ShowPlaceBetControlEventArgs"/> instance containing the event data.</param> private void EventController_ShowBetPlacementControl(object sender, ShowPlaceBetControlEventArgs e) { if (InvokeRequired) { Invoke(new InvokeShowBetPlacementControl(EventController_ShowBetPlacementControl), new[] {sender, e}); } if (!Visible) { Visible = true; } BringToFront(); Location = Cursor.Position; simplePlaceBetControl.BetRequest = e.Bet; }
/// <summary> /// Invokes the show bet placement control event. This notifies the listsening controls that the operator intends to place a bet on a selection. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="Lignite.Controls.Events.ShowPlaceBetControlEventArgs"/> instance containing the event data.</param> public virtual void InvokeShowBetPlacementControl(object sender, ShowPlaceBetControlEventArgs e) { var showBetPlacementControlHandler = ShowBetPlacementControl; if (showBetPlacementControlHandler != null) showBetPlacementControlHandler(sender, e); }