Exemplo n.º 1
0
        /// <summary>
        /// Executes the command logics.
        /// </summary>
        public override void Invoke()
        {
            window.IsNameEditable = false;
            window.NameId         = presenter.ConnectionStringSelectedName;
            window.Value          = presenter.ConnectionStringSelectedValue;
            DialogResult result = window.ShowDialog();

            if (result == DialogResult.OK)
            {
                presenter.EditConnectionString(window.Value);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Executes the command logics.
        /// </summary>
        public override void Invoke()
        {
            window.IsNameEditable = true;
            if (string.IsNullOrEmpty(window.NameId))
            {
                window.NameId = "default";
            }
            DialogResult result = window.ShowDialog();

            if (result == DialogResult.OK)
            {
                presenter.AddConnectionString(window.NameId, window.Value);
            }
        }