Exemplo n.º 1
0
 private void soundLabel_MouseUp(object sender, MouseEventArgs e)
 {
     try
     {
         if (soundDraggingItem != null)
         {
             if (soundDraggingPoint != Point.Empty)
             {
                 // 音声ドラッグが開始されている場合
                 Point point = SoundPointToImagePoint(e.Location);
                 if (imageBox.Bounds.Contains(point))
                 {
                     SoundDragDrop(point);
                 }
                 SoundDragReset();
             }
             else if (soundDraggingItem.Bounds.Contains(e.Location))
             {
                 // 同じ音声アイテム上でボタンが離されたら音声再生
                 PhotoChat.AudioPlay(soundDraggingItem.FilePath);
             }
         }
     }
     catch (Exception ex)
     {
         PhotoChat.WriteErrorLog(ex.ToString());
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 音声リンクの音声を再生する。
 /// </summary>
 /// <param name="sound">音声リンク</param>
 private void SoundPlay(Sound sound)
 {
     try
     {
         PhotoChat.AudioPlay(
             Path.Combine(PhotoChat.SoundNoteDirectory, sound.SoundFileName));
     }
     catch (Exception e)
     {
         PhotoChat.WriteErrorLog(e.ToString());
     }
 }