Esempio n. 1
0
        internal CommitDialog(
            WindowOwner owner,
            Func <
                CommitDialog,
                BranchName,
                IEnumerable <CommitFile>,
                string,
                bool,
                CommitDialogViewModel> CommitDialogViewModelProvider,
            BranchName branchName,

            IEnumerable <CommitFile> files,
            string commitMessage,
            bool isMerging)
        {
            Owner = owner;
            InitializeComponent();
            viewModel = CommitDialogViewModelProvider(
                this,
                branchName,
                files,
                commitMessage,
                isMerging);

            DataContext = viewModel;

            if (string.IsNullOrWhiteSpace(viewModel.Subject))
            {
                SubjectText.Focus();
            }
            else
            {
                DescriptionText.Focus();
            }
        }