private void Transfer_Click(object sender, RoutedIdentifiedEventArgs e) { Person target = (Person)((IdentifiedSurfaceButton)sender).Tag; Person payer = Session.Instance.GetPerson(e.ClientId); if (!target.Equals(payer)) { Session.Instance.PayForPerson(payer, target); } }
private void ColorChange_Identified_Click(object sender, RoutedIdentifiedEventArgs e) { if (sender == btnGreen) _ellipse.Stroke = Brushes.Green; else if (sender == btnRed) _ellipse.Stroke = Brushes.Red; else if (sender == btnOrange) _ellipse.Stroke = Brushes.Orange; }
private void RemoveItem(object sender, RoutedIdentifiedEventArgs e) { if (sender is SurfaceButton) { Person p = Session.Instance.GetPerson(e.ClientId); //Console.WriteLine("Remove: " + ((SurfaceButton)sender).Tag.ToString()); Session.Instance.RemoveOneOrderedItem(p, (OrderableItem)((SurfaceButton)sender).Tag); } }
private void PersonCheckout(object sender, RoutedIdentifiedEventArgs args) { Debug.WriteLine("Person Check-out"); Session.Instance.RemovePerson(args.ClientId); }
private void PersonCheckin(object sender, RoutedIdentifiedEventArgs args) { Debug.WriteLine("Person Check-in"); if (!Session.Instance.HasPerson(args.ClientId)) { Session.Instance.AddPerson(new Person(args.ClientId)); } }
private void Checkout_Click(object sender, RoutedIdentifiedEventArgs e) { Session.Instance.NextStateForPerson(e.ClientId); e.ClientId.PersonalizedView.Remove(); }
private bool Filter(RoutedIdentifiedEventArgs e) { if (ClientId == null) return true; return e.ClientId.Equals(ClientId); }
public void IdentifiedButton_IdentifiedClick(object sender, RoutedIdentifiedEventArgs e) { this.AddTouchLogEntry(e.ClientId); }
/// <summary> /// Raise the Tunnel/Bubbling event pair /// </summary> /// <param name="target">The UIElement to raise the event pair on</param> /// <param name="e">The Event args to follow the event</param> /// <param name="bubblingEvent">The Bubble event to raise after the Tunnel event</param> private void RaiseEventPair(UIElement target, RoutedEvent bubblingEvent, RoutedIdentifiedEventArgs e) { Debug.WriteLineIf(DebugSettings.DEBUG_EVENTS, "Raising "+e.RoutedEvent+" on " + target + ". Name: " + (target is FrameworkElement ? ((FrameworkElement)target).Name : "?")); target.RaiseEvent(e); e.RoutedEvent = bubblingEvent; target.RaiseEvent(e); }