private void LoadImages() { try { ImageFolderDialog.SelectedPath = Properties.Settings.Default.WorkingFolder; DialogResult dr = ImageFolderDialog.ShowDialog(); if (dr == DialogResult.OK) { imageOperations.DirectoryPath = ImageFolderDialog.SelectedPath; imageOperations.LoadImages(); GridViewImages.DataSource = imageOperations.BindableFileContainer; previewDecodedImage(); } } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
private void CheckWorkingFoldersConfiguration() { if (string.IsNullOrEmpty(Properties.Settings.Default.WorkingFolder)) { MessageBox.Show("Game folder path not set, pick Lost Technology folder", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); DialogResult dr = ImageFolderDialog.ShowDialog(); if (dr == DialogResult.OK) { Properties.Settings.Default.WorkingFolder = ImageFolderDialog.SelectedPath; Properties.Settings.Default.Save(); } } if (string.IsNullOrEmpty(Properties.Settings.Default.DecodedFolder)) { MessageBox.Show("Decoded ouput folder not set, please set the decoded image output folder", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); DialogResult dr = ImageFolderDialog.ShowDialog(); if (dr == DialogResult.OK) { Properties.Settings.Default.DecodedFolder = ImageFolderDialog.SelectedPath; Properties.Settings.Default.Save(); } } if (string.IsNullOrEmpty(Properties.Settings.Default.EncodedFolder)) { MessageBox.Show("Encoded ouput folder not set, please set the encoded image output folder", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); DialogResult dr = ImageFolderDialog.ShowDialog(); if (dr == DialogResult.OK) { Properties.Settings.Default.EncodedFolder = ImageFolderDialog.SelectedPath; Properties.Settings.Default.Save(); } } }