예제 #1
0
        public StashToBranchDialog(StashedState stashedState)
        {
            Verify.Argument.IsNotNull(stashedState, nameof(stashedState));
            Verify.Argument.IsFalse(stashedState.IsDeleted, nameof(stashedState),
                                    Resources.ExcObjectIsDeleted.UseAsFormat(stashedState.GetType().Name));

            StashedState = stashedState;

            InitializeComponent();
            Localize();

            var inputs = new IUserInputSource[]
            {
                BranchName = new TextBoxInputSource(_txtBranchName),
            };

            ErrorNotifier = new UserInputErrorNotifier(NotificationService, inputs);

            SetupReferenceNameInputBox(_txtBranchName, ReferenceType.LocalBranch);

            _txtStashName.Text = ((IRevisionPointer)StashedState).Pointer;

            GitterApplication.FontManager.InputFont.Apply(_txtBranchName, _txtStashName);

            _controller = new StashToBranchController(stashedState)
            {
                View = this
            };
        }
예제 #2
0
        public StashToBranchDialog(StashedState stashedState)
        {
            Verify.Argument.IsNotNull(stashedState, "stashedState");
            Verify.Argument.IsFalse(stashedState.IsDeleted, "stashedState",
                Resources.ExcObjectIsDeleted.UseAsFormat(stashedState.GetType().Name));

            _stashedState = stashedState;

            InitializeComponent();
            Localize();

            var inputs = new IUserInputSource[]
            {
                _branchNameInput = new TextBoxInputSource(_txtBranchName),
            };
            _errorNotifier = new UserInputErrorNotifier(NotificationService, inputs);

            SetupReferenceNameInputBox(_txtBranchName, ReferenceType.LocalBranch);

            _txtStashName.Text = ((IRevisionPointer)_stashedState).Pointer;

            GitterApplication.FontManager.InputFont.Apply(_txtBranchName, _txtStashName);

            _controller = new StashToBranchController(stashedState) { View = this };
        }