Esempio n. 1
0
        private void Chart_DoubleClick(object sender, EventArgs e)
        {
            HistoryLines historyLines = new HistoryLines();

            historyLines.seriesCollection = ((Chart)sender).Series;
            historyLines.ShowDialog();
        }
Esempio n. 2
0
 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()); }
 }
Esempio n. 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 { }
 }
Esempio n. 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();
        }
Esempio n. 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()); }
 }
Esempio n. 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();
            }
        }