Example #1
0
        /// ------------------------------------------------------------------------------------
        static void ChooseAnotherProject(object sender, EventArgs e)
        {
            Application.Idle -= ChooseAnotherProject;

            while (true)
            {
                //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) && File.Exists(path))
                    {
                        OpenCollection(path);
                        return;
                    }
                }

                using (var dlg = _applicationContainer.OpenAndCreateCollectionDialog())
                {
                    if (dlg.ShowDialog() != DialogResult.OK)
                    {
                        Application.Exit();
                        return;
                    }

                    if (OpenCollection(dlg.SelectedPath))
                    {
                        return;
                    }
                }
            }
        }
Example #2
0
        public void RunWithWelcome()
        {
            Application.EnableVisualStyles();

            Browser.SetUpXulRunner();
            using (var dlg = new NewCollectionWizard(true))
            {
                dlg.ShowDialog();
            }
        }
        public OpenAndCreateCollectionDialog(MostRecentPathsList mruList)
        {
            InitializeComponent();
            //_welcomeControl.TemplateLabel.ForeColor = Color.FromArgb(0x61, 0x94, 0x38);//0xa0, 0x3c, 0x50);
            _openAndCreateControl.TemplateButton.Image     = Resources.library32x32;
            _openAndCreateControl.TemplateButton.Image.Tag = "testfrombloom";

            _openAndCreateControl.Init(mruList,
                                       LocalizationManager.GetString("OpenCreateNewCollectionsDialog.Bloom Collections", "Bloom Collections", "This shows in the file-open dialog that you use to open a different bloom collection") + @"|*.bloomLibrary;*.bloomCollection",
                                       () => NewCollectionWizard.CreateNewCollection());

            _openAndCreateControl.DoneChoosingOrCreatingLibrary += (x, y) =>
            {
                DialogResult = DialogResult.OK;
                Close();
            };
        }