Exemplo n.º 1
0
        public async Task <bool> LoadROM()
        {
            var mgr = new RomManager(openrompath, lvlmgr);

            if (mgr.CheckROM())
            {
                openrom             = mgr;
                LabelX_Romfile.Text = System.IO.Path.GetFileName(mgr.RomFile);
                Enabled             = false;
                CircularProgress1.Start();
                await Task.Run(() => mgr.LoadLevels());

                CircularProgress1.Stop();
                Enabled = true;
                LoadLevels();
                return(true);
            }
            else
            {
                MessageBoxEx.Show("This ROM can't be used.", "Invalid ROM file", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(false);
            }
        }