Files
VAR.DatabaseExplorer/ServerExplorer/frmCodeGenConfig.cs
2013-10-14 20:20:23 +02:00

91 lines
2.7 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ServerExplorer
{
public partial class FrmCodeGenConfig : Form
{
Config _config;
public FrmCodeGenConfig(Config config)
{
InitializeComponent();
_config = config;
}
private void FrmCodeGenConfig_Load(object sender, EventArgs e)
{
txtConString.Text = _config.ConString;
txtPathRaiz.Text = _config.PathRaiz;
txtPathDAL.Text = _config.PathDAL;
txtPathDTO.Text = _config.PathDTO;
txtPathExtra.Text = _config.PathExtra;
txtNSDAL.Text = _config.NamespaceDAL;
txtNSDTO.Text = _config.NamespaceDTO;
}
private void btnPathRaiz_Click(object sender, EventArgs e)
{
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.SelectedPath = txtPathRaiz.Text;
if (dialog.ShowDialog() == DialogResult.OK)
{
txtPathRaiz.Text = dialog.SelectedPath;
}
}
private void btnPathDAL_Click(object sender, EventArgs e)
{
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.SelectedPath = txtPathDAL.Text;
if (dialog.ShowDialog() == DialogResult.OK)
{
txtPathDAL.Text = dialog.SelectedPath;
}
}
private void btnPathDTO_Click(object sender, EventArgs e)
{
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.SelectedPath = txtPathDTO.Text;
if (dialog.ShowDialog() == DialogResult.OK)
{
txtPathDTO.Text = dialog.SelectedPath;
}
}
private void btnPathExtra_Click(object sender, EventArgs e)
{
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.SelectedPath = txtPathExtra.Text;
if (dialog.ShowDialog() == DialogResult.OK)
{
txtPathExtra.Text = dialog.SelectedPath;
}
}
private void btnAceptar_Click(object sender, EventArgs e)
{
_config.PathRaiz = txtPathRaiz.Text;
_config.PathDAL = txtPathDAL.Text;
_config.PathDTO = txtPathDTO.Text;
_config.PathExtra = txtPathExtra.Text;
_config.NamespaceDAL = txtNSDAL.Text;
_config.NamespaceDTO = txtNSDTO.Text;
this.Close();
}
private void btnCancelar_Click(object sender, EventArgs e)
{
this.Close();
}
}
}