示例#1
0
        private void newButton_Click(object sender, EventArgs e)
        {
            var form = new ConnectionStringBuilderForm();

            if (form.ShowDialog() == DialogResult.OK)
            {
                var connectionProperties = form.ConnectionProperties;
                Add(connectionProperties);
            }
        }
示例#2
0
        private void Edit_Click(object sender, EventArgs e)
        {
            var configurationNode = SelectedConfigurationNode;
            var form = new ConnectionStringBuilderForm();

            form.ConnectionProperties = ConnectionPropertiesRepository.GetFromConfiguration(configurationNode);
            var dialogResult = form.ShowDialog();

            if (dialogResult == DialogResult.OK)
            {
                ConnectionPropertiesRepository.Save(form.ConnectionProperties, configurationNode);
                var row = _dataTable.DefaultView[_dataGrid.CurrentCell.RowIndex].Row;
                LoadConnection(configurationNode, row);
            }
        }
示例#3
0
        private void Edit_Click(object sender, EventArgs e)
        {
            var folder = SelectedConfigurationNode;
            var connectionProperties = new ConnectionProperties();

            connectionProperties.Load(folder);
            var form = new ConnectionStringBuilderForm();

            form.ConnectionProperties = connectionProperties;
            var dialogResult = form.ShowDialog();

            if (dialogResult == DialogResult.OK)
            {
                connectionProperties = form.ConnectionProperties;
                connectionProperties.Save(folder);
                var row = _dataTable.DefaultView[_dataGrid.CurrentCell.RowIndex].Row;
                LoadConnection(folder, row);
            }
        }