コード例 #1
0
        /// <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;
        }
コード例 #2
0
        /// <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;
        }
コード例 #3
0
        private void lstAnimations_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            IPropertyInspectable obj = (lstAnimations.SelectedItem as IPropertyInspectable);
            PropertyInspect      pi  = new PropertyInspect(obj);

            pi.Show();
        }
コード例 #4
0
 public PropertyInspect(IPropertyInspectable obj)
 {
     GObj = obj;
     InitializeComponent();
     PropertyGrid.ItemsSource = PList;
     ReadProperties();
     PropertyGrid.Items.Refresh();
 }
コード例 #5
0
 public PropertyInspect(IPropertyInspectable obj)
 {
     GObj = obj;
     InitializeComponent();
     PropertyGrid.ItemsSource = PList;
     ReadProperties();
     PropertyGrid.Items.Refresh();
 }
コード例 #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();
        }
コード例 #7
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;
            }
            // Todo: Event für Unterobject implementieren!!
            RaiseEvent(new PropInspRoutedEventArgs(InspectSubObjectEvent, item));
            //RaiseEvent(new RoutedEventArgs(InspectSubObjectEvent));
            //PropertyInspect pi = new PropertyInspect(item);
            //pi.Show();
        }
コード例 #8
0
 public PropInspRoutedEventArgs(System.Windows.RoutedEvent InspectSubObjectEvent, IPropertyInspectable SubObject)
     : base(InspectSubObjectEvent)
 {
     // TODO: Complete member initialization
     this.SubObject = SubObject;
 }
コード例 #9
0
 public PropInspRoutedEventArgs(System.Windows.RoutedEvent InspectSubObjectEvent, IPropertyInspectable SubObject)
     : base(InspectSubObjectEvent)
 {
     // TODO: Complete member initialization
     this.SubObject = SubObject;
 }
コード例 #10
0
ファイル: Helper.cs プロジェクト: apmKrauser/ProjectGame
 public ObjectWrapper(Object control)
 {
     this.Control = (IPropertyInspectable)control; // as IPropertyInspectable;
 }