public MainWindow() { InitializeComponent(); WindowState = FormWindowState.Maximized; //generate default data for selected sprite so it won't get all //borked when there are no sprite sheets to load / missing m_selectedFrame.largeImage = defaultImage(); m_selectedFrame.smallImage = defaultImage(); m_textureDirectory = RegKey.read("texture_directory"); if (m_textureDirectory == null || !Directory.Exists(m_textureDirectory)) { if (MessageBox.Show("No valid texture path found. Click OK to browse\n or Cancel to continue (textures will be unavailable)", "Warning", MessageBoxButtons.OKCancel) == DialogResult.OK) { OptionsWindow ow = new OptionsWindow(this); ow.ShowDialog(); } } else { m_atlasTextureDirectory = m_textureDirectory + "\\atlases"; loadTextures(); } m_mapTextureDirectory = m_textureDirectory + "\\map"; InitPreview(); }
private void optionsToolStripMenuItem_Click(object sender, EventArgs e) { OptionsWindow optionsWindow = new OptionsWindow(this); if (optionsWindow.ShowDialog() == DialogResult.OK) { loadTextures(); GetAudioThemes(); } }
public MainWindow() { InitializeComponent(); WindowState = FormWindowState.Maximized; //generate default data for selected sprite so it won't get all //borked when there are no sprite sheets to load / missing m_selectedFrame.largeImage = defaultImage(); m_selectedFrame.smallImage = defaultImage(); m_textureDirectory = RegKey.read("texture_directory"); if(m_textureDirectory == null || !Directory.Exists(m_textureDirectory)) { if(MessageBox.Show("No valid texture path found. Click OK to browse\n or Cancel to continue (textures will be unavailable)", "Warning", MessageBoxButtons.OKCancel) == DialogResult.OK) { OptionsWindow ow = new OptionsWindow(this); ow.ShowDialog(); } } else { m_atlasTextureDirectory = m_textureDirectory + "\\atlases"; loadTextures(); } m_mapTextureDirectory = m_textureDirectory + "\\map"; InitPreview(); }
private void optionsToolStripMenuItem_Click(object sender, EventArgs e) { OptionsWindow optionsWindow = new OptionsWindow(this); if(optionsWindow.ShowDialog() == DialogResult.OK) { loadTextures(); GetAudioThemes(); } }