private void MouserOverObjectExecute(IUniqueObject widget) { if (widget != null) { _ListEventAggregator.GetEvent <MouseOverInteractionObject>().Publish(widget); } }
internal WidgetNode(InteractionTabVM tabVM, IUniqueObject target, ObjectType type, bool isSelected) { _targetObject = target as IRegion; _tabVM = tabVM; _objectType = type; _isSelected = isSelected; }
public void AddTarget(IUniqueObject targetObject) { if (WidgetShowHideAction != null) { WidgetShowHideAction.AddTargetObject(targetObject.Guid); SetShowHideAction(); //current action is not "Check All" if (!_isCheckAllAction) { if (CurrentUndoManager != null) { //widget AddTargetCommand cmd = new AddTargetCommand(this, targetObject.Guid, _selectedWidget == null ? Guid.Empty : _selectedWidget.Guid); CurrentUndoManager.Push(cmd); } //if all is checked , set IsCheckAll to true. var node = WidgetList.FirstOrDefault(a => a.IsSelected == false); if (node == null) { _isCheckAll = true; FirePropertyChanged("IsCheckAll"); } } FirePropertyChanged("ShowHideType"); FirePropertyChanged("AnimateType"); FirePropertyChanged("AnimateTime"); FirePropertyChanged("IsShowHideEnabled"); } }
public IStockManager[] GetStockManagers(string productFamily, IUniqueObject sender) { if (familiesMap.ContainsKey(productFamily)) { return((from sm in familiesMap[productFamily] where sm.Key != sender.GetUID() select sm.Value).ToArray()); } return(new IStockManager[0]); }
public virtual bool Equals(IUniqueObject <int> other) { if (((this.GetKey != -1) && (other.GetKey != -1))) { return(this.GetKey == other.GetKey); } else { return(object.ReferenceEquals(this, other)); } }
public PropagateToken AddHop(IUniqueObject uid) { if (HasHopedOnObject(uid)) { return(this); } string[] newHops = new string[hops.Length + 1]; Array.Copy(hops, newHops, hops.Length); newHops[hops.Length] = uid.GetUID(); hops = newHops; return(this); }
public void DeleteTaget(IUniqueObject targetObject) { if (WidgetShowHideAction != null) { WidgetShowHideAction.DeleteTagetObject(targetObject.Guid); //current action is not "Check All" if (!_isCheckAllAction) { if (CurrentUndoManager != null) { DeleteTargetCommand cmd = new DeleteTargetCommand(this, targetObject.Guid, _selectedWidget == null ? Guid.Empty : _selectedWidget.Guid); CurrentUndoManager.Push(cmd); } SetShowHideAction(); // Set IsCheckAll to false if one widget is unchecked. _isCheckAll = false; FirePropertyChanged("IsCheckAll"); } FirePropertyChanged("IsShowHideEnabled"); } }
public static IUniqueObject copyOf(IUniqueObject original) { return(new UniqueObject(original.GetUID())); }
//public RegularNation[] Adjacency { get; set; } = new RegularNation[NUM_ADJACENT_NATIONS]; //public List<RegularNation> SateliteNations { get; set; } = new List<RegularNation>(); public void SendToReserve(IUniqueObject uniqueObject) { _Reserve.Add(uniqueObject.UID, uniqueObject); }
public bool HasHopedOnObject(IUniqueObject uid) { return(hops.Contains(uid.GetUID())); }