Bloom.Program.ChooseAnotherProject C# (CSharp) Method

ChooseAnotherProject() static private method

static private ChooseAnotherProject ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        static void ChooseAnotherProject(object sender, EventArgs e)
        {
            Application.Idle -= ChooseAnotherProject;

            if (_splashForm != null)
                CloseSplashScreen();

            while (true)
            {
                // We decided to stop doing this (BL-1229) since the wizard can feel like part
                // of installation that might be irrevocable.
                ////If it looks like the 1st time, put up the create collection with the welcome.
                ////The user can cancel that if they want to go looking for a collection on disk.
                //if(Settings.Default.MruProjects.Latest == null)
                //{
                //	var path = NewCollectionWizard.CreateNewCollection();
                //	if (!string.IsNullOrEmpty(path) && RobustFile.Exists(path))
                //	{
                //		OpenCollection(path);
                //		return;
                //	}
                //}

                using (var dlg = _applicationContainer.OpenAndCreateCollectionDialog())
                {
                    dlg.StartPosition = FormStartPosition.Manual; // try not to have it under the splash screen
                    dlg.SetDesktopLocation(50,50);
                    if (dlg.ShowDialog() != DialogResult.OK)
                    {
                        Application.Exit();
                        return;
                    }

                    if (OpenCollection(dlg.SelectedPath)) return;
                }
            }
        }