コード例 #1
0
ファイル: Main.cs プロジェクト: IstvanRatoti/DVTAClient
        private void btnLogout_Click(object sender, EventArgs e)
        {
            //Upload and save the changes in the XML before logging out.
            try
            {
                ClientConnect.UploadUserXML(serverAddress, serverPort, userData, loggedInUser);
            }
            catch (System.Net.Sockets.SocketException)
            {
                MessageBox.Show("Could not connect to the server!\nThe changes will only be saved locally!", "Error!");
            }
            userData.Save(loggedInUser + ".xml");

            this.Close();
            //Login lgn = new Login();
            //lgn.ShowDialog();

            return;
        }