Пример #1
0
 public void SetSelectedTab(TabState tabState)
 {
     tabControl.SelectedItem = tabState.TabItem;
 }
        static void OnTabStateChanged(TabState oldTabState, TabState newTabState)
        {
            var oldTsd = oldTabState as DecompileTabState;
            if (oldTsd != null) {
                oldTsd.TextView.OnBeforeShowOutput -= DecompilerTextView_OnBeforeShowOutput;
                oldTsd.TextView.OnShowOutput -= DecompilerTextView_OnShowOutput;
            }
            var newTsd = newTabState as DecompileTabState;
            if (newTsd != null) {
                newTsd.TextView.OnBeforeShowOutput += DecompilerTextView_OnBeforeShowOutput;
                newTsd.TextView.OnShowOutput += DecompilerTextView_OnShowOutput;
            }

            if (oldTsd != null)
                Remove(oldTsd.TextView);
            if (newTsd != null)
                UpdateReturnStatementBookmarks(newTsd.TextView);
        }