private void LoadHexFile(bool ResetMemory) { OpenFileDialog dialog = new OpenFileDialog { Filter = "Hex Filed|*.hex", CheckFileExists = true }; if (dialog.ShowDialog() == DialogResult.OK) { debugWindow.Close(); memoryWindow.Close(); if (ResetMemory) { system = FoenixSystem.Current; AddGPUControl(system.GPU); } system.SetKernel(dialog.FileName); system.ResetCPU(ResetMemory); ShowDebugWindow(); ShowMemoryWindow(); if (tileEditor != null && tileEditor.Visible) { tileEditor.SetMemory(system.MemoryManager); } } }
/* * Read a Foenix XML file */ private void LoadFNXMLFileToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog dialog = new OpenFileDialog { Title = "Load Project File", Filter = "Foenix Project File|*.fnxml", CheckFileExists = true }; if (dialog.ShowDialog() == DialogResult.OK) { debugWindow.Close(); memoryWindow.Close(); system = FoenixSystem.Current; system.Resources = ResChecker; system.Breakpoints = CPUWindow.Instance.breakpoints; system.SetKernel(dialog.FileName); system.ResetCPU(true); ShowDebugWindow(); ShowMemoryWindow(); } }