public void LoadViewState(string viewState) { if (viewState == "CompleteFailure") { var result = MessageBox.Show("Application failed irreparably and will be shut down.", "Global Error", MessageBoxButtons.OK); this.Invoke(new MethodInvoker(this.Close)); return; } var telephoneViewState = (TelephoneViewState)viewMan.ViewStateConfiguration.ViewStates[viewState]; this.SetValues(telephoneViewState); this.CurrentViewState = telephoneViewState; }
public void LoadViewState(string viewState) { if (viewState == "CompleteFailure") { var result = MessageBox.Show("Application failed irreparably and will be shut down.", "Global Error", MessageBoxButtons.OK); this.Invoke(new MethodInvoker(this.Close)); return; } var telephoneViewState = (TelephoneViewState)viewMan.ViewStateConfiguration.ViewStates[viewState]; this.SetValues(telephoneViewState); this.CurrentViewState = telephoneViewState; }