private void buttonGeneralSettings_Click(object sender, EventArgs e) { GeneralSettingsDialog generalSettingsDialog = new GeneralSettingsDialog(_appSettingsDir, _settings.PicasaExePath); DialogResult result = generalSettingsDialog.ShowDialog(); if (result == DialogResult.OK) { if (generalSettingsDialog.ReturnPicasaSettings != null) { _settings = generalSettingsDialog.ReturnPicasaSettings; // ReFillPicasaDBList(false); } _settings.PicasaExePath = generalSettingsDialog.ReturnPicasaExePath; _appSettingsDir = generalSettingsDialog.ReturnAppSettingsDir; //_VDriveBaseDir = Path.GetDirectoryName(_appSettingsDir); // Initialise all controls on the screen with the proper data ReFillPicasaDBList(false); // Save settings SaveSettings(); // If the saved defaultselectedDB is valid, select it in the list... int defaultSelectedDBIndex = listBoxPicasaDBs.FindStringExact(_settings.picasaDefaultSelectedDB); if (defaultSelectedDBIndex != ListBox.NoMatches) { listBoxPicasaDBs.SelectedIndex = defaultSelectedDBIndex; } saveListIndex = defaultSelectedDBIndex; bool xxx = IOHelper.MapVirtualDrive(_settings.picasaDBs[listBoxPicasaDBs.SelectedIndex], _appSettingsDir); if (xxx) { MessageBox.Show("Error Mapping Virtual Drive" + "\nCheck the Virtual Drive settings and Path."); } } }
private void buttonGeneralSettings_Click(object sender, EventArgs e) { GeneralSettingsDialog generalSettingsDialog = new GeneralSettingsDialog(_appSettingsDir, _settings.PicasaExePath); DialogResult result = generalSettingsDialog.ShowDialog(); if (result == DialogResult.OK) { if (generalSettingsDialog.ReturnPicasaSettings != null) { _settings = generalSettingsDialog.ReturnPicasaSettings; // ReFillPicasaDBList(false); } _settings.PicasaExePath = generalSettingsDialog.ReturnPicasaExePath; _appSettingsDir = generalSettingsDialog.ReturnAppSettingsDir; //_VDriveBaseDir = Path.GetDirectoryName(_appSettingsDir); // Initialise all controls on the screen with the proper data ReFillPicasaDBList(false); // Save settings SaveSettings(); // If the saved defaultselectedDB is valid, select it in the list... int defaultSelectedDBIndex = listBoxPicasaDBs.FindStringExact(_settings.picasaDefaultSelectedDB); if (defaultSelectedDBIndex != ListBox.NoMatches) listBoxPicasaDBs.SelectedIndex = defaultSelectedDBIndex; saveListIndex = defaultSelectedDBIndex; bool xxx = IOHelper.MapVirtualDrive(_settings.picasaDBs[listBoxPicasaDBs.SelectedIndex], _appSettingsDir); if (xxx) { MessageBox.Show("Error Mapping Virtual Drive" + "\nCheck the Virtual Drive settings and Path."); } } }