private void setupControllersPanelsTab() { ControllersPanelsTab = new ControllersPanelsVM(Bid); ControllersPanelsTab.SelectionChanged += obj => { Selected = obj as TECObject; }; }
private void SystemSelected(TECSystem value) { if (value != null) { MiscVM = new MiscCostsVM(value); ControllersPanelsVM = new ControllersPanelsVM(value, scopeManager); ValveVM = new ValveSelectionVM(value, scopeManager.Catalogs.Valves); ConnectionsVM = new ConnectionsVM(value, new ChangeWatcher(value), catalogs, locations: (scopeManager as TECBid)?.Locations, filterPredicate: connectionFilter); if (value is TECTypical typical && typical.Instances.Count > 1) { UpdateInstanceConnectionsCommand = new RelayCommand(typical.UpdateInstanceConnections, typical.CanUpdateInstanceConnections); } else { UpdateInstanceConnectionsCommand = null; } RaisePropertyChanged("UpdateInstanceConnectionsCommand"); bool connectionFilter(ITECObject obj) { if (obj is ITypicalable typ && typ.IsTypical == value.IsTypical) { return(true); }