Пример #1
0
        private void OnRowDoubleClick(int p)
        {
            ODButtonPanelEventArgs pArgs = new ODButtonPanelEventArgs(SelectedItem, SelectedRow, MouseButtons.Left);

            if (RowDoubleClick != null)
            {
                RowDoubleClick(this, pArgs);
            }
        }
Пример #2
0
        private void OnClickButton(ODPanelItem itemClick)
        {
            ODButtonPanelEventArgs pArgs = new ODButtonPanelEventArgs(SelectedItem, SelectedRow, MouseButtons.Left);

            if (ItemClickBut != null)
            {
                ItemClickBut(this, pArgs);
            }
        }
Пример #3
0
		private void OnRowDoubleClick(int p) {
			ODButtonPanelEventArgs pArgs=new ODButtonPanelEventArgs(SelectedItem,SelectedRow,MouseButtons.Left);
			if(RowDoubleClick!=null) {
				RowDoubleClick(this,pArgs);
			}
		}
Пример #4
0
		private void OnClickButton(ODPanelItem itemClick) {
			ODButtonPanelEventArgs pArgs=new ODButtonPanelEventArgs(SelectedItem,SelectedRow,MouseButtons.Left);
			if(ItemClickBut!=null) {
				ItemClickBut(this,pArgs);
			}
		}
Пример #5
0
		private void panelQuickButtons_RowDoubleClick(object sender,ODButtonPanelEventArgs e) {
			FormProcButtonQuickEdit FormPBQ=new FormProcButtonQuickEdit();
			//Search through tags of the ODPanelItem for the PBQ.
			for(int i=0;e.Item!=null && i<e.Item.Tags.Count;i++) {
				if(e.Item.Tags[i].GetType()==typeof(ProcButtonQuick)){
					FormPBQ.pbqCur=(ProcButtonQuick)e.Item.Tags[i];
					break;
				}
			}
			if(FormPBQ.pbqCur==null) {//clicked on either a blank row or to the right of existing buttons on a row.
				FormPBQ.IsNew=true;
				FormPBQ.pbqCur=new ProcButtonQuick();
				FormPBQ.pbqCur.YPos=e.Row;//Set Row
				for(int i=0;i<listProcButtonQuicks.Count;i++){ //Set ItemOrder
					if(listProcButtonQuicks[i].YPos!=FormPBQ.pbqCur.YPos //Wrong row
						|| FormPBQ.pbqCur.ItemOrder>listProcButtonQuicks[i].ItemOrder) { //Already have a larger item order
							continue;
					}
					FormPBQ.pbqCur.ItemOrder=listProcButtonQuicks[i].ItemOrder+1;//new PBQ should have the highest item order in the row.
				}
			}
			FormPBQ.ShowDialog();
			if(FormPBQ.DialogResult!=DialogResult.OK) {
				return;
			}
			fillPanelQuickButtons();
		}
Пример #6
0
		///<summary>Handles single clicks that occur on button items. Not double clicks, not labels, and not empty space.</summary>
		private void panelQuickButtons_ItemClickBut(object sender,ODButtonPanelEventArgs e) {
			ProcButtonQuick pbq=null;
			for(int i=0;i<e.Item.Tags.Count;i++){
				if(e.Item.Tags[i].GetType()!=typeof(ProcButtonQuick)){
					continue;
				}
				pbq=(ProcButtonQuick)e.Item.Tags[i];//should always happen
			}
			if(pbq==null){
				return;//should never happen.
			}
			ProcButtonClicked(0,pbq);
		}