private void ViewModel_PropertyChanged(object sender, PropertyChangedEventArgs e) { switch (e.PropertyName) { case nameof(vm.File): chunkList.UpdateList(); break; case nameof(vm.SelectedChunks): if (propertyWindow == null || propertyWindow.IsDisposed) { propertyWindow = new frmChunkProperties(vm); propertyWindow.Show(FormPanel, DockState.DockRight); } if (vm.SelectedChunks.Count > 0) { if (vm.SelectedChunks.First().data is CBitmapTexture xbm) { if (ImageViewer == null || ImageViewer.IsDisposed) { ImageViewer = new frmImagePreview(); ImageViewer.Show(FormPanel, DockState.Document); } ImageViewer.SetImage(vm.SelectedChunks.First()); } } break; } }
private void PropertyWindow_OnItemsChanged(object sender, EventArgs e) { var args = (e as BrightIdeasSoftware.CellEditEventArgs); if (args != null) { if (args.ListViewItem.Text == "Parent") { chunkList.UpdateList(); } } }
private void PropertyWindow_OnItemsChanged(object sender, EventArgs e) => chunkList.UpdateList();