private static void Main() { var form = new EditMkvAttributesForm(); var model = new EditMkvAttributesModel(); model.ReadSettings(); var argv = Environment.GetCommandLineArgs(); if (argv.Length > 1) { if (Directory.Exists(argv[1])) { model.FolderPath = argv[1]; } else { MessageBox.Show("Folder '{0}' not found. Opening default one.", "Arguments error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } form.Bind(model); Application.Run(form); }
public void Bind(EditMkvAttributesModel model) { if (model == null) throw new ArgumentNullException("model"); _model = model; breadCrumbsPath1.DataBindings.Add("Path", _model, "FolderPath", false, DataSourceUpdateMode.OnPropertyChanged); dataGridView1.DataBindings.Add("DataSource", _model, "Entries"); }
public void Bind(EditMkvAttributesModel model) { if (model == null) { throw new ArgumentNullException("model"); } _model = model; breadCrumbsPath1.DataBindings.Add("Path", _model, "FolderPath", false, DataSourceUpdateMode.OnPropertyChanged); dataGridView1.DataBindings.Add("DataSource", _model, "Entries"); }