public BundleManagerPresenter(BundleManagerView view) { #region Precondizioni if (view == null) { throw new ArgumentNullException("view null"); } #endregion view.AddButton.Click += AddHandler; _bundleList = view.ListView; _bundleList.MultiSelect = false; _bundleList.DoubleClick += ShowBundleHandler; if (view.RetrieveTagInformation <AuthorizationLevel>("authorizationLevel") < AuthorizationLevel.BASIC_STAFF) { view.ActionPanel.Enabled = false; view.ActionPanel.Visible = false; } coordinator = CoordinatorManager.Instance.CoordinatorOfType <IServiceCoordinator>(); if (coordinator == null) { throw new InvalidOperationException("Il coordinatore dei bundle non è disponibile"); } _bundles = coordinator.Bundles; coordinator.ServiceChanged += ServiceChangedHandler; // Popolo la list view all'avvio ServiceChangedHandler(this, EventArgs.Empty); }
private void SpawnBundleView() { BundleManagerView bundleView = new BundleManagerView(); AddInformation(bundleView); new BundleManagerPresenter(bundleView); bundleView.Show(); }