Esempio n. 1
0
        private void ButtonPing_Click(object sender, EventArgs e)
        {
            var settings = GetFormSettings();

            var pingResult = Subsonic.PingServer(settings);

            if (pingResult)
            {
                const string text    = "The server responded normally";
                const string caption = "Ping response OK";
                MessageBox.Show(text, caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                const string text    = "The server did not respond to Ping as expected!";
                const string caption = "Ping response not OK";
                MessageBox.Show(text, caption, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }