Exemple #1
0
        public Movement(int yaw, int pitch, int roll, int time, Maneuver host)
        {
            Host   = host;
            Yaw    = yaw;
            Pitch  = pitch;
            Roll   = roll;
            TimeMs = time;

            RemoveCommand = new DelegateCommand(delegate(object arg)
            {
                Host.RemoveCommand.Execute(this);
            });
            MoveUpCommand = new DelegateCommand(delegate(object arg)
            {
                Host.MoveUpCommand.Execute(this);
            });
            MoveDownCommand = new DelegateCommand(delegate(object arg)
            {
                Host.MoveDownCommand.Execute(this);
            });
        }
Exemple #2
0
        public Maneuver(Maneuver copy, bool isDuplicate)
        {
            Uid = uids++;

            if (isDuplicate)
            {
                Name = copy.Name + "- Copy";
            }
            else
            {
                Name = copy.Name;
            }
            Movement[] target = new Movement[copy.Movements.Count];
            copy.Movements.CopyTo(target, 0);
            this.Movements = new ObservableCollection <Movement>();
            foreach (var item in target)
            {
                item.Host = this;
                Movements.Add(item);
            }

            initCommands();
        }