コード例 #1
0
ファイル: EditorForm.cs プロジェクト: netcharm/PhotoTools
 internal void ClearHistory()
 {
     HistoryUndo.Clear();
     HistoryRedo.Clear();
     Host.OnCommandPropertiesChange(new CommandPropertiesChangeEventArgs(AddinCommand.Undo, HistoryUndo.Count > 1));
     Host.OnCommandPropertiesChange(new CommandPropertiesChangeEventArgs(AddinCommand.Redo, HistoryRedo.Count > 0));
 }
コード例 #2
0
 void StopRewind()
 {
     //Debug.Log("Stop Rewind");
     //playerRigidbody.isKinematic = false;
     isRewinding = false;
     playerController.UnFreezeMotion();
     storedPositions.Clear();
     isInCooldown = true;
     StartCoroutine("ResetCooldown");
 }
コード例 #3
0
        public CommandHistory Store(string commandName, params object[] args)
        {
            if (backup.Count > 0)
            {
                backup.Clear();
            }

            history.Push(new KeyValuePair <string, object[]>(commandName, args));
            return(this);
        }
コード例 #4
0
        public void Clear01()
        {
            var capacity = 4;
            var cq       = new CircularStack <int>(capacity);

            Assert.AreEqual(capacity, cq.Capacity());
            for (int i = 0; i < 6; i++)
            {
                cq.Push(i);
            }
            Assert.AreEqual(capacity, cq.Count());
            cq.Clear();
            Assert.AreEqual(0, cq.Count());
            for (int i = 0; i < 6; i++)
            {
                cq.Push(i);
            }
            Assert.AreEqual(capacity, cq.Count());
        }