public SAV_BlockDump8(ISCBlockArray sav)
    {
        InitializeComponent();
        WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage);
        SAV = sav;

        PG_BlockView.Size = RTB_Hex.Size;

        // Get an external source of names if available.
        var extra = GetExtraKeyNames(sav);

        Metadata = new SCBlockMetadata(SAV.Accessor, extra, Main.Settings.Advanced.GetExclusionList8());

        CB_Key.InitializeBinding();
        CB_Key.DataSource = Metadata.GetSortedBlockKeyList().ToArray();

        CB_TypeToggle.InitializeBinding();
        CB_TypeToggle.DataSource = new[]
        {
            new ComboItem(nameof(SCTypeCode.Bool1), (int)SCTypeCode.Bool1),
            new ComboItem(nameof(SCTypeCode.Bool2), (int)SCTypeCode.Bool2),
        };
        CB_TypeToggle.SelectedIndexChanged += CB_TypeToggle_SelectedIndexChanged;

        CB_Key.SelectedIndex = 0;
    }
Exemple #2
0
        public SAV_BlockDump8(SaveFile sav)
        {
            InitializeComponent();
            WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage);
            SAV = (SAV8SWSH)sav;

            PG_BlockView.Size = RTB_Hex.Size;

            Metadata = new SCBlockMetadata(SAV.Blocks);

            CB_Key.InitializeBinding();
            CB_Key.DataSource = Metadata.GetSortedBlockKeyList().ToArray();

            var boolToggle = new[]
            {
                new ComboItem(nameof(SCTypeCode.Bool1), (int)SCTypeCode.Bool1),
                new ComboItem(nameof(SCTypeCode.Bool2), (int)SCTypeCode.Bool2),
                new ComboItem(nameof(SCTypeCode.Bool3), (int)SCTypeCode.Bool3),
            };

            CB_TypeToggle.InitializeBinding();
            CB_TypeToggle.DataSource = boolToggle;

            CB_TypeToggle.SelectedIndexChanged += CB_TypeToggle_SelectedIndexChanged;
        }
Exemple #3
0
        public SAV_BlockDump8(SaveFile sav)
        {
            InitializeComponent();
            WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage);
            SAV = (SAV8SWSH)sav;

            var blocks = SAV.AllBlocks.Select((z, i) => new ComboItem($"{z.Key:X8} - {i:0000} {(z.Type.IsBoolean() ? "Bool" : z.Type.ToString())}", (int)z.Key));

            CB_Key.InitializeBinding();
            CB_Key.DataSource = blocks.ToArray();

            var boolToggle = new[]
            {
                new ComboItem(nameof(SCTypeCode.Bool1), (int)SCTypeCode.Bool1),
                new ComboItem(nameof(SCTypeCode.Bool2), (int)SCTypeCode.Bool2),
                new ComboItem(nameof(SCTypeCode.Bool3), (int)SCTypeCode.Bool3),
            };

            CB_TypeToggle.InitializeBinding();
            CB_TypeToggle.DataSource = boolToggle;
        }
        public SAV_BlockDump8(SaveFile sav)
        {
            InitializeComponent();
            WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage);
            SAV = (SAV8SWSH)sav;

            PG_BlockView.Size = RTB_Hex.Size;

            // Get an external source of names if available.
            var extra = GetExtraKeyNames();

            Metadata = new SCBlockMetadata(SAV.Blocks, extra);

            CB_Key.InitializeBinding();
            CB_Key.DataSource = Metadata.GetSortedBlockKeyList().ToArray();

            ComboItem[] boolToggle =
            {
                new(nameof(SCTypeCode.Bool1), (int)SCTypeCode.Bool1),
                new(nameof(SCTypeCode.Bool2), (int)SCTypeCode.Bool2),
                new(nameof(SCTypeCode.Bool3), (int)SCTypeCode.Bool3),
            };