91 lines
2.7 KiB
C#
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();
|
|
|
|
this.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();
|
|
}
|
|
}
|
|
}
|