コード例 #1
0
        protected override object SaveViewState()
        {
            if (track_enabled_state)
            {
                ViewState ["Enabled"] = enabled;
            }

            object view_state;
            object attr_view_state = null;

            if (style != null)
            {
                style.SaveBitState();
            }
            view_state = base.SaveViewState();

            if (attribute_state != null)
            {
                attr_view_state = attribute_state.SaveViewState();
            }

            if (view_state == null && attr_view_state == null)
            {
                return(null);
            }

            return(new Pair(view_state, attr_view_state));
        }
コード例 #2
0
ファイル: WebControl.cs プロジェクト: wparad/referencesource
        /// <internalonly/>
        /// <devdoc>
        ///    <para>A protected method. Saves any
        ///       state that was modified after the TrackViewState method was invoked.</para>
        /// </devdoc>
        protected override object SaveViewState()
        {
            Pair myState = null;

            // Save values cached out of view state
            if (_webControlFlags[disabledDirty])
            {
                ViewState["Enabled"] = !flags[isWebControlDisabled];
            }

            if (ControlStyleCreated)
            {
                // the style shares the StateBag of its owner WebControl
                // call SaveViewState to let style participate in state management
                ControlStyle.SaveViewState();
            }

            object baseState = base.SaveViewState();
            object aState    = null;

            if (attrState != null)
            {
                aState = attrState.SaveViewState();
            }

            if (baseState != null || aState != null)
            {
                myState = new Pair(baseState, aState);
            }
            return(myState);
        }
コード例 #3
0
        protected virtual object SaveViewState()
        {
            object[] state = new object [5];
            state [0] = viewState.SaveViewState();
            if (controlStyle != null)
            {
                state [1] = ((IStateManager)controlStyle).SaveViewState();
            }
            if (footerStyle != null)
            {
                state [2] = ((IStateManager)footerStyle).SaveViewState();
            }
            if (headerStyle != null)
            {
                state [3] = ((IStateManager)headerStyle).SaveViewState();
            }
            if (itemStyle != null)
            {
                state [4] = ((IStateManager)itemStyle).SaveViewState();
            }

            if (state [0] == null && state [1] == null && state [2] == null &&
                state [3] == null && state [4] == null)
            {
                return(null);
            }

            return(state);
        }
コード例 #4
0
 /// <devdoc>
 /// <para>Saves any server control view-state changes that have
 /// occurred since the time the page was posted back to the server.</para>
 /// </devdoc>
 protected virtual object SaveViewState()
 {
     if (_viewState != null)
     {
         return(_viewState.SaveViewState());
     }
     return(null);
 }
コード例 #5
0
        public void IStateManager_Deny_Unrestricted()
        {
            IStateManager sm = new StateBag();

            Assert.IsFalse(sm.IsTrackingViewState, "IsTrackingViewState");
            object state = sm.SaveViewState();

            sm.LoadViewState(state);
            sm.TrackViewState();
        }
コード例 #6
0
ファイル: Style.cs プロジェクト: raj581/Marvin
        protected internal virtual object SaveViewState()
        {
            SaveBitState();

            if (_isSharedViewState)
            {
                return(null);
            }

            return(viewstate.SaveViewState());
        }
コード例 #7
0
        protected virtual object SaveViewState()
        {
            object[] states = new object[2];
            states[0] = ViewState.SaveViewState();
            states[1] = (nodes == null ? null : ((IStateManager)nodes).SaveViewState());

            for (int i = 0; i < states.Length; i++)
            {
                if (states [i] != null)
                {
                    return(states);
                }
            }
            return(null);
        }
コード例 #8
0
        object IStateManager.SaveViewState()
        {
            object[] states = new object[2];
            states[0] = ViewState.SaveViewState();
            states[1] = (items == null ? null : ((IStateManager)items).SaveViewState());

            for (int i = 0; i < states.Length; i++)
            {
                if (states [i] != null)
                {
                    return(states);
                }
            }
            return(null);
        }
コード例 #9
0
        /// <devdoc>
        ///     Saves the view state for the control.
        /// </devdoc>
        protected override object SaveViewState()
        {
            object baseState  = base.SaveViewState();
            object inputState = null;
            object labelState = null;
            object myState    = null;

            if (_inputAttributesState != null)
            {
                inputState = _inputAttributesState.SaveViewState();
            }
            if (_labelAttributesState != null)
            {
                labelState = _labelAttributesState.SaveViewState();
            }
            if (baseState != null || inputState != null || labelState != null)
            {
                myState = new Triplet(baseState, inputState, labelState);
            }
            return(myState);
        }
コード例 #10
0
ファイル: DataGridColumn.cs プロジェクト: raj581/Marvin
        protected virtual object SaveViewState()
        {
            object[] res = new object[4];

            res[0] = viewstate.SaveViewState();

            if (footer_style != null)
            {
                res[1] = footer_style.SaveViewState();
            }
            if (header_style != null)
            {
                res[2] = header_style.SaveViewState();
            }
            if (item_style != null)
            {
                res[3] = item_style.SaveViewState();
            }

            return(res);
        }
コード例 #11
0
        protected override object SaveViewState()
        {
            object baseView      = base.SaveViewState();
            object inputAttrView = null;
            object labelAttrView = null;

            if (inputAttributesState != null)
            {
                inputAttrView = inputAttributesState.SaveViewState();
            }

            if (labelAttributesState != null)
            {
                labelAttrView = labelAttributesState.SaveViewState();
            }

            if (baseView == null && inputAttrView == null && labelAttrView == null)
            {
                return(null);
            }

            return(new Triplet(baseView, inputAttrView, labelAttrView));
        }
コード例 #12
0
 protected virtual object SaveViewState()
 {
     return(viewState.SaveViewState());
 }
コード例 #13
0
ファイル: TreeNodeBinding.cs プロジェクト: raj581/Marvin
 object IStateManager.SaveViewState()
 {
     return(ViewState.SaveViewState());
 }
コード例 #14
0
 /// <devdoc>
 /// Saves view state.
 /// </devdoc>
 private object SaveViewState()
 {
     return((_viewState != null) ? _viewState.SaveViewState() : null);
 }
コード例 #15
0
 /// <devdoc>
 /// Saves view state.
 /// </devdoc>
 protected virtual object SaveViewState()
 {
     return((_viewState != null) ? _viewState.SaveViewState() : null);
 }