534 {
535 audioPlaybackPanel1.TargetSource = null;
536 animEditControl.TargetSequence = null;
537 texAnimEditControl.TargetSequence = null;
538 shpAnimEditControl.TargetSequence = null;
539 attributeGrid1.
Clear();
540 articleAttributeGrid.TargetNode = null;
541 offsetEditor1.TargetNode = null;
542 msBinEditor1.CurrentNode = null;
543
544 movesetEditor1.TargetNode = null;
545 attributeControl.TargetNode = null;
546 clrControl.ColorSource = null;
547 visEditor.TargetNode = null;
548 scN0CameraEditControl1.TargetSequence = null;
549 scN0LightEditControl1.TargetSequence = null;
550 scN0FogEditControl1.TargetSequence = null;
551 texCoordControl1.TargetNode = null;
552 ppcDisassembler1.
SetTarget(
null, 0,
null);
555 hexBox1.Visible = false;
557
558 Control newControl = null;
559 Control newControl2 = null;
560
563 bool disable2nd = false;
564 if (!(sender?.ToString().Equals("Saving File") ?? false) &&
566 (node = (w = b).Resource) != null)
567 {
568 Action setScrollOffset = null;
570 {
572 {
573 if (c.GetType().Name == "PropertyGridView")
574 {
575 object scrollOffset = c.GetType().GetMethod("GetScrollOffset").Invoke(c, null);
576 setScrollOffset = () =>
577 c.GetType().GetMethod("SetScrollOffset").Invoke(c, new[] {scrollOffset});
578 break;
579 }
580 }
581 }
582 else
583 {
585 {
586 if (c.GetType().Name == "PropertyGridView")
587 {
588 setScrollOffset = () =>
589 c.GetType().GetMethod("SetScrollOffset").Invoke(c, new object[] {0});
590 setScrollOffset?.Invoke();
591 break;
592 }
593 }
594 }
595
596 propertyGrid1.SelectedObject = node;
597 setScrollOffset?.Invoke();
598
600 {
601 if (d.IsValid())
602 {
604 (byte*) d.GetAddress(),
605 d.GetLength(),
606 d.GetLength(),
607 FileAccess.ReadWrite))
608 {_supportsInsDel = false};
609 newControl = hexBox1;
610 }
611 }
612#if DEBUG
614 {
619 FileAccess.ReadWrite))
620 {_supportsInsDel = false};
621 newControl = hexBox1;
622 }
623#endif
625 {
627 newControl = rsarGroupEditor;
628 }
630 {
632 newControl = ppcDisassembler1;
633 }
634 else if (node is
IVideo video)
635 {
636 videoPlaybackPanel1.TargetSource = video;
637 newControl = videoPlaybackPanel1;
638 }
640 {
641 newControl = texCoordControl1;
642 }
644 {
645 newControl = mdL0ObjectControl1;
646 }
648 {
649 msBinEditor1.CurrentNode = binNode;
650 newControl = msBinEditor1;
651 }
653 {
654 animEditControl.TargetSequence = chr0EntryNode;
655 newControl = animEditControl;
656 }
658 {
659 texAnimEditControl.TargetSequence = textureNode;
660 newControl = texAnimEditControl;
661 }
663 {
664 shpAnimEditControl.TargetSequence = setNode;
665 newControl = shpAnimEditControl;
666 }
668 {
669 soundPackControl1.TargetNode = rsarNode;
670 newControl = soundPackControl1;
671 }
673 {
674 visEditor.TargetNode = entryNode;
675 newControl = visEditor;
676 }
678 {
679 movesetEditor1.TargetNode = actionNode;
680 newControl = movesetEditor1;
681 }
683 {
684 offsetEditor1.TargetNode = offsetNode;
685 newControl = offsetEditor1;
686 }
688 {
689
690
691
692 eventDescription1.
SetTarget(eventNode.EventInfo, -1);
693 newControl = eventDescription1;
694 }
696 {
697
698
699
702 newControl = eventDescription1;
703 }
705 {
706 attributeControl.TargetNode = attributeNode;
707 newControl = attributeControl;
708 }
710 {
711 articleAttributeGrid.TargetNode = paramNode;
712 newControl = articleAttributeGrid;
713 }
715 {
716 scN0CameraEditControl1.TargetSequence = cameraNode;
717 newControl = scN0CameraEditControl1;
718 }
720 {
721 scN0LightEditControl1.TargetSequence = lightNode;
722 newControl = scN0LightEditControl1;
723 disable2nd = true;
724 }
726 {
727 scN0FogEditControl1.TargetSequence = fogNode;
728 newControl = scN0FogEditControl1;
729 disable2nd = true;
730 }
732 {
733 audioPlaybackPanel1.TargetSource = audioSource;
735 if (sources != null && sources.Length > 0 && sources[0] != null)
736 {
737 newControl = audioPlaybackPanel1;
738 }
739 }
741 {
742 attributeGrid1.
AddRange(table.GetPossibleInterpretations());
743 attributeGrid1.TargetNode = table;
744 newControl = attributeGrid1;
745 }
747 {
748 aslIndicator1.TargetNode = aslsEntry;
749 newControl = aslIndicator1;
750 }
756 {
759 newControl = null;
760 }
762 previewPanel2.RenderingTarget = i;
763 newControl = previewPanel2;
764 }
765
767 {
768 clrControl.ColorSource = source;
769 if (source.ColorCount(0) > 0)
770 {
771 if (newControl != null)
772 {
773 newControl2 = clrControl;
774 }
775 else
776 {
777 newControl = clrControl;
778 }
779 }
780 }
781#if DEBUG
783#else
785#endif
786 {
788 {
793 FileAccess.ReadWrite))
794 {_supportsInsDel = false};
795 newControl = hexBox1;
796 }
797 }
798
799 _enableEditMenu(this, null);
800 }
801 else
802 {
803 propertyGrid1.SelectedObject = null;
804 try
805 {
806 editToolStripMenuItem.DropDown = null;
807 }
808 catch
809 {
810
811 }
812
813 editToolStripMenuItem.Enabled = false;
814 }
815
816 if (_secondaryControl != newControl2)
817 {
818 if (_secondaryControl != null)
819 {
820 _secondaryControl.Dock = DockStyle.Fill;
821 _secondaryControl.Visible = false;
822 }
823
824 _secondaryControl = newControl2;
825 if (_secondaryControl != null)
826 {
827 _secondaryControl.Dock = DockStyle.Right;
828 _secondaryControl.Visible = true;
829 _secondaryControl.Width = 340;
830 }
831 }
832
834 {
836 {
837 _currentControl.Visible = false;
838 }
839
842 {
843 _currentControl.Visible = true;
844 }
845 }
847 {
848 _currentControl.Visible = true;
849 }
850
852 {
853 if (_secondaryControl != null)
854 {
855 _currentControl.Width = splitContainer2.Panel2.Width - _secondaryControl.Width;
856 }
857
858 _currentControl.Dock = DockStyle.Fill;
859 }
860
862 {
864 {
866 }
867 }
869 {
871 }
872
874 }
bool ShowHex
Definition: MainForm.cs:372
PropertyGrid propertyGrid1
Definition: MainForm.cs:2433
bool CompatibilityMode
Definition: MainForm.cs:387
Control _currentControl
Definition: MainForm.cs:529
new TreeNode SelectedNode
Definition: ResourceTree.cs:43
IAudioSource TargetSource
Definition: AudioPlaybackPanel.cs:227
Implements a fully editable byte provider for file data of any size.
Definition: DynamicFileByteProvider.cs:14
IByteProvider ByteProvider
Gets or sets the ByteProvider.
Definition: HexBox.cs:4264
Definition: MDL0ObjectControl.cs:11
bool SetTarget(MDL0ObjectNode o)
Definition: MDL0ObjectControl.cs:38
void ClearAll()
Definition: ModelPanel.cs:122
void Clear()
Definition: MultipleInterpretationAttributeGrid.cs:86
void AddRange(IEnumerable< AttributeInterpretation > arrs)
Definition: MultipleInterpretationAttributeGrid.cs:69
void SetTarget(RELMethodNode node)
Definition: PowerPcDisassembler.cs:20
ResourceNode RedirectNode
Definition: ARCNode.cs:1026
int NumTriangles
Definition: BRRESNode.cs:129
Definition: CHR0Node.cs:909
Definition: MDL0MaterialRefNode.cs:17
Definition: MDL0ObjectNode.cs:21
Definition: MSBinNode.cs:9
Definition: MoveDefActionNode.cs:59
Definition: DataAttributeNode.cs:8
Definition: ActionEventNode.cs:11
Definition: EventParameterNodes.cs:474
Definition: EventParameterNodes.cs:12
Definition: SectionParamsNode.cs:9
Definition: ASLSNode.cs:78
Definition: RELMiscNodes.cs:12
Definition: RELMethodNode.cs:8
Definition: RELNode.cs:17
Definition: RSARGroupNode.cs:9
Definition: RSARNode.cs:15
ResourceNode Parent
Definition: ResourceNode.cs:245
int Index
Definition: ResourceNode.cs:301
DataSource WorkingUncompressed
Definition: ResourceNode.cs:183
Definition: SCN0CameraNode.cs:12
Definition: SCN0FogNode.cs:13
Definition: SCN0LightNode.cs:14
Definition: SHP0Node.cs:695
Definition: SRT0Node.cs:707
Definition: VIS0Node.cs:431
Definition: IColorSource.cs:4
Definition: IImageSource.cs:7
int ImageCount
Definition: IImageSource.cs:8
Definition: IImageSource.cs:13
Definition: IAudioSource.cs:4
IAudioStream[] CreateStreams()
Definition: IAudioStream.cs:6
List< DrawCallBase > DrawCalls
Definition: IRenderedObject.cs:43
int NumEntries
The number of (four-byte) entries - i.e. the length in bytes divided by four.
Definition: IAttributeList.cs:12
Definition: RawDataNode.cs:9
Definition: IAttributeList.cs:34
int Length
Definition: ResourceNode.cs:32
VoidPtr Address
Definition: ResourceNode.cs:31