Пример #1
0
        private void addtxtbox(int num, TextBox txtbox)
        {
            txtbox.Visible = true;
            Rectangle rect2 = DgvList.GetCellDisplayRectangle(num, SelectRowIndex, true);

            txtbox.Size = rect2.Size;
            txtbox.Top  = rect2.Top;
            txtbox.Left = rect2.Left;
            string str = DgvList[num, SelectRowIndex].Value.ToString();

            if (str.Contains("("))
            {
                txtbox.Text = str.Split('(')[0].ToString();
            }
            else
            {
                txtbox.Text = IsNumeric(str).ToString();
            }
            txtbox1_TextChanged(null, null);
            if (isSencond)
            {
                txtbox2_TextChanged(null, null);
            }
            isSencond = false;
        }
Пример #2
0
        private void addcontrols(int col, int row, Control con)
        {
            con.Visible = true;
            Rectangle rect = DgvList.GetCellDisplayRectangle(col, row, true);

            con.Size = rect.Size;
            con.Top  = rect.Top;
            con.Left = rect.Left;
        }
Пример #3
0
        private void addTypebox(int num, ComboBox cb)
        {
            Rectangle rect = DgvList.GetCellDisplayRectangle(num, SelectRowIndex, true);

            cb.Visible = true;
            cb.Size    = rect.Size;
            cb.Top     = rect.Top;
            cb.Left    = rect.Left;
            cb.Text    = DgvList[num, SelectRowIndex].Value.ToString();
        }
Пример #4
0
        private void addtimetxt(int num)
        {
            timetxt.Visible = true;
            Rectangle rect2 = DgvList.GetCellDisplayRectangle(num, SelectRowIndex, true);

            timetxt.Size = rect2.Size;
            timetxt.Top  = rect2.Top;
            timetxt.Left = rect2.Left;
            string str = DgvList[num, SelectRowIndex].Value.ToString();

            if (str.Contains(":"))
            {
                timetxt.Text = HDLPF.GetTimeFromString(str, ':');
            }
            else
            {
                timetxt.Text = "0:0";
            }
            timetxt_TextChanged(null, null);
        }