Esempio n. 1
0
 public static void ShowModal(string refText)
 {
     using (FrmPopupCURDGrid frm = new FrmPopupCURDGrid())
     {
         frm.RefText = refText;
         frm.ShowDialog();
     }
 }
Esempio n. 2
0
 public RefTextBox()
 {
     refForm = FrmPopupCURDGrid.GetForm();
     refForm.Owner = FindForm();
 }
Esempio n. 3
0
        void Control_KeyUp(object sender, KeyEventArgs e)
        {
            Rectangle rectCell = GetCellDisplayRectangle(CurrentCell.ColumnIndex, CurrentCell.RowIndex, true);
            string colName = Columns[CurrentCell.ColumnIndex].DataPropertyName;
            string controlText = (sender as Control).Text;

            //e.KeyCode!=Keys.Enter 条件可防止Enter回填时引发本过程,导致Ref窗体再次出现
            if (controlText.Length > 0 && EditingControl.Text!=oldEditingControlText && e.KeyCode!=Keys.Enter)
            {
                oldEditingControlText = EditingControl.Text;

                if (refForm == null)
                {
                    refForm = new FrmPopupCURDGrid();
                    refForm.Owner = FindForm();

                }
                refForm.RetAction = ColRetActions[colName];
                if (refForm.Visible == false)
                {
                    refForm.Visible = true;
                }
                Point formLocation = this.PointToScreen(rectCell.Location);
                refForm.Location = new Point(formLocation.X, formLocation.Y + rectCell.Height);
                refForm.RefreshList(ColPopupFuncs[colName](controlText));
            }
        }
Esempio n. 4
0
 public static FrmPopupCURDGrid GetForm()
 {
     if (ThisForm == null) ThisForm = new FrmPopupCURDGrid();
     return ThisForm;
 }