コード例 #1
0
ファイル: EditMkvAttributesForm.cs プロジェクト: juanii/NEbml
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
ファイル: EditMkvAttributesForm.cs プロジェクト: juanii/NEbml
        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");
        }
コード例 #4
0
        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");
        }