private void DataClientOnCurrentProjectChangeEventHandler(Project newCurrentProject) { _aPlayAwareShell = (IAPlayAwareShell)Shell; Title = "APlayTest [" + newCurrentProject.ProjectDetail.Name + "]"; _aPlayAwareShell.Project = newCurrentProject; }
public SheetDocumentViewModel(Sheet sheet, IInspectorTool inspectorTool, IAPlayAwareShell shell, Action <SheetDocumentViewModel> onOpenedChanged, Client client) { _sheet = sheet; _inspectorTool = inspectorTool; _shell = shell; _onOpenedChanged = onOpenedChanged; _client = client; _name = _sheet.Name; SheetId = _sheet.Id; DisplayName = _name; _symbolVms = new BindableCollection <SymbolBaseViewModel>(); _connections = new BindableCollection <ConnectionViewModel>(); foreach (var blockSymbol in _sheet.BlockSymbols) { _symbolVms.Add(new BlockViewModel(blockSymbol, _client, _inspectorTool)); } foreach (var connector in _sheet.Connectors) { _symbolVms.Add(new ConnectorViewModel(connector, client, _inspectorTool)); } foreach (var connection in _sheet.Connections) { _connections.Add(new ConnectionViewModel(connection, _client, _inspectorTool)); } _sheet.NameChangeEventHandler += _sheet_NameChangeEventHandler; _sheet.BlockSymbolsAddEventHandler += OnBlockSymbolsAddEventHandler; _sheet.BlockSymbolsInsertAtEventHandler += OnBlockSymbolsInsertAtEventHandler; _sheet.BlockSymbolsRemoveAtEventHandler += OnBlockSymbolsRemoveAtEventHandler; _sheet.ConnectorsAddEventHandler += OnConnectorAddEventHandler; _sheet.ConnectorsInsertAtEventHandler += OnConnectorInsertAtEventHandler; _sheet.ConnectorsRemoveAtEventHandler += OnConnectorRemoveAtEventHandler; _sheet.ConnectionsAddEventHandler += OnConnectionsAddEventHandler; _sheet.ConnectionsRemoveEventHandler += OnConnectionsRemoveEventHandler; _sheet.ConnectionsRemoveAtEventHandler += OnConnectionsRemoveAtEventHandler; _sheet.ConnectionsInsertAtEventHandler += OnConnectionsInsertAtEventHandler; }
public UndoHistoryViewModel(IAPlayAwareShell shell) { _shell = shell; _shell.UndoManagerChanged += ShellOnUndoManagerChanged; DisplayName = "History"; History = new ObservableCollection <HistoryEntry>(); if (_shell.UndoManager != null) { SetUndoHistory(_shell.UndoManager); } }
public SheetTreeViewModel(IAPlayAwareShell shell, IInspectorTool inspectorTool) { _shell = shell; _inspectorTool = inspectorTool; DisplayName = "Sheet Tree"; Sheets = new BindableCollection <SheetDocumentViewModel>(); _shell.ProjectChanged += OnProjectChanged; if (shell.Project != null) { if (shell.Project.SheetManager.Sheets != null) { Sheets.AddRange(shell.Project.SheetManager.Sheets.Select(sheet => new SheetDocumentViewModel(sheet, inspectorTool, shell, OnOpenedChanged, _shell.Client))); } } }
public ViewSheetTreeCommandHandler(IAPlayAwareShell shell) { _shell = shell; }