Build for global (not file specific) vlc arguments.
Inheritance: VlcArgumentBuilder
Exemple #1
0
        private void ExecutePlaylist(IEnumerable <ListViewItem> items)
        {
            DisplaySetting setting = GetActiveDisplay();

            var general = new VlcCommandBuilder()
                          .SetLanguage(settingsDialog.Language)
                          .SetVideoTitleShow(settingsDialog.ShowVideoTitle)
                          .SetFullscreen(setting.Fullscreen)
                          .SetEmbedded(setting.Embedded)
                          .SetWidth(setting.Width)
                          .SetHeight(setting.Height)
                          .SetXPos(setting.XPos)
                          .SetYPos(setting.YPos);

            var commands = new List <VlcArgumentBuilder>
            {
                general
            };

            foreach (ListViewItem item in items)
            {
                var file = new VlcFile(item.Text);

                if (item.SubItems.Count > 1 && !string.IsNullOrEmpty(item.SubItems[1].Text))
                {
                    file.SetStartTime((int)TimeHelpers.FromFormatedString(item.SubItems[1].Text).TotalSeconds);
                }
                if (item.SubItems.Count > 2 && !string.IsNullOrEmpty(item.SubItems[2].Text))
                {
                    file.SetEndTime((int)TimeHelpers.FromFormatedString(item.SubItems[2].Text).TotalSeconds);
                }
                if (item.SubItems.Count > 3 && !string.IsNullOrEmpty(item.SubItems[3].Text))
                {
                    file.SetDuration((int)TimeHelpers.FromFormatedString(item.SubItems[3].Text).TotalSeconds);
                }

                commands.Add(file);
            }

            commander.Start(commands.ToArray());
        }
Exemple #2
0
        private void ExecutePlaylist(IEnumerable<ListViewItem> items)
        {
            DisplaySetting setting = GetActiveDisplay();

            var general = new VlcCommandBuilder()
                .SetLanguage(settingsDialog.Language)
                .SetVideoTitleShow(settingsDialog.ShowVideoTitle)
                .SetFullscreen(setting.Fullscreen)
                .SetEmbedded(setting.Embedded)
                .SetWidth(setting.Width)
                .SetHeight(setting.Height)
                .SetXPos(setting.XPos)
                .SetYPos(setting.YPos);

            var commands = new List<VlcArgumentBuilder>
            {
                general
            };

            foreach (ListViewItem item in items)
            {
                var file = new VlcFile(item.Text);

                if (item.SubItems.Count > 1 && !string.IsNullOrEmpty(item.SubItems[1].Text))
                {
                    file.SetStartTime((int)TimeHelpers.FromFormatedString(item.SubItems[1].Text).TotalSeconds);
                }
                if (item.SubItems.Count > 2 && !string.IsNullOrEmpty(item.SubItems[2].Text))
                {
                    file.SetEndTime((int)TimeHelpers.FromFormatedString(item.SubItems[2].Text).TotalSeconds);
                }
                if (item.SubItems.Count > 3 && !string.IsNullOrEmpty(item.SubItems[3].Text))
                {
                    file.SetDuration((int)TimeHelpers.FromFormatedString(item.SubItems[3].Text).TotalSeconds);
                }

                commands.Add(file);
            }

            commander.Start(commands.ToArray());
        }