Exemplo n.º 1
0
        /*******************************************************************************************/
        /*******************************************************************************************/

        public Result BalanceTreePrepareSteps()
        {
            if (tree is null)
            {
                return(Result.NO_TREE);
            }

            StepMode.GetInstance().PrepareStepsForTreeBalancing(tree);
            return(Result.OK);
        }
Exemplo n.º 2
0
        /*******************************************************************************************/
        /*******************************************************************************************/

        public Result AddNodesPrepareSteps(String text)
        {
            var keys = CheckRequirementsToCreateTree(text, out Result result);

            if (keys is null)
            {
                return(result);
            }

            StepMode.GetInstance().PrepareStepsForAddNodes(tree, keys);
            return(Result.OK);
        }
Exemplo n.º 3
0
        /*******************************************************************************************/
        /*******************************************************************************************/

        public Result DeleteNodesPrepareSteps()
        {
            var selectedNodes = CheckRequirementsToDeleteNodes(out Result result);

            if (selectedNodes is null)
            {
                return(result);
            }

            StepMode.GetInstance().PrepareStepsForDeleteNodes(tree, selectedNodes);
            return(Result.OK);
        }
Exemplo n.º 4
0
        /*******************************************************************************************/
        /*******************************************************************************************/

        public Result DrawTreePrepareSteps(String text)
        {
            var keys = new Parser().GetNodesValues(text, out Result result);

            if (keys is null)
            {
                return(result);
            }

            DestroyTree();
            tree = GetTree();
            StepMode.GetInstance().PrepareStepsForAddNodes(tree, keys);
            return(Result.OK);
        }
Exemplo n.º 5
0
 public void StepBackward()
 {
     Step(StepMode.GetInstance().StepBackward);
 }