public ApplicationViewModel(List <string> arguments, IBrowserPickerConfiguration settings)
        {
            var options = arguments.Where(arg => arg[0] == '/').ToList();

            force_choice = options.Contains("/choose");
            var url = arguments.Except(options).FirstOrDefault();

            if (url != null)
            {
                Url = new UrlHandler(settings, url);
            }
            ConfigurationMode              = url == null;
            Configuration                  = settings;
            Configuration.PropertyChanged += Configuration_PropertyChanged;
            Choices = new ObservableCollection <BrowserViewModel>(Configuration.BrowserList.Select(m => new BrowserViewModel(m, this)));
        }
Esempio n. 2
0
 public UrlHandler(IBrowserPickerConfiguration configuration, string requestedUrl)
 {
     TargetURL          = requestedUrl;
     this.configuration = configuration;
 }