Exemple #1
0
        private void OpenImporterForm(bool showErrors)
        {
            if (!Directory.Exists(SelectedPath))
            {
                if (showErrors)
                {
                    MessageBox.Show(Resources.FileBrowser_OpenImporterForm_No_valid_path_selected);
                }
                return;
            }
            if (!PathCollection.Contains(SelectedPath))
            {
                PathCollection.Add(SelectedPath);
            }

            FormLoad formLoad = _scope.Resolve <FormLoad>();

            formLoad.SetBasePath(SelectedPath);
            formLoad.ShowDialog(this);
            formLoad.Dispose();

            if (_applicationSettingsService.Settings.EnableAutoLoadFunctionFromMenu)
            {
                _applicationSettingsService.Settings.LastFolderLocation = SelectedPath;
                _applicationSettingsService.SaveSettings();
            }

            if (_imageLoaderService.ImageReferenceList != null)
            {
                dataGridViewLoadedImages.DataSource = GetSortableBindingSource();
            }
            DelayOperation.DelayAction(delegate { _enableLoadFormOnEnterKey = true; }, 2000);
        }
        private void autoLoadPreviousFolderToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var formLoad = new FormLoad(_imageLoaderService, _interactionService);

            formLoad.SetBasePath(_applicationSettingsService.Settings.LastFolderLocation);
            formLoad.ShowDialog(this);
        }