Ejemplo n.º 1
0
        public bool AddAnimation(string FileName, bool DoPlayAcusticSignal, string ExtraSoundFilename)
        {
            bool flag = false;

            if (File.Exists(FileName))
            {
                try
                {
                    Mci mci2 = new Mci();
                    mci2.Open(FileName);
                    int length = mci2.Length;
                    if (mci2.IsOpen)
                    {
                        mci2.Close();
                    }
                    mci2.Dispose();
                    _parts.Add(new Sequence.SequencePart(FileName, (long)length, 0, DoPlayAcusticSignal, ExtraSoundFilename, false));
                    flag = true;
                }
                catch
                {
                    flag = false;
                }
            }
            return(flag);
        }
Ejemplo n.º 2
0
 public void HideGraphic()
 {
     if (_mci_timer != null)
     {
         _mci_timer.Stop();
         _mci_timer.Tick -= new EventHandler(_mci_timer_Tick);
     }
     if (_mci != null)
     {
         try
         {
             _mci.Stop();
         }
         catch
         {
         }
         if (_mci.IsOpen)
         {
             try
             {
                 _mci.Close();
             }
             catch
             {
             }
         }
         try
         {
             _mci.Dispose();
         }
         catch
         {
         }
         _mci = (Mci)null;
     }
     if (pictureBox1 == null)
     {
         return;
     }
     if (_my_effect != null)
     {
         while (_my_effect.ThreadActive)
         {
             Application.DoEvents();
         }
     }
     hidePictureBoxAsync(pictureBox1);
 }