ThreadedMethod.Start C# (CSharp) Метод

Start() публичный Метод

Starts the method in a new thread.
public Start ( ) : void
Результат void
    public void Start()
    {
        if (pStart == null)
        {
            Thread Th = new Thread(tStart);
            System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false;
            Th.Start();
        }
        else
        {
            Thread Th = new Thread(pStart);
            System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false;
            Th.Start();
        }
    }

Usage Example

Пример #1
0
        /// <summary>
        /// Event: The login button has been clicked
        /// </summary>
        private void Button_Login_Click(object sender, EventArgs e)
        {
            // Diable constrols and show message
            Label_Status.Visible = true;
            Label_Status.Text    = "Logging in...";
            SetControlsEnabled(false);

            ThreadedMethod tMethod = new ThreadedMethod(login);

            tMethod.Start();
        }
All Usage Examples Of ThreadedMethod::Start