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); }
public AddObject(MovieObjectImage obj) { _obj = obj; }
public RemoveObject(MovieObjectImage obj) { _obj = obj; }
public RotateObject(MovieObjectImage obj, int angle) { _obj = obj; _angle = angle; }