Beispiel #1
0
        /// <summary>
        /// 停止短期功率预测事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button2_Click(object sender, EventArgs e)
        {
            PredictPeriodTime predict = PredictPeriodTime.getPredictPeriodTime();

            predict.Stop();
            textBox1.Text = "stop\r\n";
        }
Beispiel #2
0
        /// <summary>
        /// 开启短期功率预测事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            PredictPeriodTime predict = PredictPeriodTime.getPredictPeriodTime();

            predict.refreshtxt = (arg) =>
            {
                this.Invoke(new Action(() =>
                {
                    textBox1.Text += arg + "\r\n";
                }));
            };
            predict.Start();
            textBox1.Text = "start\r\n";
        }