private void OnColorTabChanged(object sender, SelectionChangedEventArgs e)
        {
            TabControl        tabControl        = sender as TabControl;
            SceneNodeProperty sceneNodeProperty = this.editingProperty;

            if (tabControl == null || sceneNodeProperty == null || e.RemovedItems.Count <= 0)
            {
                return;
            }
            int num = this.ColorEditorTabItem.Equals(e.RemovedItems[0]) ? 0 : 1;

            if (tabControl.SelectedIndex == num)
            {
                return;
            }
            if (num == 1)
            {
                if (sceneNodeProperty == null || !sceneNodeProperty.IsResource)
                {
                    return;
                }
                sceneNodeProperty.DoSetLocalValue();
                this.OnPropertyChanged("EditingColor");
            }
            else
            {
                sceneNodeProperty.SceneNodeObjectSet.InvalidateLocalResourcesCache();
            }
        }
Esempio n. 2
0
        private void OnPropertyMarkerCommandsLocalValueCommand(object sender, ExecutedRoutedEventArgs eventArgs)
        {
            SceneNodeProperty associatedProperty = this.AssociatedProperty;

            if (associatedProperty != null)
            {
                using (WorkaroundPopup.LockOpen((DependencyObject)this))
                    associatedProperty.DoSetLocalValue();
            }
            eventArgs.Handled = true;
        }