public static (List <Section_AHDR> AHDRs, bool overwrite) GetAssets()
        {
            AddMultipleAssets a = new AddMultipleAssets();
            DialogResult      d = a.ShowDialog();

            if (d == DialogResult.OK)
            {
                List <Section_AHDR> AHDRs = new List <Section_AHDR>();

                for (int i = 0; i < a.assetNames.Count; i++)
                {
                    Section_ADBG ADBG = new Section_ADBG(0, a.assetNames[i], "", 0);

                    Section_AHDR AHDR = new Section_AHDR(Functions.BKDRHash(a.assetNames[i]), a.assetType, a.AHDRflags, ADBG, a.assetData[i])
                    {
                        fileSize = a.assetData[i].Length
                    };

                    AHDRs.Add(AHDR);
                }

                return(AHDRs, a.checkBoxOverwrite.Checked);
            }
            return(null, false);
        }
Example #2
0
        public static List <Section_AHDR> GetAssets(out bool success)
        {
            AddMultipleAssets a = new AddMultipleAssets();
            DialogResult      d = a.ShowDialog();

            if (d == DialogResult.OK)
            {
                List <Section_AHDR> AHDRs = new List <Section_AHDR>();

                for (int i = 0; i < a.assetNames.Count; i++)
                {
                    Section_ADBG ADBG = new Section_ADBG(0, a.assetNames[i], "", 0);

                    Section_AHDR AHDR = new Section_AHDR(Functions.BKDRHash(a.assetNames[i]), a.assetType, a.AHDRflags, ADBG, a.assetData[i])
                    {
                        fileSize = a.assetData[i].Length
                    };

                    AHDRs.Add(AHDR);
                }

                success = true;
                return(AHDRs);
            }
            else
            {
                success = false;
                return(null);
            }
        }