private void GetOption(ConvertOption option)
 {
     Option = option;
     folderFormatTextBox.Text = string.IsNullOrWhiteSpace(option.FolderFormat) ? Thread.TitleFormat : option.FolderFormat;
     overWriteRadioButton.Checked = (option.ImageSaveMode == ImageSaveMode.OverWrite);
     otherNameRadioButton.Checked = (option.ImageSaveMode == ImageSaveMode.ChangeName);
 }
 public ConvertOptionEditForm(ConvertOption option)
 {
     InitializeComponent();
     for (int i = 1; i < Thread.FormatNamePairs.Length; i += 2)
     {
         formatComboBox.Items.Add(Thread.FormatNamePairs[i]);
     }
     formatComboBox.SelectedIndex = 0;
     GetOption(option);
 }
Пример #3
0
 public static void ConvertAll(Jane2ch target, ConvertOption option, Action<int,string> callback)
 {
     target.ForEachImageCache((cache, parcent,processText) =>
         {
             using (FileStream file = new FileStream(option.GetSavePath(cache), FileMode.Create))
             {
                 file.Write(cache.Data, 0, cache.Data.Length);
             }
             callback(parcent,processText);
         });
 }
Пример #4
0
 private void optionButton_Click(object sender, EventArgs e)
 {
     ConvertOptionEditForm editor = new ConvertOptionEditForm(option);
     if (editor.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         option = editor.Option;
     }
 }