Exemplo n.º 1
0
        public void SetFormatPriority()
        {
            try
            {
                AsyncObservableCollection<FormatOptions> tempformatPriorityOptions = new AsyncObservableCollection<FormatOptions>();

                tempformatPriorityOptions.Add(new FormatOptions(Settings.Default.priorite1080p, Settings.Default.tag1080p, Properties.Resources.label1080p));
                tempformatPriorityOptions.Add(new FormatOptions(Settings.Default.priorite720p, Settings.Default.tag720p, Properties.Resources.label720p));
                tempformatPriorityOptions.Add(new FormatOptions(Settings.Default.priorite480p, Settings.Default.tag480p, Properties.Resources.label480));
                tempformatPriorityOptions.Add(new FormatOptions(Settings.Default.prioriteHQ360, Settings.Default.tagHQ360, Properties.Resources.labelHQ360));
                tempformatPriorityOptions.Add(new FormatOptions(Settings.Default.priorite360, Settings.Default.tag360, Properties.Resources.label360));
                tempformatPriorityOptions.Add(new FormatOptions(Settings.Default.priorite220, Settings.Default.tag220, Properties.Resources.label220));

                formatPriorityOptions = new AsyncObservableCollection<FormatOptions>(tempformatPriorityOptions.OrderBy(otherFormat => otherFormat));
            }
            catch (Exception ex)
            {
                AddErrorMsg("DownloadManagerMV.SetFormatPriority()", ex);
            }
        }