InitializeControl() 공개 추상적인 메소드

Initializes the Control to be displayed
public abstract InitializeControl ( ) : void
리턴 void
예제 #1
0
        protected override void OnInit(EventArgs e)
        {
            try
            {
                provider=BlogEntryEditorProvider.Instance();
                provider.ControlId=this.ID;
                provider.InitializeControl();

                if(_height != Unit.Empty)
                    provider.Height = _height;
                if(_width != Unit.Empty)
                    provider.Width=_width;

                editor = provider.RichTextEditorControl;
                this.Controls.Add(editor);
                base.OnInit (e);
            }
            catch (ArgumentNullException ex)
            {
                OnError(ex);
            }
            catch (InvalidOperationException ex)
            {
                OnError(ex);
            }
            catch (UnauthorizedAccessException ex)
            {
                OnError(ex);
            }
        }
예제 #2
0
        /// <summary>
        /// Initialize text editor provider and controls
        /// 
        /// Note: made public to be accessible by unit tests
        /// </summary>
        /// <param name="e">EventArgs</param>
        public void InitControls(EventArgs e)
        {
            try
            {
                _provider = CreateProvider();
                _provider.ControlId = ID;
                _provider.InitializeControl((Page as SubtextPage).SubtextContext);

                if (Height != Unit.Empty)
                {
                    _provider.Height = Height;
                }
                if (Width != Unit.Empty)
                {
                    _provider.Width = Width;
                }

                editor = _provider.RichTextEditorControl;
                Controls.Add(editor);
                base.OnInit(e);
            }
            catch (ArgumentNullException ex)
            {
                OnError(ex);
            }
            catch (InvalidOperationException ex)
            {
                OnError(ex);
            }
            catch (UnauthorizedAccessException ex)
            {
                OnError(ex);
            }
        }