private void UcAnalsFrequency_TranferToLx(object sender, DataGridViewCellEventArgs e)
        {
            UcAnalsFrequency ucAnalsFrequency = (UcAnalsFrequency)(sender);

            e = ClickEventE;
            this.dgvCcAnalys1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = ucAnalsFrequency.GetSelectedContext();
            if (e.ColumnIndex == 8)
            {
                string SiText = this.dgvCcAnalys1.Rows[e.RowIndex].Cells[7].Value == null?"": this.dgvCcAnalys1.Rows[e.RowIndex].Cells[7].Value.ToString();
                if (SiText.Length > 0)
                {
                    string slStr = "Ri" + SiText + this.dgvCcAnalys1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
                    SetRiValue(slStr, e);
                }
            }
            if (e.ColumnIndex == 13)
            {
                string SText = this.dgvCcAnalys1.Rows[e.RowIndex].Cells[12].Value == null?"": this.dgvCcAnalys1.Rows[e.RowIndex].Cells[12].Value.ToString();
                if (SText.Length > 0)
                {
                    string slStr = "R" + SText + this.dgvCcAnalys1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
                    SetRiValue(slStr, e);
                }
            }
        }
 //创建窗体对象的静态方法
 public static UcAnalsFrequency InstanceObject()
 {
     if (_instance == null)
     {
         _instance = new UcAnalsFrequency();
     }
     return(_instance);
 }
        /// <summary>
        /// datagridview单击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgvCcAnalys1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                //选中“参数+引导词”
                if (e.ColumnIndex == 2)
                {
                    if (this.trvUcAnaly != null && this.trvUcAnaly.SelectedNode.Level == 2)
                    {
                        UcAnalyCombox ucAnalyCombox = UcAnalyCombox.InstanceObject();
                        //订阅事件
                        ClickEventE = e;
                        ucAnalyCombox.TransferToCombox       += new System.Action <object, DataGridViewCellEventArgs>(UcAnalyCombox_TransferToCombox);
                        ucAnalyCombox.ReceiveSelectedTreeNode = this.trvUcAnaly.Tag.ToString();
                        ucAnalyCombox.Focus();
                        ucAnalyCombox.Show();
                    }
                }
                //选中F0
                if (e.ColumnIndex == 5)
                {
                    UcAnalyProbility ucAnalyProbility = UcAnalyProbility.InstanceObject();
                    ucAnalyProbility.Text = "F0";
                    //订阅事件
                    ucAnalyProbility.TransferToFx += new System.Action <object, DataGridViewCellEventArgs>(UcAnalyProbility_TranferToFx);
                    ClickEventE = e;
                    ucAnalyProbility.Focus();
                    ucAnalyProbility.Show();
                }
                //选中Fs
                if (e.ColumnIndex == 11)
                {
                    UcAnalyProbility ucAnalyProbility = new UcAnalyProbility();
                    ucAnalyProbility.Text = "Fs";
                    //订阅事件
                    ucAnalyProbility.TransferToFx += new System.Action <object, DataGridViewCellEventArgs>(UcAnalyProbility_TranferToFx);
                    ClickEventE = e;
                    ucAnalyProbility.Show();
                }
                //选中Si
                if (e.ColumnIndex == 7)
                {
                    UcAnalyLevel ucAnalyLevel = UcAnalyLevel.InstanceObject();
                    ucAnalyLevel.Text = "Si";
                    //订阅事件
                    ucAnalyLevel.TransferToSx += new System.Action <object, DataGridViewCellEventArgs>(UcAnalyLevel_TranferToSx);
                    ClickEventE = e;
                    ucAnalyLevel.Focus();
                    ucAnalyLevel.Show();
                }
                //选中S
                if (e.ColumnIndex == 12)
                {
                    UcAnalyLevel ucAnalyLevel = UcAnalyLevel.InstanceObject();
                    ucAnalyLevel.Text = "S";
                    //订阅事件
                    ucAnalyLevel.TransferToSx += new System.Action <object, DataGridViewCellEventArgs>(UcAnalyLevel_TranferToSx);
                    ClickEventE = e;
                    ucAnalyLevel.Focus();
                    ucAnalyLevel.Show();
                }

                //选中Li
                if (e.ColumnIndex == 8)
                {
                    UcAnalsFrequency ucAnalsFrequency = UcAnalsFrequency.InstanceObject();
                    ucAnalsFrequency.Text = "Li";
                    //订阅事件
                    ucAnalsFrequency.TransferToLx += new System.Action <object, DataGridViewCellEventArgs>(UcAnalsFrequency_TranferToLx);
                    ClickEventE = e;
                    ucAnalsFrequency.Focus();
                    ucAnalsFrequency.Show();
                }

                //选中L
                if (e.ColumnIndex == 13)
                {
                    UcAnalsFrequency ucAnalsFrequency = UcAnalsFrequency.InstanceObject();
                    ucAnalsFrequency.Text = "L";
                    //订阅事件
                    ucAnalsFrequency.TransferToLx += new System.Action <object, DataGridViewCellEventArgs>(UcAnalsFrequency_TranferToLx);
                    ClickEventE = e;
                    ucAnalsFrequency.Focus();
                    ucAnalsFrequency.Show();
                }
            }
        }
 private void UcAnalsFrequency_FormClosing(object sender, FormClosingEventArgs e)
 {
     _instance = null;
 }