private void OnPropertyChanged(PropertyChangedEvent @event) { //NOTE: the scrollbar will update automatically whenever ServerEntity is updated. if (@event.PropertyName == "Tiles") { ServerEntity.Tiles = (Collection <Tile>)@event.Value; UpdateTileViews(); UpdateSize(); return; } if (@event.PropertyName == "Selected") { ServerEntity.Selected = (bool)@event.Value; UpdateBorder(); } if (@event.PropertyName == "TopLeftPresentationImageIndex") { ServerEntity.TopLeftPresentationImageIndex = (int)@event.Value; } if (@event.PropertyName == "ImageCount") { var count = (int)@event.Value; if (ServerEntity.ImageCount != count) { ServerEntity.ImageCount = count; // Note: Because the scrollbar observes PropertyChanged event on the ServerEntity, its visibility will be updated automatically in ImageBoxScrollbarView // When UpdateLayout() is called in UpdateSize(), the size of the TileContainer will be updated accordingly. UpdateSize(); } } }
public void MapPropertyChangedEvent() { var e = new PropertyChangedEvent { ChatroomId = 1, OperatorId = 2, Key = "Name", Value = "New Chatroom", }; var m = ChatroomEventMapper.Map(e); Assert.Equal(new ChatMessage { TimeUnixMs = e.Time.ToUnixTimeMilliseconds(), SenderId = 0, ChatroomId = 1, Content = new Content { SetPeoperty = new Content.Types.SetProperty { Key = "Name", Value = "New Chatroom" } } }, m); }
public void Update(PropertyChangedEvent e) { if (e.PropertyName.Equals("Available")) { _actionItem.Available = (bool)e.Value; Visibility = _actionItem.DesiredVisiblility; } else if (e.PropertyName.Equals("Visible")) { _actionItem.Visible = (bool)e.Value; Visibility = _actionItem.DesiredVisiblility; } else if (e.PropertyName.Equals("Enabled")) { _actionItem.Enabled = (bool)e.Value; ButtonComponent.IsEnabled = _actionItem.Enabled; } else if (e.PropertyName.Equals("IconSet")) { _actionItem.IconSet = e.Value as WebIconSet; SetIcon(); } else if (e.PropertyName.Equals("ToolTip")) { _actionItem.ToolTip = e.Value as string; ToolTipService.SetToolTip(LayoutDropDownButton, _actionItem.ToolTip); } else if (e.PropertyName.Equals("Label")) { _actionItem.Label = e.Value as string; } UpdateLayout(); }
/// <summary> /// Creates a new <see cref="Subscriber"/> for the specified source object. /// </summary> /// <typeparam name="T">The type of the source object.</typeparam> /// <param name="source">The source object.</param> /// <returns>A <see cref="Subscriber"/> for the <paramref name="source"/>.</returns> private Subscriber CreateObserve <T>(T source) where T : class, INotifyPropertyChanged { Subscriber subscriber = Subscriber.Create(source, this); PropertyChangedEvent.AddListener(source, subscriber); return(subscriber); }
private void BindableObject_PropertyChanged(object sender, PropertyChangedEventArgs e) { PropertyChangedEvent changedEvent = new PropertyChangedEvent( propertyName: e.PropertyName, value: GetPropertyValue(e.PropertyName), timestamp: DateTime.UtcNow); this.Changes.Add(changedEvent); }
protected override void SetScoreLabel(WavesGame data, WavesGame group, PropertyChangedEvent<System.Int32> value) { var handler = new SetScoreLabel(); handler.System = this; handler.Event = data; handler.Group = group; handler.OldValue = value.PreviousValue; handler.NewValue = value.CurrentValue; handler.Execute(); }
public CompositePathGetter ( IEnumerable <IBindingPathLink <object> > pathLinks, PropertyType defaultValue ) { _pathLinks = pathLinks; _defaultValue = defaultValue; if (pathLinks.IsNullOrEmpty()) { PropGetters.Add(new SimplePropGetter <object>()); return; } IObjWithPropGetter <object> previousPropGetter = null; foreach (var pathLink in _pathLinks) { IObjWithPropGetter <object> propGetter = pathLink.CreateGetter(); PropGetters.Add(propGetter); if (previousPropGetter != null) { IObjWithPropGetter <object> thePreviousPropGetter = previousPropGetter; previousPropGetter.PropertyChangedEvent += () => { propGetter.TheObj = thePreviousPropGetter.GetPropValue(); }; } previousPropGetter = propGetter; } previousPropGetter.PropertyChangedEvent += () => { if (this.PropertyChangedEvent == null) { return; } if (!LastPropGetter.HasObj) { _cachedValue.TheValue = _defaultValue; } else { _cachedValue.TheValue = (PropertyType)LastPropGetter.GetPropValue(); } PropertyChangedEvent?.Invoke(); }; }
protected virtual void SetScoreLabel(WavesGame data, WavesGame group, PropertyChangedEvent <System.Int32> value) { var handler = new SetScoreLabel(); handler.System = this; handler.Event = data; handler.Group = group; handler.OldValue = value.PreviousValue; handler.NewValue = value.CurrentValue; StartCoroutine(handler.Execute()); }
protected virtual void UpdateClickCount(ClickCount data, ClickCount group, PropertyChangedEvent <System.Int32> value) { var handler = new UpdateClickCount(); handler.System = this; handler.Event = data; handler.Group = group; handler.OldValue = value.PreviousValue; handler.NewValue = value.CurrentValue; handler.Execute(); }
private void OnContentChange(PropertyChangedEvent <IControl> e) { if (e.OldValue != null) { e.OldValue.GetWinFormsView().UnsetParent(this); } var winFormsControlView = e.NewValue.GetWinFormsView(); winFormsControlView.SetParent(this, _form); RecalculateSize(); }
public void Addiere(Aufgabe a) { // Aufgaben.Add(a); böse Aufgaben.Add(new Aufgabe { Text = a.Text, ID = Aufgaben.Count }); PropertyChangedEvent.Invoke(this, EventArgs.Empty); }
protected override void PropertyChangedHandler(PropertyChangedEvent obj) { if (View == null) { return; } var converter = new ViewModelConverter(); if (obj is not { Value : IViewModel viewModel })
public void T0() { // Arrange var catcher = Catcher.PropertyChanged; PropertyChangedEvent += catcher.Catch; const string propertyName = nameof(propertyName); // Act PropertyChangedEvent.Raise(this, propertyName); // Assert catcher.CaughtPropertyChanged(this, propertyName); }
protected void SetScoreLabelFilter(WavesGame data, PropertyChangedEvent <System.Int32> value) { var GroupWavesGame = WavesGameManager[data.EntityId]; if (GroupWavesGame == null) { return; } if (!GroupWavesGame.Enabled) { return; } this.SetScoreLabel(data, GroupWavesGame, value); }
private void ActionUpdate(object sender, ServerEventArgs e) { PropertyChangedEvent ev = e.ServerEvent as PropertyChangedEvent; if (ev != null) { IActionUpdate updateObject; if (_map.TryGetValue(ev.SenderId, out updateObject)) { updateObject.Update(ev); } } }
protected void UpdateClickCountFilter(ClickCount data, PropertyChangedEvent <System.Int32> value) { var GroupClickCount = ClickCountManager[data.EntityId]; if (GroupClickCount == null) { return; } if (!GroupClickCount.Enabled) { return; } this.UpdateClickCount(data, GroupClickCount, value); }
protected virtual void OnRaisePropertyChanged <T>(string propertyName, T previousValue, T actualValue) { var action = new Action <string, T, T>((pro, pre, act) => { PropertyChangedEvent?.Invoke(this, new PropertyChangedEventArgs(pro)); PropertyChanged?.Invoke(this as TNotifier, new NotifierPropertyChangedEventArgs <TNotifier>(pro, (TNotifier)(INotifier <TNotifier>) this, pre, act)); }); if (UseSynchronizerOnRaisePropertyChanged && Synchronizer != null) { Synchronizer.Invoke(action, propertyName, previousValue, actualValue).Wait(); } else { action(propertyName, previousValue, actualValue); } }
/// <summary> /// Initializes a new instance of the <see cref="GroupingCollection"/> class. /// </summary> /// <param name="enumerable">The input sequence.</param> /// <param name="grouping">The underlying grouping.</param> internal GroupingCollection(IEnumerable <DependencyObject> enumerable, Grouping grouping) : this(new RecomposableCollection <DependencyObject>(grouping.GroupSort(enumerable))) { this.grouping = grouping; propertyListener = new PropertyChangedListener(this); PropertyChangedEvent.AddListener(grouping, propertyListener); if (enumerable is INotifyCollectionChanged collection) { this.enumerable = enumerable; collectionListener = new CollectionChangedListener(this); CollectionChangedEvent.AddListener(collection, collectionListener); } }
/// <summary> /// Initializes a new instance of the <see cref="ContainerCollection"/> class. /// </summary> /// <param name="items">The input data objects.</param> /// <param name="converter">The underlying converter.</param> internal ContainerCollection(IList items, ItemsConverter converter) : this(new ObservableCollection <DependencyObject>(converter.GetContainers(items))) { this.converter = converter; propertyListener = new PropertyChangedListener(this); PropertyChangedEvent.AddListener(converter, propertyListener); if (items is INotifyCollectionChanged collection) { this.items = items; collectionListener = new CollectionChangedListener(this); CollectionChangedEvent.AddListener(collection, collectionListener); } }
private async Task HandlePropertyChange(PropertyChangedEvent propertyChanged) { if (_componentState.IsStateProvidingAdapter(propertyChanged.MessageSource, propertyChanged.PropertyChangedName) && _componentState.TryUpdateState(propertyChanged.PropertyChangedName, propertyChanged.NewValue, out var oldValue)) { var translator = _translators.FirstOrDefault(e => e.Type == MessageType.Event && e.From.Equals(propertyChanged)); if (translator != null) { await MessageBroker.PublishWithTranslate(propertyChanged, translator.To, Uid).ConfigureAwait(false); } else { await MessageBroker.Publish(PropertyChangedEvent.Create(Uid, propertyChanged.PropertyChangedName, oldValue, propertyChanged.NewValue), Uid).ConfigureAwait(false); } } }
private async Task FetchState() { var stopwatch = Stopwatch.StartNew(); var newState = await ReadFromBus(); stopwatch.Stop(); if (!_driver.TrySaveState(newState, out var oldState)) { return; } var oldStateBits = new BitArray(oldState); var newStateBits = new BitArray(newState); Logger.LogTrace($"[{Uid}] fetched different state ({oldState.ToBinaryString()}->{newState.ToBinaryString()})"); for (int pinNumber = 0; pinNumber < oldStateBits.Length; pinNumber++) { var oldPinState = oldStateBits.Get(pinNumber); var newPinState = newStateBits.Get(pinNumber); bool pinInWriteMode = IsPinInWriteMode(pinNumber); // When state is the same or change is in port that are set to WRITE we skip event generation if (oldPinState == newPinState || pinInWriteMode) { continue; } var properyChangeEvent = PropertyChangedEvent.Create(Uid, PowerState.StateName, oldPinState, newPinState, new Dictionary <string, string>() { [MessageProperties.PinNumber] = pinNumber.ToString() }); await MessageBroker.Publish(properyChangeEvent, Uid); Logger.LogTrace($"[{Uid}] Pin [{pinNumber}] state changed {oldPinState}->{newPinState}"); } if (stopwatch.ElapsedMilliseconds > _poolDurationWarning) { Logger.LogWarning($"Polling device '{Uid}' took {stopwatch.ElapsedMilliseconds}ms."); } }
/// <summary> /// Removes from the <see cref="PropertyObserver"/> subscriptions associated with the specified source object. /// </summary> /// <typeparam name="T">The type of the source object.</typeparam> /// <param name="source">The source object to unobserve.</param> public void Unobserve <T>(T source) where T : class, INotifyPropertyChanged { Requires.NotNull(source, nameof(source)); CheckDisposed(); lock (table) { if (table.TryGetValue(source, out Subscriber subscriber)) { subscriber.Dispose(); PropertyChangedEvent.RemoveListener(source, subscriber); table.Remove(source); } } }
/// <summary> /// Releases resources used by the <see cref="PropertyObserver"/>. /// </summary> /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param> protected virtual void Dispose(bool disposing) { if (disposing && ValueSafe.Increment0(ref disposed)) { lock (table) { foreach (KeyValuePair <INotifyPropertyChanged, Subscriber> pair in table) { Subscriber subscriber = pair.Value; subscriber.Dispose(); PropertyChangedEvent.RemoveListener(pair.Key, subscriber); } table.Clear(); } } }
protected async Task <T> UpdateState <T>(string stateName, T oldValue, T newValue, IDictionary <string, string> additionalProperties = null) { if (newValue == null || EqualityComparer <T> .Default.Equals(oldValue, newValue)) { return(oldValue); } if (_requierdProperties.Count > 0) { if (additionalProperties == null || additionalProperties.Count != _requierdProperties.Count || !_requierdProperties.SequenceEqual(additionalProperties.Keys)) { throw new ArgumentException($"Update state on component {Uid} should be invoked with required properties: {string.Join(",", _requierdProperties)}"); } } await MessageBroker.Publish(PropertyChangedEvent.Create(Uid, stateName, oldValue?.ToString(), newValue.ToString(), additionalProperties), Uid); return(newValue); }
/// <summary> /// Unsubscribes the specified delegate from the change notification of any property of the specified source object. /// </summary> /// <typeparam name="T">The type of the source object.</typeparam> /// <param name="source">The source object to unsubscribe from.</param> /// <param name="callback">The delegate to unsubscribe.</param> private void Unsubscribe <T>(T source, Action callback) where T : class, INotifyPropertyChanged { CheckDisposed(); lock (table) { if (table.TryGetValue(source, out Subscriber subscriber)) { subscriber.Unsubscribe <T>(callback); if (subscriber.IsEmpty) { subscriber.Dispose(); PropertyChangedEvent.RemoveListener(source, subscriber); table.Remove(source); } } } }
private async Task HandlePropertyChange(PropertyChangedEvent propertyChanged) { if (_componentState.IsStateProvidingAdapter(propertyChanged.MessageSource, propertyChanged.PropertyChangedName) && _componentState.TryUpdateState(propertyChanged.PropertyChangedName, propertyChanged.NewValue, out var oldValue)) { var translator = _translators.FirstOrDefault(e => e.Type == MessageType.Event && e.From.Equals(propertyChanged)); if (translator != null) { var eventPublished = await MessageBroker.PublishWithTranslate(propertyChanged, translator.To, Uid); Logger.Log(LogLevel.Information, $"<@{Uid}> {eventPublished}"); } else if (RelayNotTranslatedEvents) { var eventPublished = PropertyChangedEvent.Create(Uid, propertyChanged.PropertyChangedName, oldValue, propertyChanged.NewValue); await MessageBroker.Publish(eventPublished, Uid); Logger.Log(LogLevel.Information, $"<@{Uid}> {eventPublished}"); } } }
public void Update(PropertyChangedEvent e) { if (e.PropertyName.Equals("Available")) { _actionItem.Available = (bool)e.Value; Item.Visibility = _actionItem.DesiredVisiblility; } else if (e.PropertyName.Equals("Visible")) { _actionItem.Visible = (bool)e.Value; Item.Visibility = _actionItem.DesiredVisiblility; } else if (e.PropertyName.Equals("Enabled")) { _actionItem.Enabled = (bool)e.Value; Item.IsEnabled = _actionItem.Enabled; } else if (e.PropertyName.Equals("IconSet")) { _actionItem.IconSet = e.Value as WebIconSet; SetIcon(); } else if (e.PropertyName.Equals("Tooltip")) { _actionItem.ToolTip = e.Value as string; } else if (e.PropertyName.Equals("Label")) { _actionItem.Label = e.Value as string; SetLabel(_actionItem.Label); } else if (e.PropertyName.Equals("Checked")) { WebClickAction action = _actionItem as WebClickAction; action.Checked = (bool)e.Value; Item.IsChecked = action.Checked; } }
protected async Task Handle(PropertyChangedEvent propertyChangedEvent) { if (!_Minimum.HasValue || !_Range.HasValue) { return; } var value = propertyChangedEvent.AsDouble(MessageProperties.NewValue); if (value < _Minimum) { value = 0; } _PreviousCurrentValue = _CurrentValue; _CurrentValue = value; var newLevel = GetPowerLevel(value); Logger.LogInformation($"NEW: {newLevel}, MAX: {_Maximum}, MIN: {_Minimum}"); _PowerLevel = await UpdateState(PowerLevelState.StateName, _PowerLevel, newLevel); }
public void TriggerPropertyChanged() { PropertyChangedEvent?.Invoke(); }
protected void UpdateClickCountFilter(ClickCount data, PropertyChangedEvent<System.Int32> value) { var GroupClickCount = ClickCountManager[data.EntityId]; if (GroupClickCount == null) { return; } if (!GroupClickCount.Enabled) { return; } this.UpdateClickCount(data, GroupClickCount, value); }
protected virtual void UpdateClickCount(ClickCount data, ClickCount group, PropertyChangedEvent<System.Int32> value) { var handler = new UpdateClickCount(); handler.System = this; handler.Event = data; handler.Group = group; handler.OldValue = value.PreviousValue; handler.NewValue = value.CurrentValue; handler.Execute(); }
/// <include file='doc\DataGridTable.uex' path='docs/doc[@for="DataGridTableStyle.OnColumnChanged"]/*' /> /// <devdoc> /// The DataColumnCollection class actually wires up this /// event handler to the PropertyChanged events of /// a DataGridTable's columns. /// </devdoc> internal void OnColumnChanged(object sender, PropertyChangedEvent event) { if (event.PropertyName.Equals("Visible"))
public void Update(PropertyChangedEvent e) { if (e.PropertyName.Equals("Available")) { _actionItem.Visible = (bool)e.Value; Visibility = _actionItem.DesiredVisiblility; } else if (e.PropertyName.Equals("Visible")) { _actionItem.Visible = (bool)e.Value; Visibility = _actionItem.DesiredVisiblility; } else if (e.PropertyName.Equals("Enabled")) { _actionItem.Enabled = (bool)e.Value; ButtonComponent.IsEnabled = _actionItem.Enabled; DropButtonComponent.IsEnabled = _actionItem.Enabled; if (_actionItem.Checked && !_actionItem.Enabled) { CheckedIndicator.Opacity = 0.25; if (_actionItem.IconSet.HasOverlay) { OverlayCheckedIndicator.Opacity = 0.25; } } else if (_actionItem.Checked) { CheckedIndicator.Opacity = 1; if (_actionItem.IconSet.HasOverlay) { OverlayCheckedIndicator.Opacity = 1; } } else { IndicateChecked(false); } } else if (e.PropertyName.Equals("IconSet")) { _actionItem.IconSet = e.Value as WebIconSet; SetIcon(); } else if (e.PropertyName.Equals("ToolTip")) { _actionItem.ToolTip = e.Value as string; ToolTipService.SetToolTip(StackPanelVerticalComponent, _actionItem.ToolTip); } else if (e.PropertyName.Equals("Label")) { _actionItem.Label = e.Value as string; } else if (e.PropertyName.Equals("Checked")) { _actionItem.Checked = (bool)e.Value; IndicateChecked(_actionItem.Checked); } else if (e.PropertyName.Equals("DropDownActions")) { _actionItem.DropDownActions = e.Value as Collection <WebActionNode>; _dropMenu.Dispose(); _dropMenu = MenuBuilder.BuildContextMenu(_actionItem, _actionDispatcher); } UpdateLayout(); }
public void Update(PropertyChangedEvent e) { if (e.PropertyName.Equals("Available")) { _actionItem.Available = (bool)e.Value; Visibility = _actionItem.DesiredVisiblility; } else if (e.PropertyName.Equals("Visible")) { _actionItem.Visible = (bool)e.Value; Visibility = _actionItem.DesiredVisiblility; } else if (e.PropertyName.Equals("Enabled")) { _actionItem.Enabled = (bool)e.Value; ButtonComponent.IsEnabled = _actionItem.Enabled; if (_actionItem.Checked && !_actionItem.Enabled) { CheckedIndicator.Opacity = 0.25; if(_actionItem.IconSet.HasOverlay) OverlayCheckedIndicator.Opacity = 0.25; } else if (_actionItem.Checked) { CheckedIndicator.Opacity = 1; if (_actionItem.IconSet.HasOverlay) OverlayCheckedIndicator.Opacity = 1; } else IndicateChecked(false); } else if (e.PropertyName.Equals("IconSet")) { _actionItem.IconSet = e.Value as WebIconSet; SetIcon(); } else if (e.PropertyName.Equals("ToolTip")) { _actionItem.ToolTip = e.Value as string; ToolTipService.SetToolTip(ButtonComponent, _actionItem.ToolTip); } else if (e.PropertyName.Equals("Label")) { _actionItem.Label = e.Value as string; } else if (e.PropertyName.Equals("Checked")) { _actionItem.Checked = (bool)e.Value; IndicateChecked(_actionItem.Checked); } UpdateLayout(); }
public override async Task RunTask(int taskId) { if (!pinNumber.HasValue) { ConsoleEx.WriteWarning("Write PIN number:"); pinNumber = int.Parse(Console.ReadLine()); } Command cmd = null; switch (taskId) { case 0: cmd = new TurnOnCommand(); break; case 1: cmd = new TurnOffCommand(); break; case 2: cmd = new RefreshCommand(); cmd.LogLevel = nameof(Microsoft.Extensions.Logging.LogLevel.Information); break; case 3: cmd = new SwitchPowerStateCommand(); break; case 4: var inputUid = "HSPE16InputOnly_2"; var properyChangeEvent = PropertyChangedEvent.Create(inputUid, PowerState.StateName, false, true, new Dictionary <string, string>() { [MessageProperties.PinNumber] = 0.ToString() }); await MessageBroker.Publish(properyChangeEvent, inputUid); return; case 5: var inputUid2 = "HSPE16InputOnly_2"; var properyChangeEvent2 = PropertyChangedEvent.Create(inputUid2, PowerState.StateName, true, false, new Dictionary <string, string>() { [MessageProperties.PinNumber] = 0.ToString() }); await MessageBroker.Publish(properyChangeEvent2, inputUid2); return; } if (pinNumber.HasValue && pinNumber.Value < 10) { cmd.SetProperty(MessageProperties.PinNumber, pinNumber.Value); } MessageBroker.Send(cmd, Uid); //return Task.CompletedTask; }
private void OnPropertyChanged(PropertyChangedEvent @event) { //NOTE: the scrollbar will update automatically whenever ServerEntity is updated. if (@event.PropertyName == "Tiles") { ServerEntity.Tiles = (Collection<Tile>)@event.Value; UpdateTileViews(); UpdateSize(); return; } if (@event.PropertyName == "Selected") { ServerEntity.Selected = (bool)@event.Value; UpdateBorder(); } if (@event.PropertyName == "TopLeftPresentationImageIndex") { ServerEntity.TopLeftPresentationImageIndex = (int)@event.Value; } if (@event.PropertyName == "ImageCount") { var count = (int)@event.Value; if (ServerEntity.ImageCount!=count) { ServerEntity.ImageCount = count; // Note: Because the scrollbar observes PropertyChanged event on the ServerEntity, its visibility will be updated automatically in ImageBoxScrollbarView // When UpdateLayout() is called in UpdateSize(), the size of the TileContainer will be updated accordingly. UpdateSize(); } } }
public void Update(PropertyChangedEvent e) { if (e.PropertyName.Equals("Available")) { _actionItem.Visible = (bool)e.Value; Visibility = _actionItem.DesiredVisiblility; } else if (e.PropertyName.Equals("Visible")) { _actionItem.Visible = (bool)e.Value; Visibility = _actionItem.DesiredVisiblility; } else if (e.PropertyName.Equals("Enabled")) { _actionItem.Enabled = (bool)e.Value; ButtonComponent.IsEnabled = _actionItem.Enabled; DropButtonComponent.IsEnabled = _actionItem.Enabled; if (_actionItem.Checked && !_actionItem.Enabled) { CheckedIndicator.Opacity = 0.25; if (_actionItem.IconSet.HasOverlay) OverlayCheckedIndicator.Opacity = 0.25; } else if (_actionItem.Checked) { CheckedIndicator.Opacity = 1; if (_actionItem.IconSet.HasOverlay) OverlayCheckedIndicator.Opacity = 1; } else IndicateChecked(false); } else if (e.PropertyName.Equals("IconSet")) { _actionItem.IconSet = e.Value as WebIconSet; SetIcon(); } else if (e.PropertyName.Equals("ToolTip")) { _actionItem.ToolTip = e.Value as string; ToolTipService.SetToolTip(StackPanelVerticalComponent, _actionItem.ToolTip); } else if (e.PropertyName.Equals("Label")) { _actionItem.Label = e.Value as string; } else if (e.PropertyName.Equals("Checked")) { _actionItem.Checked = (bool)e.Value; IndicateChecked(_actionItem.Checked); } else if (e.PropertyName.Equals("DropDownActions")) { _actionItem.DropDownActions = e.Value as Collection<WebActionNode>; _dropMenu.Dispose(); _dropMenu = MenuBuilder.BuildContextMenu(_actionItem, _actionDispatcher); } UpdateLayout(); }
protected void SetScoreLabelFilter(WavesGame data, PropertyChangedEvent<System.Int32> value) { var GroupWavesGame = WavesGameManager[data.EntityId]; if (GroupWavesGame == null) { return; } if (!GroupWavesGame.Enabled) { return; } this.SetScoreLabel(data, GroupWavesGame, value); }