private void AddPanelHolder(int id, string name, PanelLoadType corner) { PanelHolders.Add(new PanelHolderViewModel() { Id = id, Name = name, Corner = corner }); }
private void OnUpdateAvailablePanelHolderMessage(UpdateAvailablePanelHolderMessage obj) { PanelHolders.Clear(); MessengerInstance.Send(new GetAvailablePanelHoldersMessage() { AvailableToolHolder = AddPanelHolder }); }
protected override void RemoveElement(IEnumerable <IMachineElement> elements) { foreach (var item in elements) { if (item is PanelHolderElementViewModel ph) { var vm = PanelHolders.FirstOrDefault(p => p.Id == ph.PanelHolderId); if (vm != null) { PanelHolders.Remove(vm); } } } }
protected override void AddElement(IEnumerable <IMachineElement> elements) { foreach (var item in elements) { if (item is PanelHolderElementViewModel ph) { PanelHolders.Add(new PanelHolderManagerViewModel() { Id = ph.PanelHolderId, Name = ph.Name, Corner = ph.Corner }); } AddElement(item.Children); } }
protected override void Clear() => PanelHolders.Clear();
private void OnResetAvailablePanelHolderMessage(ResetAvailablePanelHolderMessage obj) => PanelHolders.Clear();