private void setDirectoryToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var guiPopup = new DirPopup(m_parent);

            guiPopup.ShowDialog();
            OpenFile.InitialDirectory = Editor.Settings.AssetDirPath;
        }
        private void MainWindow_Shown(object sender, EventArgs e)
        {
            Text = m_parent.Name + " v" + m_parent.Version;

            if (Editor.Settings.AssetDirPath == null)
            {
                // Try to auto-find directory
                string path = (string)Registry.GetValue(
                    @"HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 211820",
                    "InstallLocation", null);

                // If found
                if (path != null)
                {
                    path = Path.Combine(path, "assets");
                    Editor.Settings.AssetDirPath = path;
                }
                // Otherwise prompt the user
                else
                {
                    MessageBox.Show(
                        "Could not find Starbound folder. Please navigate to Starbound's assets directory on the next screen.");

                    DirPopup guiPopup = new DirPopup(m_parent);
                    guiPopup.ShowDialog();
                }
            }

            m_parent.SaveSettings();
            OpenFile.InitialDirectory = Editor.Settings.AssetDirPath;
            MainPictureBox.Focus();
        }
Example #3
0
 private void setDirectoryToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var guiPopup = new DirPopup(m_parent);
     guiPopup.ShowDialog();      // What is going on here???
     OpenFileDlg.InitialDirectory = Editor.Editor.Settings.AssetDirPath;
 }
Example #4
0
        private void MainWindow_Shown(object sender, EventArgs e)
        {
            Text = m_parent.Name + " v" + m_parent.Version;

            if (Editor.Editor.Settings.AssetDirPath == null)
            {
                // Try to auto-find directory
                string path = (string)Registry.GetValue(
                    @"HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 211820",
                    "InstallLocation", null);

                // If found
                if (path != null)
                {
                    path = Path.Combine(path, "assets");
                    Editor.Editor.Settings.AssetDirPath = path;
                }
                // Otherwise prompt the user
                else
                {
                    MessageBox.Show(
                        "Could not find Starbound folder. Please navigate to Starbound's assets directory on the next screen.");

                    DirPopup guiPopup = new DirPopup(m_parent);
                    guiPopup.ShowDialog();
                }
            }

            m_parent.SaveSettings();
            OpenFileDlg.InitialDirectory = Editor.Editor.Settings.AssetDirPath;
            MainPictureBox.Focus();
        }