Exemplo n.º 1
0
            public static void OnShowPanel(Guid panelId, uint documentSerialNumber, bool show)
            {
                if (Show == null)
                {
                    return;
                }
                var args = new ShowPanelEventArgs(panelId, documentSerialNumber, show);

                Show.Invoke(null, args);
            }
Exemplo n.º 2
0
        private void PanelsOnShow(object sender, ShowPanelEventArgs e)
        {
            // only do something if its actually for our panel
            if (e.PanelId != ClippingPlaneManagerPanel.PanelId)
            {
                return;
            }

            // get instance of our panel
            var panel = Panels.GetPanel <ClippingPlaneManagerPanel>(e.Document);

            // check if already initialized with view-model
            //if (panel.IsModelInitialized) return;

            // initialize new view-model
            panel.SetClippingPlaneListModel(new ClippingPlaneListViewModel(e.Document));
        }
Exemplo n.º 3
0
        private void PanelsOnShow(object sender, ShowPanelEventArgs e)
        {
            // only do something if its actually for our panel
            if (e.PanelId == BlockManagerPanel.PanelId)
            {
                // get instance of our panel
                var panel = Panels.GetPanel <BlockManagerPanel>(e.Document);

                // check if already initialized with view-model
                if (panel.IsModelInitialized)
                {
                    return;
                }

                // initialize new view-model
                panel.SetBlockTreeModel(new SearchableBlockTreeModel(new BlockTreeModel(new BlockWatcher(e.Document))));
            }

            if (e.PanelId == typeof(BlockManager).GUID)
            {
                // Initialize structure
                InstanceDefinitionStructure = new InstanceDefinitionStructure(e.Document.InstanceDefinitions);
            }
        }