예제 #1
0
 public void GetYBChannelInfo()
 {
     try
     {
         ProDefine.g_YBsetting.Clear();
         string    SQL = "select * from " + YBChannelInfo + " where GUIDSTR='" + ProDefine.g_SMExpermentParam.GUID.ToString() + "'";
         DataTable dt  = AccessHelper.GetDataTableFromDB(SQL);
         if (dt != null)
         {
             if (dt.Rows.Count > 0)
             {
                 for (int i = 0; i < dt.Rows.Count; i++)
                 {
                     FucntionChannelInfo fc = new FucntionChannelInfo();
                     fc.IndexStr      = dt.Rows[i][1].ToString();
                     fc.FunctionName  = dt.Rows[i][2].ToString();
                     fc.ChannelNumber = Convert.ToInt32(dt.Rows[i][3].ToString());
                     fc.YBNumber      = Convert.ToInt32(dt.Rows[i][4].ToString());
                     fc.InfoType      = Convert.ToByte(dt.Rows[i][5].ToString());
                     ProDefine.g_FunctionChannel.Add(fc);
                 }
             }
         }
     }
     catch (System.Exception ex)
     {
     }
 }
예제 #2
0
        private void GetNowSelectYBInfo()
        {
            try
            {
                ChannelInfos yb = ProDefine.g_ChannelInfos.Where(m => m.FucntionName == m_NowGNFunction).SingleOrDefault();

                FucntionChannelInfo fc = ProDefine.g_FunctionChannel.Where(m => m.FunctionName == m_NowGNFunction && m.YBNumber == Convert.ToInt32(m_NowYB.Substring(2, m_NowYB.Length - 2))).SingleOrDefault();

                m_NowChannel     = fc.ChannelNumber;
                m_NowChannleType = yb.FunctionType;
            }
            catch (System.Exception ex)
            {
            }
        }
예제 #3
0
        private void OnItemClick(object sender, EventArgs e)
        {
            DXMenuItem item   = sender as DXMenuItem;
            string     YBName = item.Caption;



            int iindex = 1;

            m_NowYB                  = item.Caption;
            m_NowGNFunction          = this.m_ButtonList[0].Text;
            this.tChart2.Header.Text = m_NowYB + "--" + m_NowGNFunction;
            ChannelInfos yb = ProDefine.g_ChannelInfos.Where(m => m.FucntionName == m_NowGNFunction).SingleOrDefault();

            FucntionChannelInfo fc = ProDefine.g_FunctionChannel.Where(m => m.FunctionName == m_NowGNFunction && m.YBNumber == Convert.ToInt32(m_NowYB.Substring(2, m_NowYB.Length - 2))).SingleOrDefault();

            m_NowChannel     = fc.ChannelNumber;
            m_NowChannleType = yb.FunctionType;
            this.line1.Clear();
        }
예제 #4
0
        private void InsertDAADInfo(List <string> ContentStr, byte strType)
        {
            try
            {
                int RowCount = ContentStr.Count;
                int ColNum   = ContentStr[0].Split(',').Count();

                for (int i = 1; i < RowCount; i++)
                {
                    FucntionChannelInfo FC = new FucntionChannelInfo();

                    FC.IndexStr      = ContentStr[i].Split(',')[0];
                    FC.FunctionName  = ContentStr[i].Split(',')[1];
                    FC.ChannelNumber = Convert.ToInt32(ContentStr[i].Split(',')[2]);
                    FC.YBNumber      = Convert.ToInt32(ContentStr[i].Split(',')[3]);
                    FC.InfoType      = strType;
                    ProDefine.g_FunctionChannel.Add(FC);
                }
            }
            catch (System.Exception ex)
            {
            }
        }