コード例 #1
0
        private void btnSet_Click(object sender, System.EventArgs e)
        {
            if (this.lsvWarn.SelectedItems.Count <= 0)
            {
                MessageBox.Show("请选择一行要编辑的参数!");
                return;
            }

            string strZhanName  = this.lsvWarn.SelectedItems[0].Text.Trim();
            string strParamName = this.lsvWarn.SelectedItems[0].SubItems[1].Text.Trim();
            string strILow      = this.lsvWarn.SelectedItems[0].SubItems[2].Text.Trim();
            string strIHigh     = this.lsvWarn.SelectedItems[0].SubItems[3].Text.Trim();

            frmSetWarnLev frmSWObj = new frmSetWarnLev();

            frmSWObj.m_strParamName = strParamName;
            frmSWObj.m_strZhanName  = strZhanName;
            frmSWObj.m_strILow      = strILow;
            frmSWObj.m_strIHigh     = strIHigh;
            frmSWObj.ShowDialog();

            this.paintParams();
        }
コード例 #2
0
ファイル: frmWarnLevel.cs プロジェクト: hkiaipc/yh
        private void btnSet_Click(object sender, System.EventArgs e)
        {
            if(this.lsvWarn.SelectedItems.Count<=0)
            {
                MessageBox.Show("��ѡ��һ��Ҫ�༭�IJ�����");
                return;
            }

            string strZhanName=this.lsvWarn.SelectedItems[0].Text.Trim();
            string strParamName=this.lsvWarn.SelectedItems[0].SubItems[1].Text.Trim();
            string strILow=this.lsvWarn.SelectedItems[0].SubItems[2].Text.Trim();
            string strIHigh=this.lsvWarn.SelectedItems[0].SubItems[3].Text.Trim();

            frmSetWarnLev frmSWObj=new frmSetWarnLev();
            frmSWObj.m_strParamName=strParamName;
            frmSWObj.m_strZhanName=strZhanName;
            frmSWObj.m_strILow=strILow;
            frmSWObj.m_strIHigh=strIHigh;
            frmSWObj.ShowDialog();

            this.paintParams();
        }