コード例 #1
0
 /// <summary>
 /// If the key doesn't exist, the state is added to the <see cref="ViewState"/>,
 /// otherwise the value of the state is updated
 /// </summary>
 /// <param name="name">Name of key of the state in the <see cref="ViewState"/></param>
 /// <param name="state">Value or state</param>
 private void AddOrUpdateState(string name, object state)
 {
     if (!ViewState.ContainsKey(name))
     {
         ViewState.Add(name, state);
     }
     else
     {
         ViewState[name] = state;
     }
 }
コード例 #2
0
        private void OnWizardStepOnPrevious(object sender, WizardStepEventArgs e)
        {
            if (e != null)
            {
                if (ViewState.ContainsKey(e.Name))
                {
                    ViewState[e.Name] = e.State;
                }

                if (e.Position.HasValue)
                {
                    NavigateTo(e.Position.Value);
                    return;
                }
            }

            NavigateBackward();
        }