Rework Start - Multiple Database-Only-Playlist that can be managed and sent to the Ultrastar directory
This commit is contained in:
1 parent
676717cfbf
commit
de1e1e7946
18 files changed
+392
-264
No files matched your search
@@ -0,0 +1,103 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class AudioVideoPlayer
|
||||
Inherits System.Windows.Forms.UserControl
|
||||
|
||||
'UserControl überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()>
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(AudioVideoPlayer))
|
||||
Me.lblSongArtist = New DevExpress.XtraEditors.LabelControl()
|
||||
Me.lblSongTitle = New DevExpress.XtraEditors.LabelControl()
|
||||
Me.axVideo = New AxWMPLib.AxWindowsMediaPlayer()
|
||||
Me.axAudio = New AxWMPLib.AxWindowsMediaPlayer()
|
||||
CType(Me.axVideo, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.axAudio, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'lblSongArtist
|
||||
'
|
||||
Me.lblSongArtist.Appearance.Font = New System.Drawing.Font("Arial", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblSongArtist.Appearance.ForeColor = System.Drawing.Color.Gray
|
||||
Me.lblSongArtist.Appearance.Options.UseFont = True
|
||||
Me.lblSongArtist.Appearance.Options.UseForeColor = True
|
||||
Me.lblSongArtist.Appearance.Options.UseTextOptions = True
|
||||
Me.lblSongArtist.Appearance.TextOptions.Trimming = DevExpress.Utils.Trimming.EllipsisCharacter
|
||||
Me.lblSongArtist.Appearance.TextOptions.WordWrap = DevExpress.Utils.WordWrap.NoWrap
|
||||
Me.lblSongArtist.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.Vertical
|
||||
Me.lblSongArtist.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.lblSongArtist.Location = New System.Drawing.Point(0, 27)
|
||||
Me.lblSongArtist.Name = "lblSongArtist"
|
||||
Me.lblSongArtist.Size = New System.Drawing.Size(518, 22)
|
||||
Me.lblSongArtist.TabIndex = 7
|
||||
Me.lblSongArtist.Text = "<Artist>"
|
||||
'
|
||||
'lblSongTitle
|
||||
'
|
||||
Me.lblSongTitle.Appearance.Font = New System.Drawing.Font("Arial", 18.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblSongTitle.Appearance.Options.UseFont = True
|
||||
Me.lblSongTitle.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.Vertical
|
||||
Me.lblSongTitle.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.lblSongTitle.Location = New System.Drawing.Point(0, 0)
|
||||
Me.lblSongTitle.Name = "lblSongTitle"
|
||||
Me.lblSongTitle.Size = New System.Drawing.Size(518, 27)
|
||||
Me.lblSongTitle.TabIndex = 8
|
||||
Me.lblSongTitle.Text = "<Title>"
|
||||
'
|
||||
'axVideo
|
||||
'
|
||||
Me.axVideo.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.axVideo.Enabled = True
|
||||
Me.axVideo.Location = New System.Drawing.Point(0, 0)
|
||||
Me.axVideo.Name = "axVideo"
|
||||
Me.axVideo.OcxState = CType(resources.GetObject("axVideo.OcxState"), System.Windows.Forms.AxHost.State)
|
||||
Me.axVideo.Size = New System.Drawing.Size(518, 345)
|
||||
Me.axVideo.TabIndex = 5
|
||||
'
|
||||
'axAudio
|
||||
'
|
||||
Me.axAudio.Dock = System.Windows.Forms.DockStyle.Bottom
|
||||
Me.axAudio.Enabled = True
|
||||
Me.axAudio.Location = New System.Drawing.Point(0, 345)
|
||||
Me.axAudio.Name = "axAudio"
|
||||
Me.axAudio.OcxState = CType(resources.GetObject("axAudio.OcxState"), System.Windows.Forms.AxHost.State)
|
||||
Me.axAudio.Size = New System.Drawing.Size(518, 47)
|
||||
Me.axAudio.TabIndex = 6
|
||||
'
|
||||
'ctrlAudioVideoPlayer
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.Controls.Add(Me.lblSongArtist)
|
||||
Me.Controls.Add(Me.lblSongTitle)
|
||||
Me.Controls.Add(Me.axVideo)
|
||||
Me.Controls.Add(Me.axAudio)
|
||||
Me.Name = "ctrlAudioVideoPlayer"
|
||||
Me.Size = New System.Drawing.Size(518, 392)
|
||||
CType(Me.axVideo, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.axAudio, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents lblSongArtist As DevExpress.XtraEditors.LabelControl
|
||||
Friend WithEvents lblSongTitle As DevExpress.XtraEditors.LabelControl
|
||||
Friend WithEvents axVideo As AxWMPLib.AxWindowsMediaPlayer
|
||||
Friend WithEvents axAudio As AxWMPLib.AxWindowsMediaPlayer
|
||||
End Class
|
||||
@@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="axVideo.OcxState" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAtwAAAAIB
|
||||
AAAAAQAAAAAAAAAAAAAAAKIAAAAAAwAACAAAAAAABQAAAAAAAADwPwMAAAAAAAUAAAAAAAAAAAAIAAIA
|
||||
AAAAAAMAAQAAAAsA//8DAAAAAAALAP//CAACAAAAAAADADIAAAALAAAACAAKAAAAbgBvAG4AZQAAAAsA
|
||||
AAALAAAACwD//wsA//8LAAAACAACAAAAAAAIAAIAAAAAAAgAAgAAAAAACAACAAAAAAALAAAAlC0AAMgw
|
||||
AAAL
|
||||
</value>
|
||||
</data>
|
||||
<data name="axAudio.OcxState" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAtwAAAAIB
|
||||
AAAAAQAAAAAAAAAAAAAAAKIAAAAAAwAACAAAAAAABQAAAAAAAADwPwMAAAAAAAUAAAAAAAAAAAAIAAIA
|
||||
AAAAAAMAAQAAAAsA//8DAAAAAAALAP//CAACAAAAAAADADIAAAALAAAACAAKAAAAZgB1AGwAbAAAAAsA
|
||||
AAALAAAACwD//wsA//8LAAAACAACAAAAAAAIAAIAAAAAAAgAAgAAAAAACAACAAAAAAALAAAANCgAANwE
|
||||
AAAL
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,76 @@
|
||||
Imports System.IO
|
||||
Imports AxWMPLib
|
||||
|
||||
Friend Class AudioVideoPlayer
|
||||
|
||||
Private Sub AudioVideoPlayer_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
lblSongArtist.Text = Nothing
|
||||
lblSongTitle.Text = Nothing
|
||||
If DesignMode = False Then
|
||||
axVideo.uiMode = "none"
|
||||
axVideo.settings.volume = 0
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub axAudio_PlayStateChange(sender As Object, e As _WMPOCXEvents_PlayStateChangeEvent) Handles axAudio.PlayStateChange
|
||||
With axVideo.Ctlcontrols
|
||||
Select Case e.newState
|
||||
Case 0 ' Undefined
|
||||
|
||||
Case 1 ' Stopped
|
||||
.stop()
|
||||
Case 2 ' Paused
|
||||
.pause()
|
||||
Case 3 ' Playing
|
||||
.play()
|
||||
Case 4 ' ScanForward
|
||||
.currentPosition = axAudio.Ctlcontrols.currentPosition
|
||||
Case 5 ' ScanReverse
|
||||
.currentPosition = axAudio.Ctlcontrols.currentPosition
|
||||
Case 6 ' Buffering
|
||||
.pause()
|
||||
Case 7 ' Waiting
|
||||
.pause()
|
||||
Case 8 ' MediaEnded
|
||||
.stop()
|
||||
Case 9 ' Transitioning
|
||||
|
||||
Case 10 ' Ready
|
||||
|
||||
Case 11 ' Reconnecting
|
||||
|
||||
Case 12 ' Last
|
||||
|
||||
Case Else
|
||||
|
||||
|
||||
End Select
|
||||
End With
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub axMediaPlayer_PositionChange(sender As Object, e As _WMPOCXEvents_PositionChangeEvent) Handles axAudio.PositionChange
|
||||
axVideo.Ctlcontrols.currentPosition = axAudio.Ctlcontrols.currentPosition
|
||||
End Sub
|
||||
|
||||
Friend Sub Play(song As Song)
|
||||
If File.Exists(song.Videofile) Then
|
||||
axVideo.URL = song.Videofile
|
||||
axAudio.URL = song.Songfile
|
||||
ElseIf File.Exists(song.Songfile) Then
|
||||
axVideo.URL = Nothing
|
||||
axAudio.URL = song.Songfile
|
||||
Else
|
||||
Exit Sub
|
||||
End If
|
||||
lblSongArtist.Text = song.Artist
|
||||
lblSongTitle.Text = song.Title
|
||||
axAudio.Ctlcontrols.currentPosition = song.Previewstart
|
||||
End Sub
|
||||
|
||||
Friend Sub [Stop]()
|
||||
axVideo.URL = Nothing
|
||||
axAudio.URL = Nothing
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in new issue
Block a user