示例#1
0
        private void ShowFormula(string cellRef, string formula)
        {
            var formulaObject = new ExcelFormulaParser.ExcelFormula(formula);
            System.Action action = () =>
            {
                this.Graph = new FGraph();
                var rootItem = new FVertex() { Name = cellRef };
                Graph.AddVertex(rootItem);
                ShowFormula(new Queue<ExcelFormulaToken>(formulaObject), rootItem);
                graphLayout.Graph = this.Graph;
            };

            Dispatcher.BeginInvoke(action);
        }
示例#2
0
        private void ShowFormula(string cellRef, string formula)
        {
            var formulaObject = new ExcelFormulaParser.ExcelFormula(formula);
            System.Action action = () =>
            {
                FormulaTreeView.Items.Clear();
                var rootItem = new TreeViewItem {Header = cellRef};
                FormulaTreeView.Items.Add(rootItem);
                ShowFormula(new Queue<ExcelFormulaToken>(formulaObject), rootItem.Items);
                rootItem.ExpandSubtree();
            };

            Dispatcher.BeginInvoke(action);
        }