public ConnectionPresenter(IUnityContainer container, IConnectionView view, IShellPresenter regionManager) { View = view; this.container = container; this.service = new WMSServiceClient(); View.Model = this.container.Resolve<ConnectionModel>(); this.regionManager = regionManager; //Event Delegate View.New += new EventHandler<EventArgs>(this.OnNew); View.LoadData += new EventHandler<DataEventArgs<Connection>>(this.OnLoadData); View.LoadChilds += new EventHandler<DataEventArgs<ConnectionType>>(this.OnLoadChilds); View.Save += new EventHandler<EventArgs>(this.OnSave); View.Delete += new EventHandler<EventArgs>(this.OnDelete); View.TestConnection += new EventHandler<EventArgs>(this.OnTestConnection); View.Model.ListCnnType = service.GetConnectionType(new ConnectionType()); if (View.Model.ListCnnType != null && View.Model.ListCnnType.Count == 1) LoadChilds(View.Model.ListCnnType[0]); View.Model.Record = null; View.DpChilds.Visibility = Visibility.Collapsed; }