示例#1
0
 private void Form1_Load(object sender, EventArgs e)
 {
     vms = new VM(this);
     UI_VM_CONTAINER.Controls.Clear();
     th = new Thread(new ThreadStart(vms.getRemoteVM));
     th.Start();
 }
示例#2
0
        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            timer1.Enabled = false;
            if (th.IsAlive)
                th.Abort();

            th = null;
            vms = null;
        }