コード例 #1
0
        public override void SyncChanges()
        {
            LibraryTree parent = this.WebPartToEdit as LibraryTree;

            _libraryName.Text  = parent.LibraryName;
            _expandDepth.Text  = parent.ExpandDepth.ToString();
            _showLines.Checked = parent.ShowLines;
        }
コード例 #2
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            LibraryTree parent = this.WebPartToEdit as LibraryTree;

            _libraryName       = new TextBox();
            _libraryName.Text  = parent.LibraryName;
            _expandDepth       = new TextBox();
            _expandDepth.Text  = parent.ExpandDepth.ToString();
            _showLines         = new CheckBox();
            _showLines.Checked = parent.ShowLines;
        }
コード例 #3
0
        public override bool ApplyChanges()
        {
            LibraryTree parent = this.WebPartToEdit as LibraryTree;

            parent.LibraryName = _libraryName.Text.Trim();
            try
            {
                parent.ExpandDepth = int.Parse(_expandDepth.Text);
            }
            catch
            {
                parent.ExpandDepth = 0;
            }
            parent.ShowLines = _showLines.Checked;
            parent.SaveChanges();
            return(true);
        }