/// <summary>
        /// Constructor
        /// </summary>
        /// <param name="obj">Game object wich implement IAnimationRigidBody</param>
        public EditAnimators(IPropertyInspectable obj)
        {
            GObj = obj as SpriteObject;
            if (GObj == null)
            {
                this.Close();
                return;
            }
            InitializeComponent();
            dragMgr = new ListViewDragDropManager<AnimationRigidBody>(lstAnimations);
            dragMgr2 = new ListViewDragDropManager<AnimationRigidBody>(lstNewAnimations);
            dragMgr.ShowDragAdorner = true;
            dragMgr.ProcessDrop += dragMgr_ProcessDrop;
            dragMgr2.ShowDragAdorner = true;
            dragMgr2.ProcessDrop += dragMgr_ProcessDrop;
            Assembly assi = Assembly.GetAssembly(typeof(GFXContainer));
            var AnimatorObjects = from typ in assi.GetTypes()
                              where typeof(AnimationRigidBody).IsAssignableFrom(typ) && !typ.IsInterface
                              select (Activator.CreateInstance(typ) as AnimationRigidBody);

            lstNewAnimations.ItemsSource = AnimatorObjects;
            lstNewAnimations.SelectedIndex = 0;

            //AList = new ObservableCollection<AnimationRigidBody>(((GObj as SpriteObject).SerializableAnimations));
            AList = (GObj as SpriteObject).SerializableAnimations;
            lstAnimations.ItemsSource = AList;
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="obj">Game object wich implement IAnimationRigidBody</param>
        public EditAnimators(IPropertyInspectable obj)
        {
            GObj = obj as SpriteObject;
            if (GObj == null)
            {
                this.Close();
                return;
            }
            InitializeComponent();
            dragMgr  = new ListViewDragDropManager <AnimationRigidBody>(lstAnimations);
            dragMgr2 = new ListViewDragDropManager <AnimationRigidBody>(lstNewAnimations);
            dragMgr.ShowDragAdorner  = true;
            dragMgr.ProcessDrop     += dragMgr_ProcessDrop;
            dragMgr2.ShowDragAdorner = true;
            dragMgr2.ProcessDrop    += dragMgr_ProcessDrop;
            Assembly assi            = Assembly.GetAssembly(typeof(GFXContainer));
            var      AnimatorObjects = from typ in assi.GetTypes()
                                       where typeof(AnimationRigidBody).IsAssignableFrom(typ) && !typ.IsInterface
                                       select(Activator.CreateInstance(typ) as AnimationRigidBody);

            lstNewAnimations.ItemsSource   = AnimatorObjects;
            lstNewAnimations.SelectedIndex = 0;

            //AList = new ObservableCollection<AnimationRigidBody>(((GObj as SpriteObject).SerializableAnimations));
            AList = (GObj as SpriteObject).SerializableAnimations;
            lstAnimations.ItemsSource = AList;
        }
        private void lstAnimations_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            IPropertyInspectable obj = (lstAnimations.SelectedItem as IPropertyInspectable);
            PropertyInspect      pi  = new PropertyInspect(obj);

            pi.Show();
        }
 public PropertyInspect(IPropertyInspectable obj)
 {
     GObj = obj;
     InitializeComponent();
     PropertyGrid.ItemsSource = PList;
     ReadProperties();
     PropertyGrid.Items.Refresh();
 }
Example #5
0
 public PropertyInspect(IPropertyInspectable obj)
 {
     GObj = obj;
     InitializeComponent();
     PropertyGrid.ItemsSource = PList;
     ReadProperties();
     PropertyGrid.Items.Refresh();
 }
Example #6
0
        private void cmdViewSubObject_Click(object sender, RoutedEventArgs e)
        {
            PropertyGridItem propItem = PropertyGrid.SelectedItem as PropertyGridItem;

            if (propItem == null)
            {
                return;
            }
            IPropertyInspectable item = propItem.ValueObj as IPropertyInspectable;

            if (item == null)
            {
                return;
            }
            PropertyInspect pi = new PropertyInspect(item);

            pi.Show();
        }
        private void cmdViewSubObject_Click(object sender, RoutedEventArgs e)
        {
            PropertyGridItem propItem = PropertyGrid.SelectedItem as PropertyGridItem;

            if (propItem == null)
            {
                return;
            }
            IPropertyInspectable item = propItem.ValueObj as IPropertyInspectable;

            if (item == null)
            {
                return;
            }
            // Todo: Event für Unterobject implementieren!!
            RaiseEvent(new PropInspRoutedEventArgs(InspectSubObjectEvent, item));
            //RaiseEvent(new RoutedEventArgs(InspectSubObjectEvent));
            //PropertyInspect pi = new PropertyInspect(item);
            //pi.Show();
        }
 public PropInspRoutedEventArgs(System.Windows.RoutedEvent InspectSubObjectEvent, IPropertyInspectable SubObject)
     : base(InspectSubObjectEvent)
 {
     // TODO: Complete member initialization
     this.SubObject = SubObject;
 }
Example #9
0
 public PropInspRoutedEventArgs(System.Windows.RoutedEvent InspectSubObjectEvent, IPropertyInspectable SubObject)
     : base(InspectSubObjectEvent)
 {
     // TODO: Complete member initialization
     this.SubObject = SubObject;
 }
Example #10
0
 public ObjectWrapper(Object control)
 {
     this.Control = (IPropertyInspectable)control; // as IPropertyInspectable;
 }