Esempio n. 1
0
        public MainController(MainWindow window, 
            IWindowManager windowManager,
            IStoredClassDataPresenter storedClassDataPresenter,
            IConnectionPresenter connectionPresenter,
            IStoredClassPresenter storedClassPresenter,
            IFieldPresenter fieldPresenter,
            IFieldListPresenter fieldListPresenter,
            IConnectionStatisticsPresenter connectionStatisticsPresenter
            )
        {
            this.window = window;
            this.windowManager = windowManager;
            this.storedClassDataPresenter = storedClassDataPresenter;
            this.connectionPresenter = connectionPresenter;
            this.storedClassPresenter = storedClassPresenter;

            this.window.explorer.ShowDataFired += storedClassDataPresenter.ShowData;
            this.window.explorer.ShowFieldsFired += fieldListPresenter.ShowFields;
            this.window.AddNewConnectionFired += this.connectionPresenter.AddNew;

            this.window.explorer.EditConnectionFired += this.connectionPresenter.Edit;
            this.window.explorer.DeleteConnectionFired += this.connectionPresenter.Delete;
            this.window.explorer.RenameClassFired += storedClassPresenter.RenameClass;
            this.window.explorer.RenameFieldFired += fieldPresenter.RenameField;
            this.window.explorer.ShowStatisticsFired += connectionStatisticsPresenter.Show;
            this.window.explorer.CreateNewStoredClassFired += storedClassPresenter.CreateNew;
        }
        private void OnLoadConnection()
        {
            IConnectionPresenter presenter = container.Resolve <ConnectionPresenter>();

            View.UCInfo.Items.Clear();
            View.UCInfo.Items.Add(presenter.View);
        }
Esempio n. 3
0
        private void OnViewConnections(object sender, EventArgs e)
        {
            ProcessWindow pw = new  ProcessWindow("Loading Connections ... ");

            try
            {
                IConnectionPresenter presenter = container.Resolve <ConnectionPresenter>();

                InternalWindow window = Util.GetInternalWindow(this.Window.Parent, "Connections");
                presenter.Window = window;
                window.GridContent.Children.Add((ConnectionView)presenter.View);
                window.Show();
            }
            catch { }
            finally
            {
                pw.Close();
            }
        }