コード例 #1
0
ファイル: MainWindow.cs プロジェクト: klauscode/crush
        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();
        }
コード例 #2
0
ファイル: MainWindow.cs プロジェクト: klauscode/crush
        private void optionsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OptionsWindow optionsWindow = new OptionsWindow(this);

            if (optionsWindow.ShowDialog() == DialogResult.OK)
            {
                loadTextures();
                GetAudioThemes();
            }
        }
コード例 #3
0
ファイル: MainWindow.cs プロジェクト: John-Chan/crush
        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();
        }
コード例 #4
0
ファイル: MainWindow.cs プロジェクト: John-Chan/crush
 private void optionsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     OptionsWindow optionsWindow = new OptionsWindow(this);
     if(optionsWindow.ShowDialog() == DialogResult.OK)
     {
         loadTextures();
         GetAudioThemes();
     }
 }