Exemplo n.º 1
0
        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;
                }
            });
        }
Exemplo n.º 2
0
 private void OnEventChanged(object sender, EventArgs e)
 {
     OnPropertyChanged(nameof(ID));
     OnPropertyChanged(nameof(Name));
     OnPropertyChanged(nameof(Repeat));
     EventChanged?.Invoke(this, e);
 }
Exemplo n.º 3
0
 internal void Update(uint amount)
 {
     if (amount != Amount)
     {
         Amount = amount;
         EventChanged?.Invoke();
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// Смотри <see cref="IDatasetItem.EventChanged"/>
        /// </summary>
        public void Set(string key, string value)
        {
            _kvQuickTable[key] = value;

            EventChanged?.Invoke(this);
        }
Exemplo n.º 5
0
 public void OnEventChanged()
 {
     EventChanged?.Invoke(this, EventArgs.Empty);
 }
Exemplo n.º 6
0
 // Handler
 protected virtual void OnEventChanged(EventEventArgs e)
 {
     EventChanged?.Invoke(this, e);
 }