public MediaProviderSoundcard(IMediaProviderSupportV7 aSupport) { iSupport = aSupport; iMutex = new Mutex(false); iIcon = OssKinskyMppSoundcard.Properties.Resources.Soundcard; iIconSelected = OssKinskyMppSoundcard.Properties.Resources.SoundcardActive; iDirectSound = new SoundDriver(); iView = new View(iSupport, iDirectSound); iView.EventLocationChanged += OnLocationChanged; }
internal View(IMediaProviderSupportV7 aSupport, SoundDriver aDirectSound) { iSupport = aSupport; iSupport.ViewSupport.EventSupportChanged += EventSupportChanged; iDirectSound = aDirectSound; iMutex = new Mutex(); iLevel = 0; iLocation = new List <string>(); iViewSize = 1; iListView = new ListViewKinsky(); iListView.Dock = DockStyle.Fill; iListView.Visible = true; iListView.AllowDrop = true; SetViewColours(); iListView.View = System.Windows.Forms.View.Tile; ColumnHeader header; header = new ColumnHeader(); header.Name = "Icon"; header.Text = "Icon"; iListView.Columns.Add(header); header = new ColumnHeader(); header.Name = "Title"; header.Text = "Title"; header.Width = -2; iListView.Columns.Add(header); iListView.HeaderStyle = ColumnHeaderStyle.None; iListView.ItemActivate += OnActivate; iListView.ItemDrag += OnItemDrag; iListView.DragOver += OnDragOver; Populate(); Controls.Add(iListView); Dock = DockStyle.Fill; }