void extractSettingsFrom(Settings s) { try { ThumbnailMonitorContext context = s.ActiveMonitorContext; keepOriginalSizeCheckSize.Checked = context.KeepOriginalSize; targetFilePathBox.SelectedPath = context.MonitorTargetPath; thumbnailSizeWidthBox.Value = context.ThumbnailSize.Width; thumbnailSizeHeightBox.Value = context.ThumbnailSize.Height; showAspect(); keepAspectCheckBox.Checked = context.KeepAspect; highQuarityCheckBox.Checked = context.HighQuality; postResizeMethodComboBox.SelectedIndex = NamedObject<PostResizeMethod>.GetIndexByValue(postResizeMethodComboBox, context.PostResizeMethod); backgroundColorBox.SelectedColor = Color.FromArgb(context.BackgroundColorARGB); outputDirectoryPathBox.SelectedPath = context.OutputPath; outputFileNameFormatBox.Text = context.OutputFilenameFormat; outputFileNameStartNumberBox.Value = context.FilenameNextNumber; outputImageFormat.SelectedIndex = NamedString.GetIndexByValue(outputImageFormat, context.OutputFileExtension); } catch (Exception ex) { Console.WriteLine("設定の展開に失敗しました : " + ex.Message); } }
public void CopyTo(Settings target) { this.ActiveMonitorContext.CopyTo(target.ActiveMonitorContext); this.AnimeGifSettings.CopyTo(target.AnimeGifSettings); }