Exemplo n.º 1
0
        /// <summary>
        /// Handler for when our form is disposed
        /// </summary>
        public void FormDisposed(object sender, EventArgs e)
        {
            if (sender == createJoinForm)
            {
                createJoinForm = null;
            }

            if (sender == serviceProviderForm)
            {
                serviceProviderForm = null;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Show the service providers form
        /// </summary>
        /// <returns>True if a service provider was picked, false otherwise</returns>
        public bool DoShowServiceProviders()
        {
            if (serviceProviderForm == null)
            {
                username                      = null;
                serviceProviderForm           = new ChooseServiceProviderForm(peerObject, this);
                serviceProviderForm.Disposed += new System.EventHandler(this.FormDisposed);
            }
            if (serviceProviderForm.ShowDialog() == DialogResult.OK)
            {
                return(true);
            }

            // The didn't hit ok
            return(false);
        }