Beispiel #1
0
        private void CompareSaves()
        {
            var p1 = TB_OldSAV.Text;
            var p2 = TB_NewSAV.Text;

            var f1 = new FileInfo(p1);

            if (!SaveUtil.IsSizeValid((int)f1.Length))
            {
                return;
            }
            var f2 = new FileInfo(p1);

            if (!SaveUtil.IsSizeValid((int)f2.Length))
            {
                return;
            }

            var s1 = SaveUtil.GetVariantSAV(p1);

            if (!(s1 is SAV8SWSH w1))
            {
                return;
            }
            var s2 = SaveUtil.GetVariantSAV(p2);

            if (!(s2 is SAV8SWSH w2))
            {
                return;
            }

            var compare = new SCBlockCompare(w1, w2);

            richTextBox1.Lines = compare.Summary().ToArray();
        }
    private void CompareSaves()
    {
        var p1 = TB_OldSAV.Text;
        var p2 = TB_NewSAV.Text;

        var f1 = new FileInfo(p1);

        if (!SaveUtil.IsSizeValid((int)f1.Length))
        {
            return;
        }
        var f2 = new FileInfo(p1);

        if (!SaveUtil.IsSizeValid((int)f2.Length))
        {
            return;
        }

        var s1 = SaveUtil.GetVariantSAV(p1);

        if (s1 is not ISCBlockArray w1)
        {
            return;
        }
        var s2 = SaveUtil.GetVariantSAV(p2);

        if (s2 is not ISCBlockArray w2)
        {
            return;
        }

        // Get an external source of names if available.
        var extra   = GetExtraKeyNames(w1);
        var compare = new SCBlockCompare(w1.Accessor, w2.Accessor, extra);

        richTextBox1.Lines = compare.Summary().ToArray();
    }