Exemplo n.º 1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            var parser = new CommandLineParser(typeof(Arguments));
            this.Arguments = (Arguments)parser.Parse(e.Args);
            if (this.Arguments.DisplayUsage)
            {
                using (var tw = new StringWriter())
                {
                    parser.WriteUsage(tw, 130);
                    MessageBox.Show(tw.ToString(), "MoviePicker Usage");
                }
                this.Shutdown(0);
            }

            var folder = new MediaFolder(this.TargetDirectory);
            var model = new PreviewSelectionsViewModel(this.Arguments.Rows, this.Arguments.Columns, folder.RandomMovies);
            var preview = new PreviewSelections(model);
            this.MainWindow = preview;
            preview.Show();
        }
 public PreviewSelections(PreviewSelectionsViewModel model)
 {
     InitializeComponent();
     this.ViewModel = model;
 }
 public PreviewSelections(PreviewSelectionsViewModel model)
 {
     InitializeComponent();
     this.ViewModel = model;
 }