示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            comboBox1.Enabled       = false;
            button1.Enabled         = false;
            dateTimePicker1.Enabled = false;
            Lock = new object();

            lock (Lock)
            {
                MKdata = new TXF.K_data();
                times  = new TIMES(int.Parse(comboBox1.Text));
                simu   = new Simulation();
                mACD   = new Technical_analysis.MACD();
                InitChart();
            }


            if (T_Quote != null)
            {
                T_Quote.Abort();
            }
            if (T_GUI != null)
            {
                T_GUI.Abort();
            }

            T_Quote = new Thread(quote);
            T_Quote.Start();

            T_GUI = new Thread(gui);
            T_GUI.Start();
        }
示例#2
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (T_Quote != null)
     {
         T_Quote.Abort();
     }
     if (T_GUI != null)
     {
         T_GUI.Abort();
     }
 }