示例#1
0
        private void tsAddNewConnection_Click(object sender, EventArgs e)
        {
            NewConnection view = new NewConnection();
            GenericConnectionPresenter presenter = new GenericConnectionPresenter(view);

            var result = view.ShowDialog();

            if (result != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }

            if (this.AddConnection != null)
            {
                foreach (ConnectionStringEntry conn in view.NewConnections)
                {
                    this.AddConnection.Invoke(conn, false);
                }
            }
        }
        private void tsAddNewConnection_Click(object sender, EventArgs e)
        {
            NewConnection view = new NewConnection();
            GenericConnectionPresenter presenter = new GenericConnectionPresenter(view);

            var result = view.ShowDialog();

            if (result != System.Windows.Forms.DialogResult.OK) { return; }

            if (this.AddConnection != null)
            {
                foreach (ConnectionStringEntry conn in view.NewConnections)
                {
                    this.AddConnection.Invoke(conn, false);
                }
            }
        }