2 /*****************************************************************************
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 ********************************************************************************/
23 /************************************************
25 *************************************************/
29 using System
.Reflection
;
30 using System
.Windows
.Forms
;
31 using Castle
.MVC
.Configuration
;
32 using Castle
.MVC
.Controllers
;
33 using Castle
.MVC
.StatePersister
;
34 using Castle
.MVC
.States
;
37 namespace Castle
.MVC
.Views
40 /// Base class for user interaction in windows application. You can inherit from
41 /// this class when developing your windows forms.
43 public class WinFormView
: Form
, IView
45 private IState _state
= null;
52 this.Load
+= new EventHandler(WinFormViewOnLoad
);
55 private void WinFormViewOnLoad( object source
, EventArgs e
)
63 /// Gets the current view name.
67 get { return _state.CurrentView; }
71 /// Gets access to the user process state.
75 get { return _state; }