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); }); }
public TextureApplicationForm() { _freeze = true; InitializeComponent(); SelectedTexturesList.SelectionChanged += TextureSelectionChanged; RecentTexturesList.SelectionChanged += TextureSelectionChanged; _freeze = false; _currentTextureProperties = new CurrentTextureProperties(); }