private void bunifuImageButton1_Click(object sender, EventArgs e) { var tr = new T_Dashboard(); var svr = new FrmServerSettings(); tr.Show(this); svr.ShowDialog(); tr.Dispose(); Focus(); }
private async void FrmLogin_Load(object sender, EventArgs e) { try { if (Properties.Settings.Default.ip_add != "") { IP_Add = Properties.Settings.Default.ip_add; user_id = Properties.Settings.Default.user_id; user_pass = Properties.Settings.Default.user_pass; var p = new Ping(); var s = IP_Add; var r = p.Send(s); if (r != null && r.Status == IPStatus.Success) { await TestConnection(); if (Connected) { await XFilldesignation(); GetSettings(); } else { var tr = new T_Dashboard(); var svr = new FrmServerSettings(); tr.Show(this); svr.ShowDialog(); tr.Dispose(); Focus(); } } else { MessageBox.Show(@"Server has not been set-up. Please set-up server first!", @"Server setting", MessageBoxButtons.OK, MessageBoxIcon.Warning); var tr = new T_Dashboard(); var svr = new FrmServerSettings(); tr.Show(this); svr.ShowDialog(); tr.Dispose(); Focus(); } } else { MessageBox.Show(@"Server has not been set-up. Please set-up server first!", @"Server setting", MessageBoxButtons.OK, MessageBoxIcon.Warning); var tr = new T_Dashboard(); var svr = new FrmServerSettings(); tr.Show(this); svr.ShowDialog(); tr.Dispose(); Focus(); } } catch { MessageBox.Show(@"Server has not been set-up. Please set-up server first!", @"Server setting", MessageBoxButtons.OK, MessageBoxIcon.Warning); var tr = new T_Dashboard(); var svr = new FrmServerSettings(); tr.Show(this); svr.ShowDialog(); tr.Dispose(); Focus(); } }