예제 #1
0
        private void Open_Shell(object sender, RoutedEventArgs e)
        {
            RocketNode selectedObject = (RocketNode)lNodes.SelectedItem;

            if (selectedObject != null)
            {
                ShellUI shell = ShellUI.StartShell(selectedObject);
                shell.Show();
            }
        }
예제 #2
0
        public static ShellUI StartShell(RocketNode node)
        {
            if (openedUIs.ContainsKey(node))
            {
                return(openedUIs[node]);
            }
            ShellUI ui = new ShellUI(node);

            ui.Closed += (s, e) => openedUIs.Remove(node);
            openedUIs.Add(node, ui);
            return(ui);
        }