初始化
This commit is contained in:
44
Form_C5Music.vb
Normal file
44
Form_C5Music.vb
Normal file
@@ -0,0 +1,44 @@
|
||||
Public Class Form_C5Music
|
||||
''' <summary>
|
||||
''' 设置C5Music显示状态
|
||||
''' </summary>
|
||||
Public Sub Set_C5Music_Show_status(play_num As Integer, play_state As Byte, volume As Byte)
|
||||
TextBox_PlayNum.Text = $"{play_num:0000X}"
|
||||
TextBox_Status.Text = Get_C5Music_Playing_Status(play_state)
|
||||
|
||||
If volume < 30 Then
|
||||
TrackBar1.Value = volume
|
||||
Console.WriteLine($"音量:{volume}")
|
||||
Else
|
||||
Console.WriteLine($"无效音量值")
|
||||
End If
|
||||
|
||||
|
||||
Console.WriteLine("当前播放文件:" & TextBox_PlayNum.Text)
|
||||
Console.WriteLine(TextBox_Status.Text)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Function Get_C5Music_Playing_Status(play_state As Byte) As String
|
||||
Dim status_string As String
|
||||
|
||||
If play_state = &H0 Then
|
||||
status_string = "播放中"
|
||||
ElseIf play_state = &H1 Then
|
||||
status_string = "暂停"
|
||||
Else
|
||||
status_string = $"{play_state:X} "
|
||||
End If
|
||||
|
||||
Return status_string
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Private Sub Form_C5Music_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user