Esempio n. 1
0
        private bool dragCommandCanExecute(Person obj)
        {
            if (obj == null)
            {
                this.DragDropMessage = "you cannot drop here";
                return false;
            }

            bool result = obj.Age >= 18;

            if (!result)
            {
                this.DragDropMessage = "you cannot drag";
            }

            return result;
        }
Esempio n. 2
0
        public Person Clone()
        {
            Person p = new Person(this.FirstName, this.LastName, this.Age);
            p.Moved = this.Moved;

            return p;
        }
Esempio n. 3
0
 private void dragCommandExecute(Person obj)
 {
     if (obj == null) return;
     this.CurrentPerson = obj;
     this.DragDropMessage = string.Format("Dragging '{0}'", this.CurrentPerson.ToString());
 }