public void RecievedItemInformHigherUps(DeskTopDroppedEventArgs args) { EventHandler<DeskTopDroppedEventArgs> safteyNet = OnDroppedDelegate; if (safteyNet != null && args != null) { DeskTopDroppedEventArgs arguments = args; safteyNet(this, arguments); } }
private void UserControl_Drop(object sender, DragEventArgs e) { //Strong type only follow from a listbox sender... var bean = e.Data.GetData(typeof(Create_And_Move_Zones.ViewModels.DataBeans.DesktopApplicationBean)) as Create_And_Move_Zones.ViewModels.DataBeans.DesktopApplicationBean; if (bean != null) { var eventArgs = new DeskTopDroppedEventArgs(); eventArgs.WindowName = bean.WindowName; eventArgs.ProcessIdNumber = bean.ProcessIdNumber; eventArgs.Height = this.Height; eventArgs.Width = this.Width; eventArgs.X = Canvas.GetLeft(this); eventArgs.Y = Canvas.GetTop(this); if (this.number <= short.MaxValue) { eventArgs.ZoneNumber = (short)this.number; } else { eventArgs.ZoneNumber = short.MaxValue; } // Fire my recieved Event myInvoker.RecievedItemInformHigherUps(eventArgs); } sendThisBack(); }