Exemplo n.º 1
0
        public override void Assign(ArcEvent newValues)
        {
            base.Assign(newValues);
            ArcCamera n = newValues as ArcCamera;

            Move       = n.Move;
            Rotate     = n.Rotate;
            CameraType = n.CameraType;
            Duration   = n.Duration;
        }
Exemplo n.º 2
0
        public override void Assign(ArcEvent newValues)
        {
            base.Assign(newValues);
            ArcArc n = newValues as ArcArc;

            XStart      = n.XStart;
            XEnd        = n.XEnd;
            LineType    = n.LineType;
            YStart      = n.YStart;
            YEnd        = n.YEnd;
            Color       = n.Color;
            IsVoid      = n.IsVoid;
            TimingGroup = n.TimingGroup;
        }
        public void CopyOrCut(ArcNote[] notes, bool cut)
        {
            if (notes.Length == 0)
            {
                return;
            }
            List <ICommand> commands = new List <ICommand>();
            List <ArcNote>  newNotes = new List <ArcNote>();

            foreach (var n in notes)
            {
                ArcEvent ne = n.Clone();
                if (ne is ArcArcTap)
                {
                    if (notes.Contains((n as ArcArcTap).Arc))
                    {
                        continue;
                    }
                    commands.Add(new AddArcTapCommand((n as ArcArcTap).Arc, ne as ArcArcTap));
                    if (cut)
                    {
                        commands.Add(new RemoveArcTapCommand((n as ArcArcTap).Arc, (n as ArcArcTap)));
                    }
                }
                else
                {
                    commands.Add(new AddArcEventCommand(ne));
                    if (cut)
                    {
                        commands.Add(new RemoveArcEventCommand(n));
                    }
                    if (ne is ArcArc)
                    {
                        foreach (var at in (ne as ArcArc).ArcTaps)
                        {
                            newNotes.Add(at);
                        }
                    }
                }
                newNotes.Add(ne as ArcNote);
            }
            CommandManager.Instance.Prepare(new BatchCommand(commands.ToArray(), "复制"));
            this.notes = newNotes.ToArray();
            enable     = true;
            cursorMode = AdeCursorManager.Instance.Mode;
            AdeCursorManager.Instance.Mode = CursorMode.Horizontal;
        }
Exemplo n.º 4
0
 public AddArcEventCommand(ArcEvent note)
 {
     this.note = note;
 }
Exemplo n.º 5
0
 public RemoveArcEventCommand(ArcEvent note)
 {
     this.note = note;
 }
Exemplo n.º 6
0
 public EditArcEventCommand(ArcEvent note, ArcEvent newValues)
 {
     this.note      = note;
     oldValues      = note.Clone();
     this.newValues = newValues;
 }