-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSourceController.cs
More file actions
44 lines (38 loc) · 1003 Bytes
/
SourceController.cs
File metadata and controls
44 lines (38 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System;
using System.Collections.Generic;
namespace VideoPlayerWPF
{
internal class SourceController
{
#region Fields
List<Uri> _sources = new List<Uri>();
int _position = 0;
#endregion
#region Properties
public List<Uri> Sources { get => _sources; set => _sources = value; }
public int Position { get => _position; }
public int Count { get => _sources.Count; }
#endregion
#region Constructors
public SourceController() { }
#endregion
#region Methods
public Uri GetSource()
{
if (_sources.Count == 0)
return null;
return _sources[_position];
}
public void MoveNext()
{
if(_position < _sources.Count - 1)
_position++;
}
public void MovePrevious()
{
if(_position > 0)
_position--;
}
#endregion
}
}