Exemplo n.º 1
0
 private void loadNewPics(string[] fileNames)
 {
     if (fileNames.Length == 1)
     {
         this.UseWaitCursor = true;
         openPicFile(fileNames[0]);
         renderPictureBoxImage();
         this.UseWaitCursor = false;
     }
     else
     {
         LipSyncMultiPicSelect _mps = new LipSyncMultiPicSelect();
         _mps.DropFileNames        = fileNames;
         _mps.CurrentMappings      = _pictureBitmaps;
         _mps.CurrentPhonemeString = CurrentPhonemeString;
         var parent = System.Windows.Forms.Application.OpenForms.Cast <Form>()
                      .FirstOrDefault(x => x.Name.Equals("LipSyncMapMatrixEditor"));
         DialogResult result = _mps.ShowDialog(parent);
         if (DialogResult.OK == result)
         {
             this.UseWaitCursor = true;
             Dictionary <string, string> files = _mps.PicMappings;
             foreach (KeyValuePair <string, string> kvp in files)
             {
                 if (string.Compare(kvp.Value, "!") == 0)
                 {
                     clearPicImage(kvp.Key);
                 }
                 else
                 {
                     openPicFile(kvp.Value, kvp.Key);
                 }
             }
             renderPictureBoxImage();
             this.UseWaitCursor = false;
         }
     }
 }
Exemplo n.º 2
0
 private void loadNewPics(string[] fileNames)
 {
     if (fileNames.Length == 1)
     {
         this.UseWaitCursor = true;
         openPicFile(fileNames[0]);
         renderPictureBoxImage();
         this.UseWaitCursor = false;
     }
     else
     {
         LipSyncMultiPicSelect _mps = new LipSyncMultiPicSelect();
         _mps.DropFileNames        = fileNames;
         _mps.CurrentMappings      = _pictureBitmaps;
         _mps.CurrentPhonemeString = CurrentPhonemeString;
         DialogResult result = _mps.ShowDialog();
         if (DialogResult.OK == result)
         {
             this.UseWaitCursor = true;
             Dictionary <string, string> files = _mps.PicMappings;
             foreach (KeyValuePair <string, string> kvp in files)
             {
                 if (string.Compare(kvp.Value, "!") == 0)
                 {
                     clearPicImage(kvp.Key);
                 }
                 else
                 {
                     openPicFile(kvp.Value, kvp.Key);
                 }
             }
             renderPictureBoxImage();
             this.UseWaitCursor = false;
         }
     }
 }