【Tween.vb】1350行辺り Private Sub NotifyNewPosts(ByVal notifyPosts() As PostClass, ByVal soundFile As String, ByVal addCount As Integer) '新着通知 If (NewPostPopMenuItem.Checked AndAlso _ notifyPosts IsNot Nothing AndAlso notifyPosts.Length > 0 AndAlso _ Not _initial AndAlso _ ((SettingDialog.LimitBalloon AndAlso _ (Me.WindowState = FormWindowState.Minimized OrElse Not Me.Visible OrElse Form.ActiveForm Is Nothing)) _ OrElse Not SettingDialog.LimitBalloon)) AndAlso Not IsScreenSaverRunning() Then Dim sb As New StringBuilder Dim reply As Boolean = False Dim dm As Boolean = False For Each post As PostClass In notifyPosts If post.IsReply Then reply = True If post.IsDm Then dm = True If sb.Length > 0 Then sb.Append(System.Environment.NewLine) Select Case SettingDialog.NameBalloon Case NameBalloonEnum.UserID sb.Append(post.Name).Append(" : ") Case NameBalloonEnum.NickName sb.Append(post.Nickname).Append(" : ") End Select sb.Append(post.Data) Next If SettingDialog.DispUsername Then NotifyIcon1.BalloonTipTitle = _username + " - " Else NotifyIcon1.BalloonTipTitle = "" If dm Then NotifyIcon1.BalloonTipIcon = ToolTipIcon.Warning NotifyIcon1.BalloonTipTitle += "Tween [DM] " + My.Resources.RefreshDirectMessageText1 + " " + addCount.ToString() + My.Resources.RefreshDirectMessageText2 ElseIf reply Then NotifyIcon1.BalloonTipIcon = ToolTipIcon.Warning NotifyIcon1.BalloonTipTitle += "Tween [Reply!] " + My.Resources.RefreshTimelineText1 + " " + addCount.ToString() + My.Resources.RefreshTimelineText2 Else NotifyIcon1.BalloonTipIcon = ToolTipIcon.Info NotifyIcon1.BalloonTipTitle += "Tween " + My.Resources.RefreshTimelineText1 + " " + addCount.ToString() + My.Resources.RefreshTimelineText2 End If Dim bText As String = sb.ToString If String.IsNullOrEmpty(bText) Then Exit Sub NotifyIcon1.BalloonTipText = sb.ToString() NotifyIcon1.ShowBalloonTip(500) 'ゆっくり読み上げ Me.Invoke(New Threading.ParameterizedThreadStart(AddressOf speek), sb.ToString().Replace(Environment.NewLine, "")) End If 'サウンド再生 If Not _initial AndAlso SettingDialog.PlaySound AndAlso soundFile <> "" Then Try My.Computer.Audio.Play(Path.Combine(My.Application.Info.DirectoryPath.ToString(), soundFile), AudioPlayMode.Background) Catch ex As Exception End Try End If End Sub 'ゆっくりが読み上げる Private Sub speek(ByVal str As Object) Diagnostics.Process.Start(".\softalk\SofTalk.exe", str.ToString()) End Sub