コード例 #1
0
        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;
            }
        }
コード例 #2
0
ファイル: frmCR2WDocument.cs プロジェクト: DaveCS1/Wolven-kit
        private void PropertyWindow_OnItemsChanged(object sender, EventArgs e)
        {
            var args = (e as BrightIdeasSoftware.CellEditEventArgs);

            if (args != null)
            {
                if (args.ListViewItem.Text == "Parent")
                {
                    chunkList.UpdateList();
                }
            }
        }
コード例 #3
0
ファイル: frmCR2WDocument.cs プロジェクト: sw3dg1n/Wolven-kit
 private void PropertyWindow_OnItemsChanged(object sender, EventArgs e) => chunkList.UpdateList();