private void Connect() { Socket handler = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);; var address = IPAddress.Parse("192.168.1.33"); IPEndPoint remoteEP = new IPEndPoint(address, 11000); handler.Connect(remoteEP); handler.ReceiveTimeout = -1; handler.SendTimeout = -1; Executer = new SQLExecuter(new IODialog(handler), (msg) => MessageBox.Show(msg)); }
public MainForm() { ConnectForm connectForm = new ConnectForm(); if (connectForm.ShowDialog() != DialogResult.OK) { connectForm.Dispose(); } InitializeComponent(); SQLExecuter = connectForm.Executer; CurrentTable = new CurrentTable(); DataGridView_MainView.DataSource = Binding; }