Пример #1
0
        /********************************************************************************************
        * Network Comunication Section - Client -> Server
        ********************************************************************************************/

        /// <summary>
        /// Sends the "Edit" command to the server
        /// </summary>
        private void ContentButton_Click(object sender, EventArgs e)
        {
            int col, row;

            spreadsheetPanel1.GetSelection(out col, out row);
            string address = gridToAddress(col, row);

            Send_DoneTyping(address);
            string content = contentBox.Text;

            personalSpreadsheet.CheckContentsAreValid(content);
            try
            {
                Networking.Send(warden, "Edit\t" + address + "\t" +
                                content + "\t\n");
            }
            catch (Exception err)
            {
                while (MessageBox.Show("Server is down, application will now close.", "", MessageBoxButtons.OK) == 0)
                {
                }
                Application.Exit();
            }
        }