Beispiel #1
0
        private void FXStudioForm_Shown(object sender, EventArgs e)
        {
            Configuration appConfig = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);

            bool isShow = true;

            if (appConfig.AppSettings.Settings["show"] != null)
            {
                isShow = bool.Parse(appConfig.AppSettings.Settings["show"].Value);
            }
            else
            {
                appConfig.AppSettings.Settings.Add("show", bool.TrueString);
                appConfig.Save(ConfigurationSaveMode.Modified);
                isShow = true;
            }

            if (isShow)
            {
                StartPageDialog startForm = new StartPageDialog("", m_DefaultLocation);
                if (startForm.ShowDialog(this) == DialogResult.OK)
                {
                    OpenProject(startForm.GetProjectPath());
                }
            }
        }
Beispiel #2
0
        private void toolStripButtonNew_Click(object sender, EventArgs e)
        {
            NewProjectDialog dialog = new NewProjectDialog(m_DefaultLocation);

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                string location = dialog.GetProjectLocation();
                Directory.CreateDirectory(location);
                string projectFile = location + @"\" + dialog.GetProjectName() + @".fxsproj";
                string assetFile   = location + @"\" + dialog.GetProjectName() + @".asset";

                File.WriteAllText(projectFile, XmlUtility.DefaultProjectXml);
                File.WriteAllText(assetFile, XmlUtility.DefaultAssetXml);

                string sourcePath = Directory.GetCurrentDirectory() + @"\Data";
                StartPageDialog.CopyDefaultData(sourcePath, location);

                OpenProject(projectFile);
            }
        }