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); }
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)); }
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); } }