/// <summary> /// 修改(必须实装) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnUpdate_Click(object sender, EventArgs e) { var gasPressureInfoEnteringForm = new GasPressureInfoEntering((GasPressure)gridView1.GetFocusedRow()); if (DialogResult.OK == gasPressureInfoEnteringForm.ShowDialog()) { RefreshData(); } }
/// <summary> /// 添加(必须实装) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAdd_Click(object sender, EventArgs e) { var gasPressureInfoEnteringForm = new GasPressureInfoEntering(); if (DialogResult.OK == gasPressureInfoEnteringForm.ShowDialog()) { RefreshData(); } }
private void mapControl_OP_OnMouseDown(object sender, IMapControlEvents2_OnMouseDownEvent e) { if (e.button == 1 && m_currentButton > 0) { //弹出右键菜单 //DataEditCommon.contextMenu.PopupMenu(e.x, e.y, this.mapControl_OP.hWnd); var pt = mapControl_OP.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(e.x, e.y); pt = SnapSetting.getSnapPoint(pt); switch (m_currentButton) { case 1: var gasPressureInfoEnteringForm = new GasPressureInfoEntering { GasPressurePoint = pt }; gasPressureInfoEnteringForm.ShowDialog(); //绘制瓦斯压力点 m_currentButton = 0; //解除当前按钮 break; case 2: var gasContentInfoEnteringForm = new GasContentInfoEntering { GasContentPoint = pt }; gasContentInfoEnteringForm.ShowDialog(); //绘制瓦斯含量点 m_currentButton = 0; //解除当前按钮 break; case 3: var gasGushQuantityInfoEnteringForm = new GasGushQuantityInfoEntering { GasGushQuantityPoint = pt }; gasGushQuantityInfoEnteringForm.ShowDialog(); //绘制瓦斯涌出量点 m_currentButton = 0; //解除当前按钮 break; } } }