コード例 #1
0
 /// <summary>
 /// When implemented by a class, loads the server control's previously saved view state to the control.
 /// </summary>
 /// <param name="state">An <see cref="T:System.Object"/> that contains the saved view state values for the control.</param>
 void IStateManager.LoadViewState(object savedState)
 {
     object[] state = savedState as object[];
     if (state != null) {
         _autoPan = (bool)state[0];
         _bouncy = (bool)state[1];
         _clickable = (bool)state[2];
         _draggable = (bool)state[3];
         _dragCrossMove = (bool)state[4];
         _openInfoBehaviour = (OpenInfoBehaviour)(int)state[5];
         _iconUrl = (string)state[6];
         _shadowUrl = (string)state[7];
         _text = (string)state[8];
         _title = (string)state[9];
         ((IStateManager)_iconAnchor).LoadViewState(state[10]);
         ((IStateManager)_infoWindowAnchor).LoadViewState(state[11]);
         ((IStateManager)_iconSize).LoadViewState(state[12]);
         ((IStateManager)_shadowSize).LoadViewState(state[13]);
     }
 }
コード例 #2
0
 /// <summary>
 /// Loads the state of the view.
 /// </summary>
 /// <param name="savedState">State of the saved.</param>
 void IStateManager.LoadViewState(object savedState)
 {
     object[] state = savedState as object[];
     if (state != null) {
         _address = (string)state[0];
         _behaviour = (GoogleMarkerBehaviour)Enum.Parse(typeof(GoogleMarkerBehaviour), (string)state[1]);
         ((IStateManager)_iconAnchor).LoadViewState(state[2]);
         ((IStateManager)_iconSize).LoadViewState(state[3]);
         _iconUrl = (string)state[4];
         ((IStateManager)_infoWindowAnchor).LoadViewState(state[5]);
         _latitude = (double)state[6];
         _longitude = (double)state[7];
         _openInfoBehaviour = (OpenInfoBehaviour)Enum.Parse(typeof(OpenInfoBehaviour), (string)state[8]);
         ((IStateManager)_shadowSize).LoadViewState(state[9]);
         _shadowUrl = (string)state[10];
         _text = (string)state[11];
         _title = (string)state[12];
         ((IStateManager)_infoContent).LoadViewState(state[13]);
     }
 }