public void Step(SimulationModel.Key key, ISimulationAccess access) { long now = curTime + 1; curTime = now; if (Debug) { Console.WriteLine("step simulation {0}", now); } ClearDirty(key, access); while (events.Count > 0 && events.Peek().when == now) { SetEvent evnt = events.Dequeue(); Port p = evnt.port; Value cur = p.GetDrivenValue(key); if (Debug) { Console.WriteLine(" {0}: drive {1} onto {2}, mark {3}", evnt.when, evnt.value, evnt.port, p.Subnet); } if (!cur.Equals(evnt.value)) { p.SetDrivenValue(key, evnt.value); dirtyNets.Add(p.Subnet); } } ClearDirty(key, access); anyDirty = events.Count > 0 || dirtyNets.Count > 0 || dirtyInstances.Count > 0; }
public void Call_SetEvent(object sender, Tuple <int, T> e) { if (e.Item1 < Items.Count) { SetEvent?.Invoke(sender, e); } }
public void SetTrigger() { if (SetEvent != null) { SetEvent.Invoke(); } }
protected void Set(int pos, T item) { if (pos < Items.Count) { SetEvent?.Invoke(this, new Tuple <int, T>(pos, item)); Items[pos] = item; } }
public void OnSetWon(Team setWonTeam) { //if set won EventHandler <SetEvent> handler = SetWonHandler; if (handler != null) { SetEvent setEvent = new SetEvent() { Team = setWonTeam, }; handler(this, setEvent); } }
private void HandleProtocolSetEvent(SetEvent <T> obj) { var value = obj.Value; using (myHandler.CreateSendWithoutContextsCookie()) if (obj.Kind == AddRemove.Add) { myInternRoot.Intern(value); } else { myInternRoot.Remove(value); } }
public override void OnSetWonHandler(object sender, SetEvent e) { Team teamSetWon = e.Team; if (teamSetWon is TeamA) { UpdateScore(ref scoreA, ref scoreB); } else if (teamSetWon is TeamB) { UpdateScore(ref scoreB, ref scoreA); } this.Match.OnSetWon(e.Team); }
public void Show(string caption, string maincaption) { if (this.dialogForm.InvokeRequired) { SetEvent method = new SetEvent(this.pShow); this.dialogForm.Invoke(method); } this.MainCaption = maincaption; this.Caption = caption; }
public void Show() { if (this.dialogForm.InvokeRequired) { SetEvent method = new SetEvent(this.pShow); this.dialogForm.Invoke(method); } }
public void Hide() { if (this.dialogForm.InvokeRequired) { SetEvent method = new SetEvent(this.pHide); this.dialogForm.Invoke(method); } }
// Fix me: protected so that introspection can find it public SetColorEvent(SetEvent srcEvent) : base(srcEvent) { Parameters.Fill(this); _objc.Fill(this); }
protected void Set(int position, T item) { SetCount++; Items[position] = item; SetEvent?.Invoke(this, new Tuple <int, T>(position, item)); }
private void OnSet(object sender, Tuple <T, int> e) { _result.SetsCount++; SetEvent?.Invoke(this, e); }
public SetHistoryStateEvent(SetEvent srcEvent) : base(srcEvent) { }
public void Set(T[] items, T item, int index) { items[index] = item; SetEvent?.Invoke(this, new Tuple <T, int>(item, index)); }
public SetBackgroundColorEvent(SetEvent srcEvent) : base(srcEvent) { }
public SetQuickMaskEvent(SetEvent srcEvent) : base(srcEvent) { }
public abstract void OnSetWonHandler(object sender, SetEvent e);
public R this[P parm] { get { return(GetEvent.Invoke(parm)); } set { SetEvent.Invoke(parm, value); } }
// Use this for initialization void Start() { setEventInstance = this; myDateTime = DateTime.Today; Year = DateTime.Now.Year; //Month = DateTime.Now.ToString("MMMM"); Month = DateTime.Now.Month; DisplayYear(); }