Beispiel #1
0
        public Builder(BisFile boot0, BisFile boot1, BisFile bcpkg2_1, BisFile bcpkg2_3)
        {
            this.boot0    = boot0;
            this.boot1    = boot1;
            this.bcpkg2_1 = bcpkg2_1;
            this.bcpkg2_3 = bcpkg2_3;

            bytes = new List <byte>();
        }
Beispiel #2
0
        private void btn_openboot0_Click(object sender, EventArgs e)
        {
            DialogResult result = FileDialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                boot0 = new BisFile(ref FileDialog, BisTypes.BOOT0);
                lbl_boot0_path.Text = boot0.path;
                lbl_boot0_size.Text = $"Size: {boot0.size}";
            }
        }
Beispiel #3
0
        private void btn_openbcpkg2_3_Click(object sender, EventArgs e)
        {
            DialogResult result = FileDialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                bcpkg2_3 = new BisFile(ref FileDialog, BisTypes.BCPKG2_3);
                lbl_bcpkg2_3_path.Text = bcpkg2_3.path;
                lbl_bcpkg2_3_size.Text = $"Size: {bcpkg2_3.size}";
            }
        }
Beispiel #4
0
        static public void Validate(BisFile file, BisTypes type)
        {
            if (file == null)
            {
                throw new Exception($"No {type} has been selected!");
            }

            if (!File.Exists(file.path))
            {
                throw new Exception($"Invalid path for {type}");
            }
        }