public SmartScriptBase(ISmartFactory smartFactory, ISmartDataManager smartDataManager, IMessageBoxService messageBoxService) { this.smartFactory = smartFactory; this.smartDataManager = smartDataManager; this.messageBoxService = messageBoxService; Events = new ObservableCollection <SmartEvent>(); selectionHelper = new SmartSelectionHelper(this); selectionHelper.ScriptSelectedChanged += CallScriptSelectedChanged; selectionHelper.EventChanged += (e, a, mask) => { RenumerateEvents(); EventChanged?.Invoke(e, a, mask); }; AllSmartObjectsFlat = selectionHelper.AllSmartObjectsFlat; AllActions = selectionHelper.AllActions; Events.ToStream() .Subscribe((e) => { if (e.Type == CollectionEventType.Add) { e.Item.Parent = this; } }); }
private void OnEventChanged(object sender, EventArgs e) { OnPropertyChanged(nameof(ID)); OnPropertyChanged(nameof(Name)); OnPropertyChanged(nameof(Repeat)); EventChanged?.Invoke(this, e); }
internal void Update(uint amount) { if (amount != Amount) { Amount = amount; EventChanged?.Invoke(); } }
/// <summary> /// Смотри <see cref="IDatasetItem.EventChanged"/> /// </summary> public void Set(string key, string value) { _kvQuickTable[key] = value; EventChanged?.Invoke(this); }
public void OnEventChanged() { EventChanged?.Invoke(this, EventArgs.Empty); }
// Handler protected virtual void OnEventChanged(EventEventArgs e) { EventChanged?.Invoke(this, e); }