Ejemplo n.º 1
0
        /// <summary>
        /// 单击酶标仪孔事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BoardItem_Click(object sender, EventArgs e)
        {
            if (this.m_chkLockTemplate.Checked)
            {
                return;
            }

            ctlSTTextBox boardTextBox = sender as ctlSTTextBox;

            if (boardTextBox == null || !string.IsNullOrEmpty(boardTextBox.Text))
            {
                return;
            }
            if (boardTextBox.ReadOnly)
            {
                return;
            }

            clsSTBoardItem boardItem = boardTextBox.BoardItem as clsSTBoardItem;

            if (boardItem == null)
            {
                return;
            }

            clsSTBoardStyle boardItemStyle = boardItem.BoardStyle;

            if (boardItemStyle.SampleStyle != enmSTSampleStyle.NONE)
            {
                return;
            }

            boardItemStyle.SampleStyle = this.m_sampleStyle;
            switch (this.m_sampleStyle)
            {
            case enmSTSampleStyle.Common:
                boardItemStyle.SampleStyleNo = ++this.m_maxCommon;
                break;

            case enmSTSampleStyle.Standard:
                boardItemStyle.SampleStyleNo = ++this.m_maxStandard;
                break;

            case enmSTSampleStyle.Quality:
                boardItemStyle.SampleStyleNo = ++this.m_maxQuality;
                break;

            default:
                break;
            }
            boardTextBox.DoClick();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取微孔板样式的文字表现形式
        /// </summary>
        /// <param name="boardStyle"></param>
        /// <returns></returns>
        private string GetBoardItemStyle(clsSTBoardStyle boardStyle)
        {
            string result = string.Empty;

            switch (boardStyle.SampleStyle)
            {
            case enmSTSampleStyle.Blank:
                result = "B";
                break;

            case enmSTSampleStyle.Common:
                result = string.Format("{0}", boardStyle.SampleStyleNo.ToString().PadLeft(2, '0'));
                break;

            case enmSTSampleStyle.NONE:
                result = string.Empty;
                break;

            case enmSTSampleStyle.Negative:
                result = "N";
                break;

            case enmSTSampleStyle.Positive:
                result = "P";
                break;

            case enmSTSampleStyle.Quality:
                result = string.Format("Q{0}", boardStyle.SampleStyleNo.ToString().PadLeft(2, '0'));
                break;

            case enmSTSampleStyle.Standard:
                result = string.Format("S{0}", boardStyle.SampleStyleNo.ToString().PadLeft(2, '0'));
                break;

            default:
                break;
            }
            return(result);
        }
Ejemplo n.º 3
0
        private void m_cboTemplate_SelectedIndexChanged(object sender, EventArgs e)
        {
            clsBoardTemplate template = m_cboTemplate.SelectTemplate;

            if (template != null)
            {
                foreach (clsSTBoardItem item in m_lstBoard)
                {
                    item.BoardStyle.SampleStyle   = enmSTSampleStyle.NONE;
                    item.BoardStyle.SampleStyleNo = 0;

                    foreach (clsSTBoardItem templateItem in template.BoardItems)
                    {
                        if (item.Sequence == templateItem.Sequence)
                        {
                            clsSTBoardStyle boardStyle = new clsSTBoardStyle();
                            boardStyle.SampleStyle   = templateItem.BoardStyle.SampleStyle;
                            boardStyle.SampleStyleNo = templateItem.BoardStyle.SampleStyleNo;

                            item.BoardStyle = boardStyle;
                        }
                    }
                }

                foreach (ctlSTTextBox boxItem in m_lstSTTextBoxs)
                {
                    foreach (clsSTBoardItem item in m_lstBoard)
                    {
                        if (boxItem.BoardItem.Sequence == item.Sequence)
                        {
                            boxItem.BoardItem.BoardStyle = item.BoardStyle;
                        }
                    }
                }
            }
            m_selectTemplate = template;
        }