示例#1
0
        private void stTextBox_TextChanged(object sender, EventArgs e)
        {
            ctlSTTextBox boardTextBox = sender as ctlSTTextBox;

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

            if (boardTextBox.ShowStatus == enmSTTextBoxShowStatus.BoardStyle)
            {
                boardTextBox.BoardItem.BoardStyle.SampleStyleNo = int.Parse(boardTextBox.Text);
            }

            if (boardTextBox.Text == string.Empty)
            {
                boardTextBox.BoardItem.BoardStyle.SampleStyle   = enmSTSampleStyle.NONE;
                boardTextBox.BoardItem.BoardStyle.SampleStyleNo = 0;
            }


            //if (boardTextBox.ShowStatus==enmSTTextBoxShowStatus.BoardStyle)
            //{
            //    if (boardTextBox.Text == string.Empty)
            //    {
            //        this.m_boardItem.BoardStyle.SampleStyle = enmSTSampleStyle.NONE;
            //        this.m_boardItem.BoardStyle.SampleStyleNo = 0;
            //    }
            //}
        }
示例#2
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();
        }
示例#3
0
        private void frmST360_Load(object sender, EventArgs e)
        {
            manager.DataChanged += new EventHandler <DataChangedEventArgs>(manager_DataChanged);

            foreach (clsSTBoardItem boardItem in manager.Data)
            {
                ctlSTTextBox stTextBox = new ctlSTTextBox(boardItem);
                stTextBox.Click       += new EventHandler(BoardItem_Click);
                stTextBox.TextChanged += new EventHandler(stTextBox_TextChanged);
                m_lstSTTextBoxs.Add(stTextBox);
                m_flpContent.Controls.Add(stTextBox);
            }

            this.m_sampleStyle      = enmSTSampleStyle.Common;
            this.m_txtBoardNO.Text  = DateTime.Now.ToString("yyMMdd") + "01";
            m_cmdAnalysis.Enabled   = false;
            m_cmdSubmitData.Enabled = false;
        }
示例#4
0
        private void stTextBox_TextChanged(object sender, EventArgs e)
        {
            ctlSTTextBox boardTextBox = sender as ctlSTTextBox;

            if (boardTextBox == null)
            {
                return;
            }

            if (boardTextBox.Text != string.Empty && boardTextBox.ShowStatus == enmSTTextBoxShowStatus.BoardStyle && this.m_sampleStyle == enmSTSampleStyle.Common)
            {
                boardTextBox.ReadOnly = false;
                try
                {
                    boardTextBox.BoardItem.BoardStyle.SampleStyleNo = int.Parse(boardTextBox.Text);
                }
                catch
                {
                    boardTextBox.BoardItem.BoardStyle.SampleStyleNo = 0;
                }
            }
        }
示例#5
0
        private void frmST360_Load(object sender, EventArgs e)
        {
            for (int i = 0; i < 96; i++)
            {
                clsSTBoardItem boardItem = new clsSTBoardItem();
                boardItem.Sequence = i + 1;
                m_lstBoard.Add(boardItem);
            }

            foreach (clsSTBoardItem boardItem in m_lstBoard)
            {
                ctlSTTextBox stTextBox = new ctlSTTextBox(boardItem);
                stTextBox.Click       += new EventHandler(BoardItem_Click);
                stTextBox.TextChanged += new EventHandler(stTextBox_TextChanged);
                m_lstSTTextBoxs.Add(stTextBox);
                m_flpContent.Controls.Add(stTextBox);
            }

            this.m_sampleStyle     = enmSTSampleStyle.Common;
            this.m_txtBoardNO.Text = DateTime.Now.ToString("yyMMdd") + "01";

            m_cmdAnalysis.Enabled   = false;
            m_cmdSubmitData.Enabled = false;
        }