private void connection_test_button_Click(object sender, EventArgs e)
        {
            AlertGUI temp5 = new AlertGUI();

            temp5.setMessage("Attempting to connect to server....", "");
            temp5.Show();

            try
            {
                PDA_GUI.ServerConnection conn = new PDA_GUI.ServerConnection();
                conn.connect();

                temp5.Close();
                temp5.Dispose();

                conn.disconnect();
                AlertGUI temp3 = new AlertGUI();
                temp3.setMessage("Server Connected Successfully!", "");
                temp3.Show();
            }
            catch
            {
                AlertGUI temp2 = new AlertGUI();
                temp2.setMessage("Could not find server");


                //temp2.ShowDialog();
                temp2.Show();

                temp5.Close();
                temp5.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");


                    //temp.ShowDialog();
                    temp.Show();

                    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");


                        //temp2.ShowDialog();
                        temp2.Show();

                        temp2.Dispose();
                    }
                }
                catch
                {
                    AlertGUI temp2 = new AlertGUI();
                    temp2.setMessage("File Not Written");


                    //temp2.ShowDialog();
                    temp2.Show();
                }
            }
        }
        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");

                    //temp.ShowDialog();
                    temp.Show();

                    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");

                        //temp2.ShowDialog();
                        temp2.Show();

                        temp2.Dispose();
                    }
                }
                catch
                {

                    AlertGUI temp2 = new AlertGUI();
                    temp2.setMessage("File Not Written");

                    //temp2.ShowDialog();
                    temp2.Show();

                }
            }
        }
        private void connection_test_button_Click(object sender, EventArgs e)
        {
            AlertGUI temp5 = new AlertGUI();
            temp5.setMessage("Attempting to connect to server....", "");
            temp5.Show();

            try
            {
                PDA_GUI.ServerConnection conn = new PDA_GUI.ServerConnection();
                conn.connect();

                temp5.Close();
                temp5.Dispose();

                conn.disconnect();
                AlertGUI temp3 = new AlertGUI();
                temp3.setMessage("Server Connected Successfully!", "");
                temp3.Show();

            }
            catch
            {
                AlertGUI temp2 = new AlertGUI();
                temp2.setMessage("Could not find server");

                //temp2.ShowDialog();
                temp2.Show();

                temp5.Close();
                temp5.Dispose();

            }
        }