/// <summary>
        /// 执行
        /// </summary>
        /// <remarks></remarks>
        public void btn_OK_Click(object sender, EventArgs e)
        {
            var a = this.MyDataGridView1.DataSource;

            // 提取frmRolling中已经选择的要进行滚动的监测曲线图对象
            frmRolling RollingForm = APPLICATION_MAINFORM.MainForm.Form_Rolling;
            List <clsDrawing_Mnt_RollingBase> RollingMnts = RollingForm.F_SelectedDrawings.RollingMnt;
            // 提到表格中的数据
            int rowscount = this.MyDataGridView1.Rows.Count;

            object[] Date_Handle = new object[rowscount - 2 + 1];
            for (int rowNum = 0; rowNum <= rowscount - 2; rowNum++)
            {
                Date_Handle[rowNum] = new[] { this.MyDataGridView1[0, rowNum].Value, this.MyDataGridView1[1, rowNum].Value };
            }
            //将结果保存到文件中
            mySettings_Application mySetting = new mySettings_Application();

            mySetting.Curve_BatchProcessing = Date_Handle;             //将结果保存到文件中
            mySetting.Save();
            //
            //为每一个Excel图形创建一个线程
            foreach (clsDrawing_Mnt_RollingBase RollingMnt in RollingMnts)
            {
                Thread thd = new Thread(new System.Threading.ThreadStart(LockOrDelete));
                thd.Name = RollingMnt.Chart_App_Title;
                thd.Start(new[] { RollingMnt, Date_Handle });
            }
        }
Esempio n. 2
0
 /// <summary>
 /// 在此方法中,触发了滚动窗口的RollingDrawingsRefreshed事件:
 /// 刷新滚动窗口中的列表框的数据与其UI显示
 /// </summary>
 /// <remarks></remarks>
 public void OnRollingDrawingsRefreshed()
 {
     if (this.InvokeRequired)
     {
         this.BeginInvoke(new RollingDrawingsRefreshedHandler(this.OnRollingDrawingsRefreshed));
     }
     else
     {
         frmRolling with_1 = this;
         try
         {
             this.F_SelectedDrawings = RefreshUI_RollingDrawings();
             SelectedRollingDrawingsChanged(this.F_SelectedDrawings);
         }
         catch (Exception ex)
         {
             MessageBox.Show("在添加或者删除程序中的图表时,滚动窗口的界面刷新出错。" + "\r\n" + ex.Message + "\r\n" + "报错位置:" + ex.TargetSite.Name,
                             "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }
Esempio n. 3
0
 public Drawings_For_Rolling(frmRolling Sender)
 {
     RollingMnt    = new List <clsDrawing_Mnt_RollingBase>();
     SectionalView = null;
     PlanView      = null;
 }