public RoutedIdentifiedEventArgs(RoutedEvent e, ClientIdentity clientId, object source)
     : base(e, source)
 {
     if (clientId == null)
         throw new NotSupportedException("clientId cannot be null.");
     this.ClientId = clientId;
 }
Пример #2
0
 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;
 }
Пример #6
0
 public bool HasPerson(ClientIdentity clientId)
 {
     return Persons.FirstOrDefault(x => x.ClientId.Equals(clientId)) != null;
 }
Пример #7
0
 public void RemovePerson(ClientIdentity clientId)
 {
     RemovePerson(GetPerson(clientId));
 }
Пример #8
0
 /// <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");
 }
Пример #9
0
 public void NextStateForPerson(ClientIdentity clientId)
 {
     NextStateForPerson(GetPerson(clientId));
 }
Пример #10
0
 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();
 }