Exemplo n.º 1
0
        private void cmdNewCinarSolution(string arg)
        {
            if (Solution != null && Solution.Modified)
            {
                DialogResult dr = MessageBox.Show("Would you like to save current project: \n\n" + Solution.FullPath, "Cinar Database Tools", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
                if (dr == DialogResult.Yes)
                    Solution.Save();
                else if (dr == DialogResult.Cancel)
                    return;
            }

            FolderBrowserDialog fbd = new FolderBrowserDialog();
            fbd.Description = "Select root folder for the new solution";
            if (fbd.ShowDialog() == DialogResult.OK)
            {
                Solution s = new Solution();
                s.Name = Path.GetFileNameWithoutExtension(fbd.SelectedPath);
                s.FullPath = fbd.SelectedPath + "\\" + s.Name + ".cgs";
                s.Save();

                openProject(s.FullPath);
            }
        }