/// <summary>Create <see cref="CreateTagDialog"/>.</summary> /// <param name="repository"><see cref="Repository"/> to create <see cref="Tag"/> in.</param> /// <exception cref="ArgumentNullException"><paramref name="repository"/> == <c>null</c>.</exception> public CreateTagDialog(Repository repository) { Verify.Argument.IsNotNull(repository, "repository"); _repository = repository; InitializeComponent(); Localize(); var inputs = new IUserInputSource[] { _tagNameInput = new TextBoxInputSource(_txtName), _revisionInput = new ControlInputSource(_txtRevision), _messageInput = new TextBoxInputSource(_txtMessage), _annotatedInput = new RadioButtonInputSource(_radAnnotated), _signedInput = new RadioButtonInputSource(_radSigned), _useKeyIdInput = new RadioButtonInputSource(_radUseKeyId), _keyIdInput = new TextBoxInputSource(_txtKeyId), }; _errorNotifier = new UserInputErrorNotifier(NotificationService, inputs); SetupReferenceNameInputBox(_txtName, ReferenceType.Tag); _txtRevision.References.LoadData( _repository, ReferenceType.Reference, GlobalBehavior.GroupReferences, GlobalBehavior.GroupRemoteBranches); _txtRevision.References.Items[0].IsExpanded = true; GitterApplication.FontManager.InputFont.Apply(_txtKeyId, _txtMessage, _txtName, _txtRevision); GlobalBehavior.SetupAutoCompleteSource(_txtRevision, _repository, ReferenceType.Branch); if (SpellingService.Enabled) { _speller = new TextBoxSpellChecker(_txtMessage, true); } _controller = new CreateTagController(repository) { View = this }; }
/// <summary>Create <see cref="CreateTagDialog"/>.</summary> /// <param name="repository"><see cref="Repository"/> to create <see cref="Tag"/> in.</param> /// <exception cref="ArgumentNullException"><paramref name="repository"/> == <c>null</c>.</exception> public CreateTagDialog(Repository repository) { Verify.Argument.IsNotNull(repository, "repository"); _repository = repository; InitializeComponent(); Localize(); var inputs = new IUserInputSource[] { _tagNameInput = new TextBoxInputSource(_txtName), _revisionInput = new ControlInputSource(_txtRevision), _messageInput = new TextBoxInputSource(_txtMessage), _annotatedInput = new RadioButtonInputSource(_radAnnotated), _signedInput = new RadioButtonInputSource(_radSigned), _useKeyIdInput = new RadioButtonInputSource(_radUseKeyId), _keyIdInput = new TextBoxInputSource(_txtKeyId), }; _errorNotifier = new UserInputErrorNotifier(NotificationService, inputs); SetupReferenceNameInputBox(_txtName, ReferenceType.Tag); _txtRevision.References.LoadData( _repository, ReferenceType.Reference, GlobalBehavior.GroupReferences, GlobalBehavior.GroupRemoteBranches); _txtRevision.References.Items[0].IsExpanded = true; GitterApplication.FontManager.InputFont.Apply(_txtKeyId, _txtMessage, _txtName, _txtRevision); GlobalBehavior.SetupAutoCompleteSource(_txtRevision, _repository, ReferenceType.Branch); if(SpellingService.Enabled) { _speller = new TextBoxSpellChecker(_txtMessage, true); } _controller = new CreateTagController(repository) { View = this }; }