コード例 #1
0
        private void GV_Main_MouseDown(object sender, MouseEventArgs e)
        {
            GridHitInfo hitInfo = GV_Main.CalcHitInfo(e.Location);

            if (hitInfo == null || hitInfo.Column == null)
            {
                return;
            }
            if (hitInfo.InRowCell)
            {
                if (hitInfo.Column.RealColumnEdit is RepositoryItemCheckEdit)
                {
                    GV_Main.FocusedColumn    = hitInfo.Column;
                    GV_Main.FocusedRowHandle = hitInfo.RowHandle;
                    GV_Main.ShowEditor();
                    CheckEdit edit = GV_Main.ActiveEditor as CheckEdit;
                    if (edit == null)
                    {
                        return;
                    }
                    edit.Toggle();
                    DXMouseEventArgs.GetMouseArgs(e).Handled = true;
                    GV_Main.CloseEditor();
                }
            }
        }
コード例 #2
0
 private void GV_Main_MouseDown(object sender, MouseEventArgs e)
 {
     if (IsMuity)
     {
         GridHitInfo hitInfo = GV_Main.CalcHitInfo(e.Location);
         if (hitInfo == null || hitInfo.Column == null)
         {
             return;
         }
         if (hitInfo.InRowCell)
         {
             if (hitInfo.Column.RealColumnEdit is RepositoryItemCheckEdit)
             {
                 GV_Main.FocusedColumn    = hitInfo.Column;
                 GV_Main.FocusedRowHandle = hitInfo.RowHandle;
                 GV_Main.ShowEditor();
                 CheckEdit edit = GV_Main.ActiveEditor as CheckEdit;
                 if (edit == null)
                 {
                     return;
                 }
                 edit.Toggle();
                 DXMouseEventArgs.GetMouseArgs(e).Handled = true;
                 GV_Main.CloseEditor();
             }
         }
     }
     else
     {
         if (e.Button == System.Windows.Forms.MouseButtons.Left)
         {
             GridHitInfo hi = GV_Main.CalcHitInfo(e.Location);
             if (hi == null || hi.Column == null)
             {
                 return;
             }
             if (hi.InRowCell)
             {
                 if (hi.RowHandle == mouseDownCell.RowHandle && hi.Column == mouseDownCell.Column && mouseDownTime - DateTime.Now < DoubleClickInterval)
                 {
                     DoRowDoubleClick(sender as GridView, e.Location);
                 }
             }
             mouseDownCell = new GridCell(hi.RowHandle, hi.Column);
             mouseDownTime = DateTime.Now;
         }
     }
 }
コード例 #3
0
 private void GV_Main_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == System.Windows.Forms.MouseButtons.Left)
     {
         GridHitInfo hi = GV_Main.CalcHitInfo(e.Location);
         if (hi == null || hi.Column == null)
         {
             return;
         }
         if (hi.InRowCell)
         {
             if (hi.RowHandle == mouseDownCell.RowHandle && hi.Column == mouseDownCell.Column && DateTime.Now - mouseDownTime < DoubleClickInterval)
             {
                 DoRowDoubleClick(sender as GridView, e.Location);
             }
         }
         mouseDownCell = new GridCell(hi.RowHandle, hi.Column);
         mouseDownTime = DateTime.Now;
     }
 }
コード例 #4
0
        private void GV_Main_MouseDown(object sender, MouseEventArgs e)
        {
            GridHitInfo hitInfo = GV_Main.CalcHitInfo(e.Location);

            if (hitInfo == null || hitInfo.Column == null)
            {
                return;
            }
            if (hitInfo.Column.FieldName == "XR006")
            {
                GV_Main.FocusedColumn    = hitInfo.Column;
                GV_Main.FocusedRowHandle = hitInfo.RowHandle;
                //GV_Main.ShowEditor();
                ShowBosxMemo sbm = new ShowBosxMemo();
                sbm.SetMemo = GV_Main.GetRowCellValue(hitInfo.RowHandle, "XR006").ToString();
                sbm.ShowDialog();
                DXMouseEventArgs.GetMouseArgs(e).Handled = true;
                //GV_Main.CloseEditor();
            }
        }
コード例 #5
0
        private void GV_Main_MouseDown(object sender, MouseEventArgs e)
        {
            GridHitInfo hitInfo = GV_Main.CalcHitInfo(e.Location);

            if (hitInfo == null || hitInfo.Column == null)
            {
                return;
            }
            if (hitInfo.Column.FieldName == "XR005")
            {
                GridViewInfo info = (GridViewInfo)GV_Main.GetViewInfo();
                if (info != null)
                {
                    GridCellInfo cell = info.GetGridCellInfo(hitInfo.RowHandle, hitInfo.Column);
                    if (cell != null)
                    {
                        int mGrade = ((e.X - cell.Bounds.X) / 32) + 1;
                        if (e.Button == MouseButtons.Right)
                        {
                            mGrade = mGrade * -1;
                        }
                        GV_Main.SetRowCellValue(hitInfo.RowHandle, "XR005", mGrade);
                        DXMouseEventArgs.GetMouseArgs(e).Handled = true;
                    }
                }
            }
            else if (hitInfo.Column.FieldName == "XR006")
            {
                GV_Main.FocusedColumn    = hitInfo.Column;
                GV_Main.FocusedRowHandle = hitInfo.RowHandle;
                ShowBosxMemo sbm = new ShowBosxMemo();
                sbm.SetCanEdit = true;
                sbm.SetMemo    = GV_Main.GetRowCellValue(hitInfo.RowHandle, "XR006").ToString();
                if (sbm.ShowDialog() == DialogResult.OK)
                {
                    GV_Main.SetRowCellValue(hitInfo.RowHandle, "XR006", sbm.GetReturn);
                }
                DXMouseEventArgs.GetMouseArgs(e).Handled = true;
            }
        }
コード例 #6
0
        private void GV_Main_MouseDown(object sender, MouseEventArgs e)
        {
            GridHitInfo hitInfo = GV_Main.CalcHitInfo(e.Location);

            if (hitInfo == null || hitInfo.Column == null)
            {
                return;
            }
            if (hitInfo.InRowCell)
            {
                if (hitInfo.Column.RealColumnEdit is RepositoryItemCheckEdit)
                {
                    GV_Main.FocusedColumn    = hitInfo.Column;
                    GV_Main.FocusedRowHandle = hitInfo.RowHandle;
                    GV_Main.ShowEditor();
                    CheckEdit edit = GV_Main.ActiveEditor as CheckEdit;
                    if (edit == null)
                    {
                        return;
                    }
                    edit.Toggle();
                    DXMouseEventArgs.GetMouseArgs(e).Handled = true;
                    GV_Main.CloseEditor();
                }
                else if (hitInfo.Column.RealColumnEdit is RepositoryItemButtonEdit)
                {
                    GC_Main.Enabled          = false;
                    GV_Main.FocusedColumn    = hitInfo.Column;
                    GV_Main.FocusedRowHandle = hitInfo.RowHandle;
                    GV_Main.ShowEditor();
                    ButtonEdit   edit = (GV_Main.ActiveEditor as ButtonEdit);
                    EditorButton eb   = ((RepositoryItemButtonEdit)GV_Main.FocusedColumn.ColumnEdit).Buttons[0];
                    PerformClick(GV_Main.FocusedColumn.FieldName, edit, new ButtonPressedEventArgs(eb));
                    GV_Main.CloseEditor();
                    DXMouseEventArgs.GetMouseArgs(e).Handled = true;
                    GC_Main.Enabled = true;
                }
            }
        }