private void connection_test_button_Click(object sender, EventArgs e) { AlertGUI temp3 = new AlertGUI(); temp3.setMessage("Attempting to connect to server....", ""); temp3.Show(); try { Laptop_GUI.ServerConnection conn = new Laptop_GUI.ServerConnection(); conn.connect(); temp3.Close(); temp3.Dispose(); AlertGUI temp5 = new AlertGUI(); conn.disconnect(); temp5.setMessage("Server Connected Successfully!", ""); Cursor.Current = Cursors.WaitCursor; temp5.ShowDialog(); Cursor.Current = Cursors.Arrow; } catch { AlertGUI temp2 = new AlertGUI(); temp2.setMessage("Could not find server"); Cursor.Current = Cursors.WaitCursor; temp2.ShowDialog(); Cursor.Current = Cursors.Arrow; temp3.Close(); temp3.Dispose(); } }
private void save_setup_button_Click(object sender, EventArgs e) { try { if (writeConfigFile(null, this.patient_name_textbox.Text, this.hostname_textbox.Text, this.username_textbox.Text, this.password_textbox.Text)) { AlertGUI temp = new AlertGUI(); temp.setMessage("File Written", "whatever"); Cursor.Current = Cursors.WaitCursor; temp.ShowDialog(); Cursor.Current = Cursors.Arrow; temp.Dispose(); } } catch { try { if (writeConfigFile(null, this.patient_name_textbox.Text, this.hostname_textbox.Text, this.username_textbox.Text, this.password_textbox.Text)) { AlertGUI temp2 = new AlertGUI(); temp2.setMessage("File Written", "whatever"); Cursor.Current = Cursors.WaitCursor; temp2.ShowDialog(); Cursor.Current = Cursors.Arrow; temp2.Dispose(); } } catch { AlertGUI temp2 = new AlertGUI(); temp2.setMessage("File Not Written"); Cursor.Current = Cursors.WaitCursor; temp2.ShowDialog(); Cursor.Current = Cursors.Arrow; } } }
private void save_setup_button_Click(object sender, EventArgs e) { try { if (writeConfigFile(null, this.patient_name_textbox.Text, this.hostname_textbox.Text, this.username_textbox.Text, this.password_textbox.Text)) { AlertGUI temp = new AlertGUI(); temp.setMessage("File Written", "whatever"); Cursor.Current = Cursors.WaitCursor; temp.ShowDialog(); Cursor.Current = Cursors.Arrow; temp.Dispose(); } } catch { try { if (writeConfigFile(null, this.patient_name_textbox.Text, this.hostname_textbox.Text, this.username_textbox.Text, this.password_textbox.Text)) { AlertGUI temp2 = new AlertGUI(); temp2.setMessage("File Written","whatever"); Cursor.Current = Cursors.WaitCursor; temp2.ShowDialog(); Cursor.Current = Cursors.Arrow; temp2.Dispose(); } } catch { AlertGUI temp2 = new AlertGUI(); temp2.setMessage("File Not Written"); Cursor.Current = Cursors.WaitCursor; temp2.ShowDialog(); Cursor.Current = Cursors.Arrow; } } }
private void connection_test_button_Click(object sender, EventArgs e) { AlertGUI temp3 = new AlertGUI(); temp3.setMessage("Attempting to connect to server....", ""); temp3.Show(); try { Laptop_GUI.ServerConnection conn = new Laptop_GUI.ServerConnection(); conn.connect(); temp3.Close(); temp3.Dispose(); AlertGUI temp5 = new AlertGUI(); conn.disconnect(); temp5.setMessage("Server Connected Successfully!",""); Cursor.Current = Cursors.WaitCursor; temp5.ShowDialog(); Cursor.Current = Cursors.Arrow; } catch { AlertGUI temp2 = new AlertGUI(); temp2.setMessage("Could not find server"); Cursor.Current = Cursors.WaitCursor; temp2.ShowDialog(); Cursor.Current = Cursors.Arrow; temp3.Close(); temp3.Dispose(); } }