コード例 #1
0
ファイル: Engine.cs プロジェクト: SirHall/toves-simulator
        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;
        }
コード例 #2
0
 public void Call_SetEvent(object sender, Tuple <int, T> e)
 {
     if (e.Item1 < Items.Count)
     {
         SetEvent?.Invoke(sender, e);
     }
 }
コード例 #3
0
ファイル: AnimatorTrigger.cs プロジェクト: dqtoy/GGJ2020
 public void SetTrigger()
 {
     if (SetEvent != null)
     {
         SetEvent.Invoke();
     }
 }
コード例 #4
0
 protected void Set(int pos, T item)
 {
     if (pos < Items.Count)
     {
         SetEvent?.Invoke(this, new Tuple <int, T>(pos, item));
         Items[pos] = item;
     }
 }
コード例 #5
0
ファイル: Set.cs プロジェクト: oromand/tennis-scoring
        public void OnSetWon(Team setWonTeam)
        {
            //if set won
            EventHandler <SetEvent> handler = SetWonHandler;

            if (handler != null)
            {
                SetEvent setEvent = new SetEvent()
                {
                    Team = setWonTeam,
                };
                handler(this, setEvent);
            }
        }
コード例 #6
0
ファイル: HeavySingleContextHandler.cs プロジェクト: yvvan/rd
        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);
                }
        }
コード例 #7
0
ファイル: Score.cs プロジェクト: oromand/tennis-scoring
        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);
        }
コード例 #8
0
ファイル: clsMain.cs プロジェクト: vanloc0301/hugate-parking
 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;
 }
コード例 #9
0
ファイル: clsMain.cs プロジェクト: vanloc0301/hugate-parking
 public void Show()
 {
     if (this.dialogForm.InvokeRequired)
     {
         SetEvent method = new SetEvent(this.pShow);
         this.dialogForm.Invoke(method);
     }
 }
コード例 #10
0
ファイル: clsMain.cs プロジェクト: vanloc0301/hugate-parking
 public void Hide()
 {
     if (this.dialogForm.InvokeRequired)
     {
         SetEvent method = new SetEvent(this.pHide);
         this.dialogForm.Invoke(method);
     }
 }
コード例 #11
0
ファイル: SetColorEvent.cs プロジェクト: unhammer/gimp-sharp
 // Fix me: protected so that introspection can find it
 public SetColorEvent(SetEvent srcEvent)
     : base(srcEvent)
 {
     Parameters.Fill(this);
       _objc.Fill(this);
 }
コード例 #12
0
 protected void Set(int position, T item)
 {
     SetCount++;
     Items[position] = item;
     SetEvent?.Invoke(this, new Tuple <int, T>(position, item));
 }
コード例 #13
0
ファイル: Sorter.cs プロジェクト: ShockByteX/SortAlgorithms
        private void OnSet(object sender, Tuple <T, int> e)
        {
            _result.SetsCount++;

            SetEvent?.Invoke(this, e);
        }
コード例 #14
0
 public SetHistoryStateEvent(SetEvent srcEvent) : base(srcEvent)
 {
 }
コード例 #15
0
        public void Set(T[] items, T item, int index)
        {
            items[index] = item;

            SetEvent?.Invoke(this, new Tuple <T, int>(item, index));
        }
コード例 #16
0
 public SetBackgroundColorEvent(SetEvent srcEvent) : base(srcEvent)
 {
 }
コード例 #17
0
 public SetQuickMaskEvent(SetEvent srcEvent) : base(srcEvent)
 {
 }
コード例 #18
0
ファイル: Score.cs プロジェクト: oromand/tennis-scoring
 public abstract void OnSetWonHandler(object sender, SetEvent e);
コード例 #19
0
 public SetHistoryStateEvent(SetEvent srcEvent)
     : base(srcEvent)
 {
 }
コード例 #20
0
        // Fix me: protected so that introspection can find it

        public SetColorEvent(SetEvent srcEvent) : base(srcEvent)
        {
            Parameters.Fill(this);
            _objc.Fill(this);
        }
コード例 #21
0
 public R this[P parm]
 {
     get { return(GetEvent.Invoke(parm)); }
     set { SetEvent.Invoke(parm, value); }
 }
コード例 #22
0
 // 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();
 }