예제 #1
0
 public DialogResult EditImageCompareCharacters(string name, string text)
 {
     using (var formVobSubEditCharacters = new VobSubEditCharacters(comboBoxCharacterDatabase.SelectedItem.ToString(), null, _binaryOcrDb))
     {
         formVobSubEditCharacters.Initialize(name, text);
         DialogResult result = formVobSubEditCharacters.ShowDialog();
         if (result == DialogResult.OK)
         {
             if (_binaryOcrDb != null)
             {
                 _binaryOcrDb.Save();
             }
             else
             {
                 _compareDoc = formVobSubEditCharacters.ImageCompareDocument;
                 string path = Configuration.VobSubCompareFolder + comboBoxCharacterDatabase.SelectedItem + Path.DirectorySeparatorChar;
                 _compareDoc.Save(path + "Images.xml");
                 Cursor = Cursors.WaitCursor;
                 if (formVobSubEditCharacters.ChangesMade)
                     _binaryOcrDb.LoadCompareImages();
                 Cursor = Cursors.Default;
             }
             return result;
         }
         Cursor = Cursors.WaitCursor;
         if (formVobSubEditCharacters.ChangesMade)
             _binaryOcrDb.LoadCompareImages();
         Cursor = Cursors.Default;
         return result;
     }
 }
예제 #2
0
        public DialogResult EditImageCompareCharacters(string name, string text)
        {
            var formVobSubEditCharacters = new VobSubEditCharacters(comboBoxCharacterDatabase.SelectedItem.ToString(), null);
            formVobSubEditCharacters.Initialize(name, text);

            DialogResult result = formVobSubEditCharacters.ShowDialog();
            if (result == DialogResult.OK)
            {
                _compareDoc = formVobSubEditCharacters.ImageCompareDocument;
                string path = Configuration.VobSubCompareFolder + comboBoxCharacterDatabase.SelectedItem + Path.DirectorySeparatorChar;
                _compareDoc.Save(path + "Images.xml");
            }
            Cursor = Cursors.WaitCursor;
            LoadImageCompareBitmaps();
            Cursor = Cursors.Default;
            return result;
        }