コード例 #1
0
        /// <summary>
        /// When we try and log in to a new server, update accordingly.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void lvMacomberMapServers_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            ListViewHitTestInfo hti = lvMacomberMapServers.HitTest(e.Location);
            Exception           LoginError;

            if (hti.Item != null)
            {
                try
                {
                    MM_Server_Interface.Client.InnerChannel.Close();
                }
                catch
                { }
                if (MM_Server_Interface.TryLoginAgain(hti.Item.Text, ((MM_Server_Information)hti.Item.Tag).ServerURI, out LoginError))
                {
                    Data_Integration.RestartModel(MM_Server_Interface.Client);
                }
                else
                {
                    MessageBox.Show("Unable to log into Macomber Map Server: " + LoginError.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
コード例 #2
0
 private void ReloadModel()
 {
     MM_Server_Interface.LoadNetworkModel();
     Data_Integration.RestartModel(MM_Server_Interface.Client);
 }