Ejemplo n.º 1
0
 protected void OnSubItemEndEditing(SubItemEndEditingEventArgs e)
 {
     if (SubItemEndEditing != null)
     {
         SubItemEndEditing(this, e);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Accept or discard current value of cell editor control
        /// </summary>
        /// <param name="AcceptChanges">Use the _editingControl's Text as new SubItem text or discard changes?</param>
        public void EndEditing(bool AcceptChanges)
        {
            if (_editingControl == null)
            {
                return;
            }

            SubItemEndEditingEventArgs e = new SubItemEndEditingEventArgs(
                _editItem,                             // The item being edited
                _editSubItem,                          // The subitem index being edited
                AcceptChanges ?
                _editingControl.Text :                 // Use editControl text if changes are accepted
                _editItem.SubItems[_editSubItem].Text, // or the original subitem's text, if changes are discarded
                !AcceptChanges                         // Cancel?
                );

            OnSubItemEndEditing(e);

            _editItem.SubItems[_editSubItem].Text = e.DisplayText;

            _editingControl.Leave    -= new EventHandler(_editControl_Leave);
            _editingControl.KeyPress -= new KeyPressEventHandler(_editControl_KeyPress);

            _editingControl.Visible = false;

            _editingControl = null;
            _editItem       = null;
            _editSubItem    = -1;
        }
Ejemplo n.º 3
0
        private void ExitlistViewEx_SubItemEndEditing(object sender, ListViewEx.SubItemEndEditingEventArgs e)
        {
            try
            {
                ListViewEx.ListViewEx listviewex = (ListViewEx.ListViewEx)sender;

                switch (e.SubItem)
                {
                case 1:
                    if (e.Item.Index >= 0)
                    {
                        tempGlobalExitInfo[m_ExitSubsysindex * ConstPreDefine.MAX_CHANNEL_NUM + m_ExitSubsysChannelIndex].Delay_time[e.Item.Index] = float.Parse(e.DisplayText);
                    }
                    break;

                case 2:
                    if (e.Item.Index >= 0)
                    {
                        tempGlobalExitInfo[m_ExitSubsysindex * ConstPreDefine.MAX_CHANNEL_NUM + m_ExitSubsysChannelIndex].Hold_time[e.Item.Index] = float.Parse(e.DisplayText);
                    }
                    //tempExitInfo[m_ExitSubsysindex * ConstPreDefine.MAX_CHANNEL_NUM + m_ExitSubsysChannelIndex].exits[e.Item.Index].nDis = (short)int.Parse(e.DisplayText);
                    break;

                default: break;
                }
                //tempGlobalExitInfo.CopyTo(GlobalDataInterface.globalOut_GlobalExitInfo, 0);//add by xcw -20191209
            }
            catch (Exception ex)
            {
                Trace.WriteLine("VolveTestForm中函数ExitlistViewEx_SubItemEndEditing出错" + ex);
#if REALEASE
                GlobalDataInterface.WriteErrorInfo("VolveTestForm中函数ExitlistViewEx_SubItemEndEditing出错" + ex);
#endif
            }
        }
Ejemplo n.º 4
0
        private void lvGroups_SubItemEndEditing(object sender, LVE.SubItemEndEditingEventArgs e)
        {
            string newGroupName = e.DisplayText;

            if (m_prevGroupName != newGroupName)
            {
                ReplaceGroupName(m_prevGroupName, newGroupName);

                ChameleonFeatures cf = m_groups[m_prevGroupName];
                m_groups.Remove(m_prevGroupName);
                m_groups[newGroupName] = cf;
            }
        }
 public void EndEditing(bool AcceptChanges)
 {
     if (this._editingControl != null)
     {
         SubItemEndEditingEventArgs e = new SubItemEndEditingEventArgs(this._editItem, this._editSubItem, AcceptChanges ? this._editingControl.Text : this._editItem.SubItems[this._editSubItem].Text, !AcceptChanges);
         this.OnSubItemEndEditing(e);
         this._editItem.SubItems[this._editSubItem].Text = e.DisplayText;
         this._editingControl.Leave -= new EventHandler(this._editControl_Leave);
         this._editingControl.KeyPress -= new KeyPressEventHandler(this._editControl_KeyPress);
         this._editingControl.Visible = false;
         this._editingControl = null;
         this._editItem = null;
         this._editSubItem = -1;
     }
 }
Ejemplo n.º 6
0
 public void EndEditing(bool AcceptChanges)
 {
     if (this._editingControl != null)
     {
         SubItemEndEditingEventArgs e = new SubItemEndEditingEventArgs(this._editItem, this._editSubItem, AcceptChanges ? this._editingControl.Text : this._editItem.SubItems[this._editSubItem].Text, !AcceptChanges);
         this.OnSubItemEndEditing(e);
         this._editItem.SubItems[this._editSubItem].Text = e.DisplayText;
         this._editingControl.Leave    -= new EventHandler(this._editControl_Leave);
         this._editingControl.KeyPress -= new KeyPressEventHandler(this._editControl_KeyPress);
         this._editingControl.Visible   = false;
         this._editingControl           = null;
         this._editItem    = null;
         this._editSubItem = -1;
     }
 }
 protected void OnSubItemEndEditing(SubItemEndEditingEventArgs e)
 {
     if (this.SubItemEndEditing != null)
     {
         this.SubItemEndEditing(this, e);
     }
 }
Ejemplo n.º 8
0
		/// <summary>
		/// Accept or discard current value of cell editor control
		/// </summary>
		/// <param name="AcceptChanges">Use the _editingControl's Text as new SubItem text or discard changes?</param>
		public void EndEditing(bool AcceptChanges)
		{
			if (_editingControl == null)
				return;

			SubItemEndEditingEventArgs e = new SubItemEndEditingEventArgs(
				_editItem,		// The item being edited
				_editSubItem,	// The subitem index being edited
				AcceptChanges ?
					_editingControl.Text :	// Use editControl text if changes are accepted
					_editItem.SubItems[_editSubItem].Text,	// or the original subitem's text, if changes are discarded
				!AcceptChanges	// Cancel?
			);

			OnSubItemEndEditing(e);

			if (_editItem !=  null && _editItem.SubItems[_editSubItem]!= null)
			    _editItem.SubItems[_editSubItem].Text = e.DisplayText;

			_editingControl.Leave -= new EventHandler(_editControl_Leave);
			_editingControl.KeyPress -= new KeyPressEventHandler(_editControl_KeyPress);

			_editingControl.Visible = false;

			_editingControl = null;
			_editItem = null;
			_editSubItem = -1;
		}
Ejemplo n.º 9
0
 protected void OnSubItemEndEditing(SubItemEndEditingEventArgs e)
 {
     SubItemEndEditing?.Invoke(this, e);
 }