Example #1
0
        // Attaches this control to a new TextContainer.
        private void InitializeTextContainer(PasswordTextContainer textContainer)
        {
            Invariant.Assert(textContainer != null);

            // Uninitialize previous TextEditor
            if (_textContainer != null)
            {
                Invariant.Assert(_textEditor != null);
                Invariant.Assert(_textEditor.TextContainer == _textContainer);

                // Detach existing editor from VisualTree
                DetachFromVisualTree();

                // Discard TextEditor - must release text container
                _textEditor.OnDetach();
            }

            // Save text container
            _textContainer = textContainer;

            //
            ((ITextContainer)_textContainer).Changed += new TextContainerChangedEventHandler(OnTextContainerChanged);

            // Create a text editor, initialize undo manager for it, and link it to text container
            _textEditor = new TextEditor(_textContainer, this, true);
        }
Example #2
0
 // Token: 0x060053A1 RID: 21409 RVA: 0x0017350E File Offset: 0x0017170E
 internal PasswordTextPointer(PasswordTextContainer container, LogicalDirection gravity, int offset)
 {
     this._container = container;
     this._gravity   = gravity;
     this._offset    = offset;
     container.AddPosition(this);
 }
        //------------------------------------------------------
        //
        //  Constructors
        //
        //------------------------------------------------------

        #region Constructors

        // Creates a new PasswordTextPointer instance.
        internal PasswordTextPointer(PasswordTextContainer container, LogicalDirection gravity, int offset)
        {
            Debug.Assert(offset >= 0 && offset <= container.SymbolCount, "Bad PasswordTextPointer offset!");

            _container = container;
            _gravity = gravity;
            _offset = offset;

            container.AddPosition(this);
        }
Example #4
0
        //------------------------------------------------------
        //
        //  Constructors
        //
        //------------------------------------------------------

        #region Constructors

        // Creates a new PasswordTextPointer instance.
        internal PasswordTextPointer(PasswordTextContainer container, LogicalDirection gravity, int offset)
        {
            Debug.Assert(offset >= 0 && offset <= container.SymbolCount, "Bad PasswordTextPointer offset!");

            _container = container;
            _gravity   = gravity;
            _offset    = offset;

            container.AddPosition(this);
        }
Example #5
0
 // Token: 0x06005351 RID: 21329 RVA: 0x001727FC File Offset: 0x001709FC
 private void InitializeTextContainer(PasswordTextContainer textContainer)
 {
     Invariant.Assert(textContainer != null);
     if (this._textContainer != null)
     {
         Invariant.Assert(this._textEditor != null);
         Invariant.Assert(this._textEditor.TextContainer == this._textContainer);
         this.DetachFromVisualTree();
         this._textEditor.OnDetach();
     }
     this._textContainer = textContainer;
     ((ITextContainer)this._textContainer).Changed += this.OnTextContainerChanged;
     this._textEditor = new TextEditor(this._textContainer, this, true);
 }
        // Attaches this control to a new TextContainer.
        private void InitializeTextContainer(PasswordTextContainer textContainer)
        {
            Invariant.Assert(textContainer != null);

            // Uninitialize previous TextEditor
            if (_textContainer != null)
            {
                Invariant.Assert(_textEditor != null);
                Invariant.Assert(_textEditor.TextContainer == _textContainer);

                // Detach existing editor from VisualTree
                DetachFromVisualTree();

                // Discard TextEditor - must release text container
                _textEditor.OnDetach();
            }

            // Save text container
            _textContainer = textContainer;

            // 
            ((ITextContainer)_textContainer).Changed += new TextContainerChangedEventHandler(OnTextContainerChanged);

            // Create a text editor, initialize undo manager for it, and link it to text container
            _textEditor = new TextEditor(_textContainer, this, true);
        }