Example #1
0
        public void InitializeByParams(object[] param)
        {
            CommandParam       data      = param[0] as CommandParam;
            SearchBlockHandler _sHandler = param[1] as SearchBlockHandler;

            targetBlockName = data.target;
            //Search Block Name
            targetBlock = GetFlowchart().FindBlock(targetBlockName);

            //If not exist , add event to listen future block
            if (targetBlock == null)
            {
                searchHandler = _sHandler;
                searchHandler.createBlockEvent += FindBlock;
            }
        }
Example #2
0
        public void InitializeByParams(object[] param)
        {
            CommandParam       data      = param[0] as CommandParam;
            SearchBlockHandler _sHandler = param[1] as SearchBlockHandler;

            bool isUpdateText = true;
            bool isUpdateLink = true;

            if (data.option != null)
            {
                isUpdateText = data.option.selectionText;
                isUpdateLink = data.option.selection;
            }

            if (isUpdateText)
            {
                if (data.locText.Count > 0)
                {
                    this.text = data.locText[0].content;
                }
            }

            if (isUpdateLink)
            {
                targetBlockName = data.target;
                //Search Block Name
                targetBlock = GetFlowchart().FindBlock(targetBlockName);

                //If not exist , add event to listen future block
                if (targetBlock == null)
                {
                    searchHandler = _sHandler;
                    searchHandler.createBlockEvent += FindBlock;
                }
            }
        }