示例#1
0
        private void Chart_DoubleClick(object sender, EventArgs e)
        {
            HistoryLines historyLines = new HistoryLines();

            historyLines.seriesCollection = ((Chart)sender).Series;
            historyLines.ShowDialog();
        }
示例#2
0
文件: TagReplace.cs 项目: zzh-git/KS
 private void dataGridView1_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         HistoryLines m_frmHistoryLines = new HistoryLines(UnitNO);
         m_frmHistoryLines.labelTag.TagID   = int.Parse(dataGridView1.CurrentRow.Cells["TagID"].Value.ToString());
         m_frmHistoryLines.labelTag.TagDesc = dataGridView1.CurrentRow.Cells["TagDesc"].Value.ToString();
         m_frmHistoryLines.Show();
     }
     catch (Exception ex) { WriteLog.WriteLogs(ex.ToString()); }
 }
示例#3
0
 private void Label_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         HistoryLines m_frmHistoryLines = new HistoryLines(5);
         Label        label             = (Label)sender;
         m_frmHistoryLines.labelTag.TagID   = ((LabelTag)label.Tag).TagID;
         m_frmHistoryLines.labelTag.TagDesc = ((LabelTag)label.Tag).TagDesc;
         m_frmHistoryLines.Show();
     }
     catch { }
 }
示例#4
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            dtCheckedTags = m_viewTagValue.Table.GetChanges();
            List <DataRow> lstDeleteRows = new List <DataRow>();

            if (dtCheckedTags != null)
            {
                foreach (DataRow row in dtCheckedTags.Rows)
                {
                    if (row["CheckRow"].ToString() == "1")
                    {
                        sExcelCells += row["ExcelCell"] + ",";
                    }
                    else
                    {
                        lstDeleteRows.Add(row);
                    }
                }
                sExcelCells = sExcelCells.Trim(',');
                if (lstDeleteRows.Count > 0)
                {
                    foreach (DataRow row in lstDeleteRows)
                    {
                        dtCheckedTags.Rows.Remove(row);
                    }
                }
            }
            //this.Close();
            //else
            //{
            //    MessageBox.Show("请选择测点!");
            //}

            //SelectTagDate在生成对象调用时,由ShowDialog()改成了Show();
            //因为用ShowDialog()时也会造成窗口无反应的假死现象,所以加了下面的语句。add by hlt 2017-1-18
            HistoryLines historyLines = new HistoryLines(UnitNO);

            if (sExcelCells.Length > 0)
            {
                historyLines.SetBeginTime(BeginTime);
                historyLines.SetEndTime(EndTime);
                historyLines.SetExcelCells(sExcelCells);
                historyLines.SetCheckedTags(dtCheckedTags);
            }
            else
            {
                historyLines.seriesCollection = chartParent.Series;
            }
            historyLines.Show();
            //this.Hide();
            this.Close();
        }
示例#5
0
 private void Label_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         LabelTag labelTag = (LabelTag)((Label)sender).Tag;
         if (labelTag.TagID > 0)
         {
             HistoryLines m_frmHistoryLines = new HistoryLines();
             m_frmHistoryLines.labelTag.TagID   = labelTag.TagID;
             m_frmHistoryLines.labelTag.TagDesc = labelTag.TagDesc;
             m_frmHistoryLines.ShowDialog();
         }
     }
     catch (Exception ex) { WriteLog.WriteLogs(ex.ToString()); }
 }
示例#6
0
        private void btnHis_Click(object sender, EventArgs e)
        {
            SelectTagDate selectTagDate = new SelectTagDate();
            HistoryLines  historyLines  = new HistoryLines();

            selectTagDate.ShowDialog();
            if (selectTagDate.bIsClose == false)
            {
                if (selectTagDate.sExcelCells.Length > 0)
                {
                    historyLines.SetBeginTime(selectTagDate.BeginTime);
                    historyLines.SetEndTime(selectTagDate.EndTime);
                    historyLines.SetExcelCells(selectTagDate.sExcelCells);
                    historyLines.SetCheckedTags(selectTagDate.dtCheckedTags);
                }
                else
                {
                    historyLines.seriesCollection = (chart1).Series;
                }
                historyLines.ShowDialog();
            }
        }