예제 #1
0
        private void OnNavigated(object sender, GameTreePath <TAction> e)
        {
            if (sender != this)
            {
                path = GameTreeNode <TNode, TState, TAction> .GetPath(navigator1.CurrentNode).Skip(1).Select(n => n.LastAction).ToList();

                scrollBar.Maximum      = path.Count;
                scrollBarPreviousValue = scrollBar.Maximum;
                scrollBar.Value        = scrollBarPreviousValue;
            }
        }
예제 #2
0
        private void OnForwarded(object sender, TAction action)
        {
            if (sender != this)
            {
                // TODO : optymalizacja
                path = GameTreeNode <TNode, TState, TAction> .GetPath(navigator1.CurrentNode).Skip(1).Select(n => n.LastAction).ToList();

                scrollBar.Maximum      = path.Count;
                scrollBarPreviousValue = scrollBar.Maximum;
                scrollBar.Value        = scrollBarPreviousValue;
            }
        }