Files
VAR.DatabaseExplorer/ServerExplorer/UI/FrmPrincipal.cs

56 lines
1.8 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;
using ServerExplorer.Code;
namespace ServerExplorer.UI
{
public partial class FrmPrincipal : Form
{
public FrmPrincipal()
{
InitializeComponent();
}
private void menuConectarPRUEBAS_Click(object sender, EventArgs e)
{
// Crear ventana de la base de datos de pruebas
FrmBaseDatos frm = new FrmBaseDatos("Data Source=SSSRV3;Initial Catalog=PRUEBAS;User ID=sa;Password=SLsssrv3");
//frmBaseDatos frm = new frmBaseDatos("Data Source=DANTE;Initial Catalog=BD_AlfonsoRodriguez;Integrated Security=True");
//frmBaseDatos frm = new frmBaseDatos("Data Source=OSKURITO;Initial Catalog=BD_AlfonsoRodriguez;Integrated Security=True");
frm.MdiParent = this;
frm.WindowState = FormWindowState.Maximized;
frm.Show();
}
private void menuBuscarServidor_Click(object sender, EventArgs e)
{
// Mostrar ventana de buscador de servidores
FrmServidores frm = new FrmServidores();
frm.MdiParent = this;
frm.Show();
}
private void menuConectarA_Click(object sender, EventArgs e)
{
// Cargar configuracion
OpenFileDialog dialogo = new OpenFileDialog();
if (dialogo.ShowDialog() == DialogResult.OK)
{
Config config = Config.Cargar(dialogo.FileName);
// Crear y mostrar ventana
FrmBaseDatos frm = new FrmBaseDatos(config);
frm.MdiParent = this;
frm.WindowState = FormWindowState.Maximized;
frm.Show();
}
}
}
}