예제 #1
0
        void DecompileSelectedNodes(DecompilerTextViewState state = null, bool recordHistory = true)
        {
            if (ignoreDecompilationRequests)
            {
                return;
            }

            if (recordHistory)
            {
                var dtState = decompilerTextView.GetState();
                if (dtState != null)
                {
                    history.UpdateCurrent(new NavigationState(dtState));
                }
                history.Record(new NavigationState(treeView.SelectedItems.OfType <SharpTreeNode>()));
            }

            if (treeView.SelectedItems.Count == 1)
            {
                ILSpyTreeNode node = treeView.SelectedItem as ILSpyTreeNode;
                if (node != null && node.View(decompilerTextView))
                {
                    return;
                }
            }
            decompilationTask = decompilerTextView.DecompileAsync(this.CurrentLanguage, this.SelectedNodes, new DecompilationOptions()
            {
                TextViewState = state
            });
        }
예제 #2
0
        private void DecompileSelectedNodes(DecompilerTextViewState state = null)
        {
            if (ignoreDecompilationRequests)
            {
                return;
            }

            if (treeView.SelectedItems.Count == 1)
            {
                ILSpyTreeNode node = treeView.SelectedItem as ILSpyTreeNode;
                if (node != null && node.View(decompilerTextView))
                {
                    return;
                }
            }
            decompilerTextView.Decompile(this.CurrentLanguage, this.SelectedNodes, new DecompilationOptions()
            {
                TextViewState = state
            });
        }