Пример #1
0
        private void Description_DragDrop(DragEventArgs args)
        {
            if (!args.Data.GetDataPresent(typeof(WriteableBitmap)))
            {
                return;
            }
            var data = args.Data.GetData(typeof(WriteableBitmap)) as BitmapSource;

            if (data == null)
            {
                return;
            }
            var fe = args.OriginalSource as FrameworkElement;

            if (fe == null)
            {
                return;
            }
            var target = fe.DataContext as ObjectGroup;

            if (target == null)
            {
                return;
            }

            var obj = new MovieObject();
            var img = new MovieObjectImage(data)
            {
                Visible = true
            };

            obj.Images.Add(img);
            var currentMsg = Repository.Get(typeof(SelectedMessage)) as SelectedMessage;

            currentMsg.message.AddCommand(new MovieCommand.AddObject(img));

            var objList = Repository.Get(typeof(MovieObjectList)) as MovieObjectList;

            objList.Add(obj);
            MovieObjects.Add(obj);
        }
Пример #2
0
 public AddObject(MovieObjectImage obj)
 {
     _obj = obj;
 }
Пример #3
0
 public RemoveObject(MovieObjectImage obj)
 {
     _obj = obj;
 }
Пример #4
0
 public RotateObject(MovieObjectImage obj, int angle)
 {
     _obj   = obj;
     _angle = angle;
 }