public RoutedIdentifiedEventArgs(RoutedEvent e, ClientIdentity clientId, object source) : base(e, source) { if (clientId == null) throw new NotSupportedException("clientId cannot be null."); this.ClientId = clientId; }
public Person GetPerson(ClientIdentity clientId) { Person p = Persons.FirstOrDefault(x => x.ClientId.Equals(clientId)); if (p == null) { p = new Person(clientId); Persons.Add(p); } return p; }
private void RemoveIdentityHovering(ClientIdentity id) { lock (_HoveringClientIdentities) { if (_HoveringClientIdentities.ContainsKey(id)) { _HoveringClientIdentities[id].Remove(); _HoveringClientIdentities.Remove(id); } } }
private void AddIdentityHovering(ClientIdentity id) { lock (_HoveringClientIdentities) { ColorPickerPersonalizedView cp = new ColorPickerPersonalizedView(MyElip); //cp.Width = cv.GetHitTestRectangleGeometry().Bounds.Width; //cp.Height = cv.GetHitTestRectangleGeometry().Bounds.Height; id.PersonalizedView.Add(cp); if (!_HoveringClientIdentities.ContainsKey(id)) _HoveringClientIdentities.Add(id, id.PersonalizedView); } }
public RoutedIdentifiedTouchEventArgs(RoutedEvent e, ClientIdentity clientId, object source, System.Windows.Point point) : base(e, clientId, source) { this.Point = point; }
public bool HasPerson(ClientIdentity clientId) { return Persons.FirstOrDefault(x => x.ClientId.Equals(clientId)) != null; }
public void RemovePerson(ClientIdentity clientId) { RemovePerson(GetPerson(clientId)); }
/// <summary> /// Used when a person take share paying for an item /// </summary> //public void TakeShareInOrderLine(Person shareTaker, OrderLine orderLine, float share) //{ // if (shareTaker.State == States.Checkout && orderLine.Owner.State == States.Checkout) // { // orderLine.AddPayer(shareTaker, share); // } //} public void Pay(ClientIdentity clientId) { Person p = GetPerson(clientId); OrderLines.RemoveAll(x => x.Owner.Equals(p)); p.OnPropertyChanged("OrderLines"); p.OnPropertyChanged("Status"); }
public void NextStateForPerson(ClientIdentity clientId) { NextStateForPerson(GetPerson(clientId)); }
public Person(ClientIdentity clientId) { this.ClientId = clientId; State = States.Ordering; }
public RoutedIdentifiedHoverEventArgs(RoutedEvent e, ClientIdentity clientId, object source, RectangleGeometry rectangle) : base(e, clientId, source) { this.HoveringRectangle = rectangle; }
private void AddTouchLogEntry(ClientIdentity id) { TouchCounter++; lock (log) { if (log.Count == LOG_MAX_LENGTH) log.Dequeue(); log.Enqueue(String.Format("{0}: {1}", TouchCounter, (id == null ? "[Unknown]" : id.Credentials.UserId))); } txtLog.Text = GetTouchLogAsString(); }