示例#1
1
        private void gridView1_MouseDown(object sender, MouseEventArgs e)
        {

            _HitInfo = gridView1.CalcHitInfo(new Point(e.X, e.Y));
            HealthInst = ((HealthInstitutionBE)gridView1.GetRow(_HitInfo.RowHandle));

        }
        private void gridView_Details_MouseDown(object sender, MouseEventArgs e)
        {
            _HitInfo = gridView_Details.CalcHitInfo(new Point(e.X, e.Y));
            selectedDetails = ((MedicalEventDetail_ViewBE)gridView_Details.GetRow(_HitInfo.RowHandle));
            if (selectedDetails == null) return;

        }
        private void gridView1_MouseDown(object sender, MouseEventArgs e)
        {

            _HitInfo = gridView_Medicaments.CalcHitInfo(new Point(e.X, e.Y));
            _PatientMedicament_ViewBE = ((PatientMedicament_ViewBE)gridView_Medicaments.GetRow(_HitInfo.RowHandle));

        }
示例#4
0
        private void gridView1_MouseDown(object sender, MouseEventArgs e)
        {

            //  if (e.Button != MouseButtons.Right) return;
            _HitInfo = gridView1.CalcHitInfo(new Point(e.X, e.Y));
            currentShiftSheduling = ((ResourceSchedulingBE)gridView1.GetRow(_HitInfo.RowHandle));
    
        }
示例#5
0
        private void gridView1_MouseDown(object sender, MouseEventArgs e)
        {
          //  if (e.Button != MouseButtons.Right) return;
            _HitInfo = gridView1.CalcHitInfo(new Point(e.X, e.Y));


            SelectedPersona = ((PersonaBE)gridView1.GetRow(_HitInfo.RowHandle));
         
        }
        private void gridView1_MouseDown(object sender, MouseEventArgs e)
        {

            //  if (e.Button != MouseButtons.Right) return;
            _HitInfo = gridView1.CalcHitInfo(new Point(e.X, e.Y));
            SelectedProfesionalBE = ((Profesional_FullViewBE)gridView1.GetRow(_HitInfo.RowHandle));
            if (uc_ProfesionalesGrid_DoubleClick != null)
                uc_ProfesionalesGrid_DoubleClick(this, new EventArgs());
        }
        private void gridView2_MouseDown(object sender, MouseEventArgs e)
        {

            if (e.Button != MouseButtons.Left) return;
            _HitInfo = gridView2.CalcHitInfo(new Point(e.X, e.Y));
            uc_shedule_profesional_timeline1.SelectedProfesionalBE = ((Profesional_FullViewBE)gridView2.GetRow(_HitInfo.RowHandle));

            uc_shedule_profesional_timeline1.Set_ProfesionalChanged();


        }
示例#8
0
        private void gridView1_MouseDown(object sender, MouseEventArgs e)
        {

            _HitInfo = gridView1.CalcHitInfo(new Point(e.X, e.Y));
            _Event = ((MedicalEvent_ViewBE)gridView1.GetRow(_HitInfo.RowHandle));
            if (_Event != null)
            {
                using (WaitCursorHelper w = new WaitCursorHelper(this))
                {
                    uc_docprontviewer_11.Pupulate(Create_Doc());
                }
            }

        }
        private void gridView_Medicaments_MouseDown(object sender, MouseEventArgs e)
        {
            _HitInfo = gridView_Medicaments.CalcHitInfo(new Point(e.X, e.Y));
            selected_PatientMedicament = ((PatientMedicament_ViewBE)gridView_Medicaments.GetRow(_HitInfo.RowHandle));
            if (selected_PatientMedicament == null) return;

            if (selected_PatientMedicament.MedicalEventId.Equals(currentEvent.MedicalEventId) && selected_PatientMedicament.PatientMedicamentId_Parent.HasValue == false)
            {
                btnQuitarMedicamento.Enabled = true;
                m_quitar.Enabled = true;

                return;
            }
            btnQuitarMedicamento.Enabled = false;
            m_quitar.Enabled = false;
        }
示例#10
0
        /// <summary>
        /// 超链事件
        /// </summary>
        private void gvMainData_RowClick(object sender, RowClickEventArgs e)
        {
            GridView gridView = (GridView)sender;

            if (e.Button == MouseButtons.Left && e.Clicks == 1)
            {
                GridHitInfo hitInfo = gridView.CalcHitInfo(e.Location);
                if (hitInfo.InRowCell && hitInfo.Column == this.gc_LINK)
                {
                    //展示状态流
                    DataRow          dr     = _SummaryView.GetFocusedDataRow();
                    string           Key    = ConvertEx.ToString(dr[_bll.SummaryModel.PrimaryKey]);
                    frmCuPaymentFlow status = new frmCuPaymentFlow();
                    status.ShowForm(Key);
                }
            }
        }
示例#11
0
        /// <summary>
        /// 显示发票信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void gridView1_MouseDown(object sender, MouseEventArgs e)
        {
            GridHitInfo hInfo = gridView1.CalcHitInfo(new Point(e.X, e.Y));

            if (e.Button == MouseButtons.Left && e.Clicks == 1)
            {
                //判断光标是否在行范围内
                if (hInfo.InRow && (hInfo.Column != null) && hInfo.Column.FieldName.ToUpper() == "FA190" && gridView1.GetRowCellValue(hInfo.RowHandle, "FA190").ToString() != "00")
                {
                    string          s_fa001 = gridView1.GetRowCellValue(hInfo.RowHandle, "FA001").ToString();
                    Frm_InvoiceInfo frm_1   = new Frm_InvoiceInfo();
                    frm_1.swapdata["FA001"] = s_fa001;
                    frm_1.ShowDialog();
                    frm_1.Dispose();
                }
            }
        }
        private void gridView1_DoubleClick(object sender, EventArgs e)
        {
            GridView    view = (GridView)sender;
            Point       pt   = view.GridControl.PointToClient(Control.MousePosition);
            GridHitInfo info = view.CalcHitInfo(pt);

            if (info.InRow || info.InRowCell)
            {
                int fyId = Convert.ToInt32(view.GetRowCellValue(info.RowHandle, "FyID").ToString());

                FinancialYear obj = new FinancialYear();
                obj.Text = "Modify";
                obj.FyId = fyId;
                obj.ShowDialog();
                FillGrid();
            }
        }
示例#13
0
        private void gridControlCountries_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            GridHitInfo info = gridViewRegions.CalcHitInfo(e.X, e.Y);

            if (info.InRowCell && gridViewRegions.IsDataRow(info.RowHandle))
            {
                RegionView entity = GetEntityByRowHandle(info.RowHandle);
                if (entity != null)
                {
                    OnEntityDblClick();
                    if (!ReadOnly)
                    {
                        EditRegion();
                    }
                }
            }
        }
示例#14
0
        private void viewMouseMove(MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left && _downHitInfo != null)
            {
                Size dragSize = SystemInformation.DragSize;
                var  dragRect = new Rectangle(new Point(_downHitInfo.HitPoint.X - dragSize.Width / 2,
                                                        _downHitInfo.HitPoint.Y - dragSize.Height / 2), dragSize);

                if (!dragRect.Contains(new Point(e.X, e.Y)))
                {
                    var data = _presenter.SelectedDataColumns;
                    gridControl.DoDragDrop(data, DragDropEffects.Move);
                    _downHitInfo = null;
                    DXMouseEventArgs.GetMouseArgs(e).Handled = true;
                }
            }
        }
示例#15
0
        }//end function

        private void DoRowDoubleClick2(GridView view, Point pt)
        {
            GridHitInfo info = view.CalcHitInfo(pt);

            if (info.InRow || info.InRowCell)
            {
                txtDedCode.Text = gridView2.GetRowCellValue(info.RowHandle, "DedCode").ToString();
                txtDedAmt.Value = Convert.ToDecimal(gridView2.GetRowCellValue(info.RowHandle, "Amount").ToString());
            }


            object    o = new object();
            EventArgs e = new EventArgs();

            oldCode = txtSrNo.Text.ToString();
            txtDedCode_Validated(o, e);
        }
示例#16
0
        private void grvDataN_MouseDown(object sender, MouseEventArgs e)
        {
            GridView view = sender as GridView;

            downHitInfoN = null;

            GridHitInfo hitInfo = view.CalcHitInfo(new Point(e.X, e.Y));

            if (Control.ModifierKeys != Keys.None)
            {
                return;
            }
            if (e.Button == MouseButtons.Left && hitInfo.InRow && hitInfo.RowHandle != GridControl.NewItemRowHandle)
            {
                downHitInfoN = hitInfo;
            }
        }
示例#17
0
        private void GrdTrainView_MouseDown(object sender, MouseEventArgs e)
        {
            GridView view = sender as GridView;

            this.MouseDownHitInfo = null;

            GridHitInfo hitInfo = view.CalcHitInfo(new Point(e.X, e.Y));

            if (System.Windows.Forms.Control.ModifierKeys != Keys.None)
            {
                return;
            }
            if (e.Button == MouseButtons.Left && hitInfo.RowHandle >= 0)
            {
                this.MouseDownHitInfo = hitInfo;
            }
        }
示例#18
0
        private void gridView1_DoubleClick(object sender, EventArgs e)
        {
            GridView    grid = sender as GridView;
            GridHitInfo hi   = grid.CalcHitInfo(grid.GridControl.PointToClient(MousePosition));

            if (hi.InRow || hi.InRowCell)
            {
                Project pro = utility.GetSelectedItem <Project>();
                if (pro == null)
                {
                    return;
                }
                frmEditProject obj = new frmEditProject(pro);
                obj.update = InsertOrUpdate;
                obj.ShowDialog();
            }
        }
示例#19
0
 private void DoRowDoubleClick(GridView view, Point pt)
 {
     try
     {
         GridHitInfo info = view.CalcHitInfo(pt);
         if (info.InRow || info.InRowCell)
         {
             this.WindowState = FormWindowState.Minimized;
             SendKeys.SendWait("^v");
         }
     }
     catch (Exception ex)
     {
         ConsoleLib.ConsoleLib.WriteFormatted(ex.ToString() + "                    ", t);
         ConsoleLib.ConsoleLib.WriteLine(Environment.NewLine);
     }
 }
示例#20
0
        private void grvDataN_MouseMove(object sender, MouseEventArgs e)
        {
            GridView view = sender as GridView;

            if (e.Button == MouseButtons.Left && downHitInfo != null)
            {
                Size      dragSize = SystemInformation.DragSize;
                Rectangle dragRect = new Rectangle(new Point(downHitInfo.HitPoint.X - dragSize.Width / 2,
                                                             downHitInfo.HitPoint.Y - dragSize.Height / 2), dragSize);

                if (!dragRect.Contains(new Point(e.X, e.Y)))
                {
                    view.GridControl.DoDragDrop(downHitInfo, DragDropEffects.All);
                    downHitInfo = null;
                }
            }
        }
示例#21
0
 /// <summary>
 /// 双击列表事件
 /// edit by Yanqiao.Cai 2012-11-05
 /// add try ... catch
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void gridViewList_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         //edit by Yanqiao.Cai 2012-11-05 双击标题事件(直接返回)
         GridHitInfo hitInfo = gridViewList.CalcHitInfo(gridControlList.PointToClient(Cursor.Position));
         if (hitInfo.RowHandle < 0)
         {
             return;
         }
         ShowConsultationInfo();
     }
     catch (Exception ex)
     {
         MyMessageBox.Show(1, ex);
     }
 }
示例#22
0
        /// <summary>
        /// 双击查看会诊信息
        /// Modify by xlb 2013-04-01
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void gridViewList_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                #region 已注销 by xlb 2013-04-01

                //if (gridViewList.FocusedRowHandle >= 0)
                //{
                //    DataRow dr = gridViewList.GetDataRow(gridViewList.FocusedRowHandle);
                //    if (dr != null)
                //    {
                //        string noOfFirstPage = dr["NoOfInpat"].ToString();
                //        string consultTypeID = dr["ConsultTypeID"].ToString();
                //        string consultApplySn = dr["ConsultApplySn"].ToString();

                //        //if (consultTypeID == Convert.ToString((int)ConsultType.One))
                //        //{
                //        //    FormRecordForOne formRecordForOne = new FormRecordForOne(noOfFirstPage, m_app, consultApplySn);
                //        //    formRecordForOne.StartPosition = FormStartPosition.CenterParent;
                //        //    formRecordForOne.ShowDialog();
                //        //}
                //        //else
                //        //{
                //        FormRecordForMultiply formRecrodForMultiply = new FormRecordForMultiply(noOfFirstPage, m_app, consultApplySn);
                //        formRecrodForMultiply.StartPosition = FormStartPosition.CenterParent;
                //        if (dr["APPLYUSER"].ToString() != m_app.User.Id)
                //            formRecrodForMultiply.ReadOnlyControl();
                //        formRecrodForMultiply.ShowDialog();
                //        //}
                //        //Search();
                //    }
                //}

                #endregion
                GridHitInfo gridHit = gridViewList.CalcHitInfo(gridControlList.PointToClient(Cursor.Position));
                if (gridHit.RowHandle < 0)
                {
                    return;
                }
                ShowConsultInfo(gridHit.RowHandle);
            }
            catch (Exception ex)
            {
                MyMessageBox.Show(1, ex);
            }
        }
示例#23
0
        private void gridControl_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (!isUserWriteRight)
            {
                return;
            }
            GridHitInfo info = gridViewYearly.CalcHitInfo(e.X, e.Y);

            if (info.InRowCell && gridViewYearly.IsDataRow(info.RowHandle))
            {
                AvgAmount amount = GetEntityByRowHandle(info.RowHandle);
                if (amount != null && bi_EditYearlyAppearance.Enabled)
                {
                    EditEntity(amount);
                }
            }
        }
示例#24
0
            private void UpdateHotTrackedRow(Point location)
            {
                GridHitInfo hi = _View.CalcHitInfo(location);

                if (hi.HitTest == GridHitTest.Row || hi.HitTest == GridHitTest.RowEdge)
                {
                    return;
                }
                if (hi.InRow)
                {
                    HotTrackedRow = hi.RowHandle;
                }
                else
                {
                    HotTrackedRow = GridControl.InvalidRowHandle;
                }
            }
        private void UiVistaInventarioComprometido_MouseUp(object sender, MouseEventArgs e)
        {
            GridView view = sender as GridView;

            if (view == null)
            {
                return;
            }

            GridHitInfo hi = view.CalcHitInfo(new System.Drawing.Point(e.X, e.Y));

            if ((hi.HitTest == GridHitTest.Column || hi.HitTest == GridHitTest.GroupPanelColumn) &&
                hi.Column.Name.Equals("DX$CheckboxSelectorColumn"))
            {
                UsuarioSeleccionoVistaCompletaInventarioComprometidoEncabezado = true;
            }
        }
示例#26
0
        private void gridView1_DoubleClick(object sender, EventArgs e)
        {
            GridView    gridView = sender as GridView;
            GridHitInfo hitInfo  = gridView1.CalcHitInfo(gridView1.GridControl.PointToClient(MousePosition));

            if (hitInfo.InRow || hitInfo.InRowCell)
            {
                StaffPosition staffPosition = utility.GetSelectedItem <StaffPosition>();
                if (staffPosition == null)
                {
                    return;
                }
                frmEditStaffPosition obj = new frmEditStaffPosition(staffPosition);
                obj.update = InsertOrUpdate;
                obj.ShowDialog();
            }
        }
        private void SetupEventsHandlers()
        {
            timeSpanEditOffset.EditValueChanged += (s, e) =>
            {
                Settings.TimeOffset = (TimeSpan)timeSpanEditOffset.EditValue;
            };
            logGrid.MouseDown += (s, e) =>
            {
                GridHitInfo info = logGrid.CalcHitInfo(e.Location);
                if (info.InColumnPanel)
                {
                    teHeader.Tag  = info.Column;
                    teHeader.Text = info.Column.Caption;
                }
            };
            gridControl.MainView.Layout += (s, e) =>
            {
                try
                {
                    if (!string.IsNullOrEmpty(Settings.LogGridFileName))
                    {
                        gridControl.MainView.SaveLayoutToXml(Settings.LogGridFileName);
                    }
                }
                catch (Exception ex)
                {
                    AnalogyLogManager.Instance.LogError(ex.Message, "");
                }
            };

            sbtnHeaderSet.Click += (s, e) =>
            {
                if (!string.IsNullOrEmpty(teHeader.Text) && teHeader.Tag is DevExpress.XtraGrid.Columns.GridColumn column)
                {
                    column.Caption = teHeader.Text;
                    SaveGridLayout();
                }
            };

            sbtnDateTimeFormat.Click += (s, e) =>
            {
                logGrid.Columns["Date"].DisplayFormat.FormatType   = FormatType.DateTime;
                logGrid.Columns["Date"].DisplayFormat.FormatString = teDateTimeFormat.Text;
                Settings.DateTimePattern = teDateTimeFormat.Text;
            };
        }
示例#28
0
        private void gridView1_MouseMove(object sender, MouseEventArgs e)
        {
            GridView view = sender as GridView;

            if (e.Button == MouseButtons.Left && downHitInfor != null)
            {
                Size      dragSize = SystemInformation.DragSize;
                Rectangle dragRect = new Rectangle(new Point(downHitInfor.HitPoint.X - dragSize.Width / 2, downHitInfor.HitPoint.Y - dragSize.Height / 2), dragSize);
                if (!dragRect.Contains(new Point(e.X, e.Y)))
                {
                    DataRow row = view.GetDataRow(downHitInfor.RowHandle);
                    view.GridControl.DoDragDrop(row, DragDropEffects.Move);
                    downHitInfor = null;
                    DevExpress.Utils.DXMouseEventArgs.GetMouseArgs(e).Handled = true;
                }
            }
        }
示例#29
0
        private void GridControl_DoubleClick(object sender, EventArgs e)
        {
            //BandedGridView bView = sender as BandedGridView;
            ColumnView columnView = sender as ColumnView;

            Point pt = columnView.GridControl.PointToClient(Control.MousePosition);

            GridHitInfo info = columnView.CalcHitInfo(pt) as GridHitInfo;

            if (info.InRow || info.InRowCell)
            {
                string jobNo  = columnView.GetRowCellValue(info.RowHandle, "JOB_NO").ToString();
                string jobLot = columnView.GetRowCellValue(info.RowHandle, "JOB_LOT").ToString();

                this.ShowJobDetail(jobNo, jobLot);
            }
        }
示例#30
0
        private void Vista_MouseUp(object sender, MouseEventArgs e)
        {
            GridView vista = sender as GridView;

            if (vista == null)
            {
                return;
            }

            GridHitInfo hi = vista.CalcHitInfo(new System.Drawing.Point(e.X, e.Y));

            if ((hi.HitTest == GridHitTest.Column || hi.HitTest == GridHitTest.GroupPanelColumn) &&
                hi.Column.Name.Equals("DX$CheckboxSelectorColumn"))
            {
                ((ObjetoParaGuardarEnVista)vista.Tag).UsuarioSeleccionoListaCompleta = true;
            }
        }
示例#31
0
        private void gridView_MouseDown(object sender, MouseEventArgs e)
        {
#if DebugTest
            Log += "-gridView_MouseDown";
#endif
            isDoubleClicking = false;
            DevExpress.XtraGrid.Views.Grid.GridView view = (DevExpress.XtraGrid.Views.Grid.GridView)sender;
            GridHitInfo hi = view.CalcHitInfo(new Point(e.X, e.Y));
            if ((hi != null) && (hi.RowHandle >= 0))
            {
                mouseDownTime = System.Environment.TickCount;
            }
            else
            {
                mouseDownTime = 0;
            }
        }
        private void setCursor(object sender, MouseEventArgs e)
        {
            GridHitInfo hi = (sender as GridView).CalcHitInfo(new Point(e.X, e.Y));

            if (hi.Column == null)
            {
                return;
            }
            if (hi.Column.FieldName != "VOCID" && hi.Column.FieldName != "VOCNAME")
            {
                Cursor = System.Windows.Forms.Cursors.Hand;
            }
            else
            {
                Cursor = System.Windows.Forms.Cursors.Default;
            }
        }
示例#33
0
 private void gridView1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if (e.Button == System.Windows.Forms.MouseButtons.Left)
     {
         _mouseDownOrderID = 0;
         _mouseDownHit     = gridView1.CalcHitInfo(new Point(e.X, e.Y));
         if (_mouseDownHit.InDataRow)
         {
             Lvl2TableObj selected = _bindingList[gridView1.GetDataSourceRowIndex(_mouseDownHit.RowHandle)];
             if (_mouseDownHit.Column.Caption.Equals("Exch") && (selected.IsOurOrder))
             {
                 _mouseDownOrderID = selected.OrderID;
             }
             OnRowClicked?.Invoke(selected.Exch, selected.Price, selected.Size);
         }
     }
 }
示例#34
0
        private void gridControl_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (!isUserWriteRight)
            {
                return;
            }
            GridHitInfo info = gridView.CalcHitInfo(e.X, e.Y);

            if (info.InRowCell && gridView.IsDataRow(info.RowHandle))
            {
                Domain.WorkingModel entity = GetEntityByRowHandle(info.RowHandle);
                if (entity != null)
                {
                    FireEditEntity(entity);
                }
            }
        }
示例#35
0
        private void grdView_Click(object sender, EventArgs e)
        {
            Point       p    = grdView.GridControl.PointToClient(MousePosition);
            GridHitInfo info = grdView.CalcHitInfo(p);

            if (info.HitTest == GridHitTest.Column)
            {
                sortAsc     = (sortBy == info.Column.FieldName) ? (!sortAsc) : true;
                sortBy      = info.Column.FieldName;
                loadedCount = 0;

                overrideTable      = GetOverrideList(0, txtKeyboardInput.Text, getHowManyRows);
                grItems.DataSource = overrideTable;
            }
            CheckRowPosition();
            txtKeyboardInput.Select();
        }
        private void gridView_Details_MouseDown(object sender, MouseEventArgs e)
        {
            _HitInfo        = gridView_Details.CalcHitInfo(new Point(e.X, e.Y));
            selectedDetails = ((MedicalEventDetail_ViewBE)gridView_Details.GetRow(_HitInfo.RowHandle));
            if (selectedDetails == null)
            {
                return;
            }

            if (selectedDetails.MedicalEventId.Equals(selectedDetails.MedicalEventId))
            {
                btnQuitarDiag.Enabled = true;
                return;
            }

            btnQuitarDiag.Enabled = false;
        }
示例#37
0
        private void grdTasks_MouseDown(object sender, MouseEventArgs e)
        {
            GridView view = sender as GridView;

            downHitInfo = null;

            GridHitInfo hitInfo = view.CalcHitInfo(new Point(e.X, e.Y));

            if (Control.ModifierKeys != Keys.None)
            {
                return;
            }
            if (e.Button == MouseButtons.Left && hitInfo.InRow && hitInfo.HitTest != GridHitTest.RowIndicator)
            {
                downHitInfo = hitInfo;
            }
        }
        void OnGridViewTasksMouseMove(object sender, MouseEventArgs e)
        {
            GridView view = sender as GridView;

            if (e.Button == MouseButtons.Left && this.DownHitInfo != null)
            {
                Size      dragSize = SystemInformation.DragSize;
                Rectangle dragRect = new Rectangle(new Point(this.DownHitInfo.HitPoint.X - dragSize.Width / 2,
                                                             this.DownHitInfo.HitPoint.Y - dragSize.Height / 2), dragSize);

                if (!dragRect.Contains(new Point(e.X, e.Y)))
                {
                    view.GridControl.DoDragDrop(GetDragData(view), DragDropEffects.All);
                    this.DownHitInfo = null;
                }
            }
        }
        // вызов контекстного меню на методах
        public void gvMethod_MouseDown(object sender, MouseEventArgs e)
        {
            GridView    view = (GridView)sender;
            Point       pt   = view.GridControl.PointToClient(Control.MousePosition);
            GridHitInfo info = view.CalcHitInfo(pt);

            if (e.Button == MouseButtons.Right)
            {
                this.btnEditMethod.Enabled   = info.InRow;
                this.btnDeleteMethod.Enabled = info.InRow;
                this.pmMenuMethods.ShowPopup(MousePosition);
            }
            if (info.InRow & e.Button == MouseButtons.Left & e.Clicks == 2)
            {
                btnEditMethod_ItemClick(e, null);
            }
        }
 protected override PositionInfo CalcColumnDrag(GridHitInfo hit, GridColumn column)
 {
     var patchedPI = base.CalcColumnDrag(hit, column);
     if (patchedPI.Index != HideElementPosition || !patchedPI.Valid)
     {
         return patchedPI;
     }
     var col = column as CommonGridColumn;
     if (col == null)
     {
         return patchedPI;
     }
     if (!col.OptionsColumn.AllowQuickHide)
     {
         patchedPI = new PositionInfo
         {
             Valid = false
         };
     }
     return patchedPI;
 }
示例#41
0
 private void gridViewRqmt_MouseDown(object sender, MouseEventArgs e)
 {
     try
     {
         GridView view = sender as GridView;
         downHitInfo = null;
         GridHitInfo hitInfo = view.CalcHitInfo(new System.Drawing.Point(e.X, e.Y));
         if (Control.ModifierKeys != Keys.None) return;
         if (e.Button == MouseButtons.Left && hitInfo.RowHandle >= 0)
             downHitInfo = hitInfo;
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show("An error occurred while pressing the mouse button." + Environment.NewLine +
             "Error CNF-175 in " + FORM_NAME + ".gridViewRqmt_MouseDown(): " + ex.Message,
           MAIN_FORM_ERROR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
示例#42
0
 private void gridView_Params_MouseDown(object sender, MouseEventArgs e)
 {
     _GridHitInfoParam = gridView_Params.CalcHitInfo(new Point(e.X, e.Y));
     _param = gridView_Params.GetDataRow(_GridHitInfoParam.RowHandle);
     //label1.Text = string.Concat(_GridHitInfoParam.RowHandle.ToString(), 
     //    " InGroupPanel: ", _GridHitInfoParam.InGroupPanel.ToString(),
     //    " InGroupColumn: ", _GridHitInfoParam.InGroupColumn.ToString());
  
     if (_GridHitInfoParam.RowHandle < 0)
     {
         addNewKeyToolStripMenuItem.Enabled = true;
         removeSelectedsToolStripMenuItem.Enabled = false;
     }
     else
     {
         removeSelectedsToolStripMenuItem.Enabled = true;
         addNewKeyToolStripMenuItem.Enabled = true;
     }
 }
示例#43
0
        private void gridViewRqmt_MouseMove(object sender, MouseEventArgs e)
        {
            try
            {
                GridView view = sender as GridView;
                if (e.Button == MouseButtons.Left && downHitInfo != null)
                {
                    Size dragSize = SystemInformation.DragSize;
                    System.Drawing.Rectangle dragRect = new System.Drawing.Rectangle(new System.Drawing.Point(downHitInfo.HitPoint.X - dragSize.Width / 2,
                        downHitInfo.HitPoint.Y - dragSize.Height / 2), dragSize);

                    if (!dragRect.Contains(new System.Drawing.Point(e.X, e.Y)))
                    {
                        DataRow row = view.GetDataRow(downHitInfo.RowHandle);
                        RqmtData data = CollectionHelper.CreateObjectFromDataRow<RqmtData>(row);
                        view.GridControl.DoDragDrop(data, DragDropEffects.Move);
                        downHitInfo = null;
                        DevExpress.Utils.DXMouseEventArgs.GetMouseArgs(e).Handled = true;
                    }
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show("An error occurred while changing the mouse position." + Environment.NewLine +
                    "Error CNF-174 in " + FORM_NAME + ".gridViewRqmt_MouseMove(): " + ex.Message,
                  MAIN_FORM_ERROR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#44
0
        private void gridView2_MouseDown(object sender, MouseEventArgs e)
        {


            _HitInfo = gridView2.CalcHitInfo(new Point(e.X, e.Y));
            SelectedTimespamView = ((TimespamView)gridView2.GetRow(_HitInfo.RowHandle));
            if (SelectedTimespamView == null) return;
            if (e.Button != System.Windows.Forms.MouseButtons.Right) return;

            
            //double hora = SelectedTimespamView.Time.TotalHours;
            DateTime selectedTime = new DateTime(Date.Year, Date.Month, Date.Day, SelectedTimespamView.Time.Hours, SelectedTimespamView.Time.Minutes, 0);
            //TimeSpan tNow = new TimeSpan( System.DateTime.Now.Hour);
            //double hora2 = tNow.TotalHours;

            //Si ya paso
            if (DateTime.Compare(selectedTime, System.DateTime.Now) < 0)
            {
                mAsignarToolStripMenuItem.Enabled = false;
                mSetCanceled.Enabled = false;
                mCerrarTurnoToolStripMenuItem.Enabled = false;
                m_sobreturnoToolStripMenuItem.Enabled = false;
                return;
            }

            if (SelectedTimespamView.Appointment == null)
            {
                mAsignarToolStripMenuItem.Enabled = true;
                mCerrarTurnoToolStripMenuItem.Enabled = false;
                mSetCanceled.Enabled = false;
                m_sobreturnoToolStripMenuItem.Enabled = false;
                return;
            }
            
            //Si se selecciona el ultimo
            if (SelectedTimespamView == _TimespamViewList[_TimespamViewList.Count - 1])
            {
                m_sobreturnoToolStripMenuItem.Text = "Sobreturno";// Enum.GetName(typeof(AppoimantsStatus_SP), AppoimantsStatus_SP.Sobreturno);
                m_sobreturnoToolStripMenuItem.Tag = AppoimantsStatus_SP_type.Sobreturno;
            }
            else
            {
                m_sobreturnoToolStripMenuItem.Text = "Entreturno";// Enum.GetName(typeof(AppoimantsStatus_SP), AppoimantsStatus_SP.Entreturno);
                m_sobreturnoToolStripMenuItem.Tag = AppoimantsStatus_SP_type.Entreturno;
            }
            if (gridView2.SelectedRowsCount > 1)
            {
                mAsignarToolStripMenuItem.Enabled = false;
                mSetCanceled.Enabled = false;
                mCerrarTurnoToolStripMenuItem.Enabled = false;
                m_sobreturnoToolStripMenuItem.Enabled = false;
            }
            else
            {


                if (SelectedTimespamView.Appointment.IsExceptional)
                {
                    mAsignarToolStripMenuItem.Enabled = false;
                    mCerrarTurnoToolStripMenuItem.Enabled = false;
                    mSetCanceled.Enabled = true;
                    mEnEsperaToolStripMenuItem.Enabled = false;
                    m_atenderToolStripMenuItem.Enabled = true;
                    m_sobreturnoToolStripMenuItem.Enabled = false;
                }


                if (SelectedTimespamView.Appointment.Status == (int)AppoimantsStatus_SP.EnEspera)
                {
                    mAsignarToolStripMenuItem.Enabled = false;
                    mSetCanceled.Enabled = true;
                    mCerrarTurnoToolStripMenuItem.Enabled = false;
                    mEnEsperaToolStripMenuItem.Enabled = false ;
                    
                    m_sobreturnoToolStripMenuItem.Enabled = true;

                    m_atenderToolStripMenuItem.Enabled = true;
                }

                if (SelectedTimespamView.Appointment.Status == (int)AppoimantsStatus_SP.Reservado)
                {
                    mAsignarToolStripMenuItem.Enabled = false;
                    mSetCanceled.Enabled = true;
                    mCerrarTurnoToolStripMenuItem.Enabled = false;
                    mEnEsperaToolStripMenuItem.Enabled = true;
                    m_atenderToolStripMenuItem.Enabled = true;
                    m_sobreturnoToolStripMenuItem.Enabled = true ;
                }
                if (SelectedTimespamView.Appointment.Status == (int)AppoimantsStatus_SP.EnAtencion)
                {

                    mAsignarToolStripMenuItem.Enabled = false;
                    mCerrarTurnoToolStripMenuItem.Enabled = true;
                    mSetCanceled.Enabled = false;
                    mEnEsperaToolStripMenuItem.Enabled = false;
                    m_atenderToolStripMenuItem.Enabled = false;
                    m_sobreturnoToolStripMenuItem.Enabled = false;
                }
                if (SelectedTimespamView.Appointment.Status == (int)AppoimantsStatus_SP.Cerrado)
                {

                    mAsignarToolStripMenuItem.Enabled = false;
                    mCerrarTurnoToolStripMenuItem.Enabled = false;
                    mSetCanceled.Enabled = false;
                    mEnEsperaToolStripMenuItem.Enabled = false;
                    m_atenderToolStripMenuItem.Enabled = false;
                    m_sobreturnoToolStripMenuItem.Enabled = false;
                }
                if (SelectedTimespamView.Appointment.Status == (int)AppoimantsStatus_SP.Cancelado)
                {
                    mAsignarToolStripMenuItem.Enabled = true;
                    mCerrarTurnoToolStripMenuItem.Enabled = false;
                    mSetCanceled.Enabled = false;
                    mEnEsperaToolStripMenuItem.Enabled = false;
                    m_atenderToolStripMenuItem.Enabled = false;
                    m_sobreturnoToolStripMenuItem.Enabled = true;
                }


            }
        }
示例#45
0
        private void gridView2_MouseDown(object sender, MouseEventArgs e)
        {
            _GridHitInfo = gridView_config.CalcHitInfo(new Point(e.X, e.Y));
            _fwk_ConfigManager = gridView_config.GetDataRow(_GridHitInfo.RowHandle);
            if (_GridHitInfo.RowHandle < 0)
            {
                addNewKeyToolStripMenuItem.Enabled = true;
                removeSelectedsToolStripMenuItem.Enabled = false;
            }
            else
            {
                removeSelectedsToolStripMenuItem.Enabled = true;
                addNewKeyToolStripMenuItem.Enabled = true;
            }

        }
示例#46
0
 private void gridControlDetail_MouseDown(object sender, MouseEventArgs e)
 {
     _hitInfo = gridViewDetail.CalcHitInfo(new Point(e.X, e.Y));
     if (_hitInfo.RowHandle < 0) _hitInfo = null;
 }
示例#47
0
 public void gridView_Click(GridHitInfo gHitInfo, GridView view, bool? IsAdd, DataSet GridDataSet, string tableName)
 {
     if (tableName == "DIEM_THEO_DOI_NOP_BAI")
         DANopBai.Instance.processTEN_TAI_LIEU(gHitInfo, view, IsAdd, GridDataSet);
 }
示例#48
0
        private void gridView2_MouseDown(object sender, MouseEventArgs e)
        {


            _HitInfo = gridView2.CalcHitInfo(new Point(e.X, e.Y));
            SelectedAppointment = ((AppointmentBE)gridView2.GetRow(_HitInfo.RowHandle));
            if (SelectedAppointment == null) return;
            if (e.Button != System.Windows.Forms.MouseButtons.Right) return;

            if (SelectedAppointment == null)
            {
                m_atenderToolStripMenuItem.Enabled = false;
                m_cerrarTurnoToolStripMenuItem.Enabled = false;
                m_SetCanceled.Enabled = false;
                return;
            }

            if (gridView2.SelectedRowsCount > 1)
            {
                m_atenderToolStripMenuItem.Enabled = false;
                m_SetCanceled.Enabled = false;
                m_cerrarTurnoToolStripMenuItem.Enabled = false;
            }
            else
            {
                if (SelectedAppointment.Status == (int)AppoimantsStatus_SP.Expirado)
                {
                    m_atenderToolStripMenuItem.Enabled = false;
                    m_enEsperaToolStripMenuItem.Enabled = false;
                    m_SetCanceled.Enabled = false;
                    m_cerrarTurnoToolStripMenuItem.Enabled = false;
                    return;
                }
                if (SelectedAppointment.Status == (int)AppoimantsStatus_SP.Reservado)
                {
                    m_atenderToolStripMenuItem.Enabled = true;
                    m_enEsperaToolStripMenuItem.Enabled = true;
                    m_SetCanceled.Enabled = true;
                    m_cerrarTurnoToolStripMenuItem.Enabled = false;
                    return;
                    
                }
                if (SelectedAppointment.Status == (int)AppoimantsStatus_SP.EnAtencion)
                {
                    m_atenderToolStripMenuItem.Enabled = false;
                    m_enEsperaToolStripMenuItem.Enabled = false;
                    m_SetCanceled.Enabled = false;
                    m_cerrarTurnoToolStripMenuItem.Enabled = true;
                    
                    return;
                }
                if (SelectedAppointment.Status == (int)AppoimantsStatus_SP.Cerrado)
                {

                    m_atenderToolStripMenuItem.Enabled = false;
                    m_enEsperaToolStripMenuItem.Enabled = false;
                    m_SetCanceled.Enabled = false;
                    m_cerrarTurnoToolStripMenuItem.Enabled = false;
                    return;
                }
                if (SelectedAppointment.Status == (int)AppoimantsStatus_SP.Cancelado)
                {
                    m_atenderToolStripMenuItem.Enabled = true;
                    m_enEsperaToolStripMenuItem.Enabled = true;
                    m_SetCanceled.Enabled = false;
                    m_cerrarTurnoToolStripMenuItem.Enabled = false;
                    
                    return;
                }
            }
        }
示例#49
0
        private void gridView1_MouseDown(object sender, MouseEventArgs e)
        {

            _HitInfo1 = gridView1.CalcHitInfo(new Point(e.X, e.Y));
            selectedMutualPorPacienteBE = ((MutualPorPacienteBE)gridView1.GetRow(_HitInfo1.RowHandle));
       
        }
示例#50
0
        private void ShowHitInfo(GridHitInfo hi)
        {
            if (hi.InRowCell)
            {

                if (afr_counter != null)
                {
                    // fetch correct counter
                    int current_afrcounter = (int)afr_counter[(afr_counter.Length - ((hi.RowHandle + 1) * m_TableWidth)) + hi.Column.AbsoluteIndex];
                    // show number of measurements in balloon
                    string detailline = "# measurements: " + current_afrcounter.ToString();
                    toolTipController1.ShowHint(detailline, "Information", Cursor.Position);
                }
            }
            else
            {
                toolTipController1.HideHint();
            }
        }
示例#51
0
        private void gridView2_MouseDown(object sender, MouseEventArgs e)
        {
            _HitInfo = gridView2.CalcHitInfo(new Point(e.X, e.Y));
            selectedMutual = ((MutualBE)gridView2.GetRow(_HitInfo.RowHandle));

        }
		private void view_MouseUp(object sender, MouseEventArgs e)
		{
			_downHitInfo = null;
			DropTargetRowHandle = -1;
		}
示例#53
0
 private void GridHWGR_MouseDown(object sender, MouseEventArgs e)
 {
     hitInfoHwgr = gridHWGR.CalcHitInfo (e.X, e.Y);
     dragHWGR = (ViceHWGR)gridHWGR.GetRow(hitInfoHwgr.RowHandle);
     hitInfo = null;
     SelectEntity (dragHWGR, null);
 }
示例#54
0
 /// <summary>
 /// 鼠标点击事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void EFDevGrid_MouseDown(object sender, MouseEventArgs e)
 {
     try
     {
         downHitInfo = null;
         GridHitInfo hitInfo = gridView1.CalcHitInfo(new Point(e.X, e.Y));
         if (e.Button == MouseButtons.Left && hitInfo.InRow)
             downHitInfo = hitInfo;
         if (e.Button == MouseButtons.Right)
         {
            // gridView1.FocusedRowHandle =   hitInfo.RowHandle;
            // gridView1.SelectRow(hitInfo.RowHandle);
             DoShowContextMenu(hitInfo,e);
         }
     }
     catch (Exception ex)
     {
         System.Console.WriteLine(ex.Message);
     }
 }
示例#55
0
 ///<summary>Creates a new CustomToolTipEventArgs instance.</summary>
 public CustomToolTipEventArgs(GridHitInfo info)
 {
     if (info == null) throw new ArgumentNullException("info");
     HitInfo = info;
 }
		private void view_MouseMove(object sender, MouseEventArgs e)
		{
			var point = new Point(e.X, e.Y);
			if (sender is Control)
			{
				point = ((Control)sender).PointToScreen(new Point(e.X, e.Y));
				point = _view.GridControl.PointToClient(point);
			}
			if (e.Button != MouseButtons.Left || _downHitInfo == null) return;
			var dragSize = SystemInformation.DragSize;
			var dragRect = new Rectangle(new Point(_downHitInfo.HitPoint.X - dragSize.Width / 2,
				_downHitInfo.HitPoint.Y - dragSize.Height / 2), dragSize);

			if (dragRect.Contains(point)) return;
			_dragRowCursor = GetDragCursor(_downHitInfo.RowHandle, point);
			_view?.GridControl.DoDragDrop(_downHitInfo, DragDropEffects.All);
			_downHitInfo = null;
		}
		private void view_MouseDown(object sender, MouseEventArgs e)
		{
			var view = sender as GridView;
			_downHitInfo = null;
			DropTargetRowHandle = -1;
			if (view == null) return;
			var hitInfo = view.CalcHitInfo(new Point(e.X, e.Y));
			if (Control.ModifierKeys != Keys.None)
				return;
			if (e.Button == MouseButtons.Left &&
				(hitInfo.InRow || hitInfo.InRowCell) &&
				hitInfo.RowHandle != GridControl.NewItemRowHandle &&
				(!_handledColumns.Any() || _handledColumns.Any(hc => hc == hitInfo.Column)))
				_downHitInfo = hitInfo;
		}
示例#58
0
        private void grdTasks_MouseDown(object sender, MouseEventArgs e)
        {
            GridView view = sender as GridView;
            downHitInfo = null;

            GridHitInfo hitInfo = view.CalcHitInfo(new Point(e.X, e.Y));
            if (Control.ModifierKeys != Keys.None)
                return;
            if (e.Button == MouseButtons.Left && hitInfo.InRow && hitInfo.HitTest != GridHitTest.RowIndicator)
                downHitInfo = hitInfo;
        }
		private void GridControl_DragDrop(object sender, DragEventArgs e)
		{
			_downHitInfo = null;
			DropTargetRowHandle = -1;
			AfterDrop?.Invoke(sender, e);
		}
示例#60
0
        private void grdTasks_MouseMove(object sender, MouseEventArgs e)
        {
            GridView view = sender as GridView;
            if (e.Button == MouseButtons.Left && downHitInfo != null) {
                Size dragSize = SystemInformation.DragSize;
                Rectangle dragRect = new Rectangle(new Point(downHitInfo.HitPoint.X - dragSize.Width / 2,
                    downHitInfo.HitPoint.Y - dragSize.Height / 2), dragSize);

                if (!dragRect.Contains(new Point(e.X, e.Y))) {
                    view.GridControl.DoDragDrop(GetDragData(view), DragDropEffects.All);
                    downHitInfo = null;
                }
            }
        }