Esempio n. 1
0
 protected virtual void OnPropertyChanged(CurrentTextureProperties properties)
 {
     if (PropertyChanged != null)
     {
         PropertyChanged(this, properties);
     }
 }
        public TextureApplicationForm()
        {
            _freeze = true;

            InitializeComponent();
            InitialiseTextureLists();

            SelectedTexturesList.HighlightedTexturesChanged += TextureListHighlightedTexturesChanged;
            RecentTexturesList.HighlightedTexturesChanged   += TextureListHighlightedTexturesChanged;

            _freeze = false;

            _currentTextureProperties = new CurrentTextureProperties();

            Oy.Subscribe <IDocument>("Document:Activated", SetDocument);
            Oy.Subscribe <Change>("MapDocument:Changed", DocumentChanged);
            Oy.Subscribe <object>("TextureTool:SelectionChanged", async x => await FaceSelectionChanged());

            // Throttle property changes so they only apply after 500 ms, this should keep the undo stack clear
            _saveChanges = Observable.FromEventPattern(x => DebouncedPropertiesChanged += x, x => DebouncedPropertiesChanged -= x)
                           .Throttle(TimeSpan.FromMilliseconds(500))
                           .Subscribe(x =>
            {
                ApplyPropertyChanges(false);
            });
        }
Esempio n. 3
0
 public TextureApplicationForm()
 {
     _freeze = true;
     InitializeComponent();
     SelectedTexturesList.SelectionChanged += TextureSelectionChanged;
     RecentTexturesList.SelectionChanged   += TextureSelectionChanged;
     _freeze = false;
     _currentTextureProperties = new CurrentTextureProperties();
 }
 public TextureApplicationForm()
 {
     _freeze = true;
     InitializeComponent();
     SelectedTexturesList.SelectionChanged += TextureSelectionChanged;
     RecentTexturesList.SelectionChanged += TextureSelectionChanged;
     _freeze = false;
     _currentTextureProperties = new CurrentTextureProperties();
 }
 protected virtual void OnPropertyChanged(CurrentTextureProperties properties)
 {
     if (PropertyChanged != null)
     {
         PropertyChanged(this, properties);
     }
 }