Beispiel #1
0
 private void tbTime_CellClicked(object sender, CellEventArgs e)
 {
     if(e.Row<strBTime.Length){
         if(strBTime[e.Row]=='/'){
             strBTime.Replace('/','X',e.Row,1);
         }
         else{
             strBTime.Replace(strBTime[e.Row],'/',e.Row,1);
         }
     }
     FillTime();
 }
Beispiel #2
0
 private void tbApts_CellDoubleClicked(object sender, CellEventArgs e)
 {
     int currentSelection=tbApts.SelectedRow;
     int currentScroll=tbApts.ScrollValue;
     FormApptEdit FormAE=new FormApptEdit(ApptList[e.Row].AptNum);
     FormAE.PinIsVisible=true;
     FormAE.ShowDialog();
     if(FormAE.DialogResult!=DialogResult.OK)
         return;
     if(FormAE.PinClicked){
         if(!OKtoSendToPinboard(ApptList[e.Row])){
             return;
         }
         AptNumsSelected.Add(ApptList[e.Row].AptNum);
         oResult=OtherResult.CopyToPinBoard;
         DialogResult=DialogResult.OK;
     }
     else{
         Filltb();
         tbApts.SetSelected(currentSelection,true);
         tbApts.ScrollValue=currentScroll;
     }
 }
    private void tbAutoItem_CellDoubleClicked(object sender, CellEventArgs e){
      AutoCodeItem AutoCodeItemCur=listForCode[tbAutoItem.SelectedRow];
      FormAutoItemEdit FormAIE=new FormAutoItemEdit();
			FormAIE.AutoCodeItemCur=AutoCodeItemCur;
      FormAIE.ShowDialog();
      FillTable(); 
    }
Beispiel #4
0
 private void tbDefs_CellDoubleClicked(object sender, CellEventArgs e)
 {
     tbDefs.BackGColor[0,e.Row]=SystemColors.Highlight;
     tbDefs.BackGColor[1,e.Row]=SystemColors.Highlight;
     tbDefs.Refresh();
     DefsIsSelected=true;
     DefsSelected=e.Row;
     if(lookupCat[listCategory.SelectedIndex]==DefCat.ImageCats) {
         FormDefEditImages FormDEI=new FormDefEditImages(DefsList[e.Row]);
         FormDEI.IsNew=false;
         FormDEI.ShowDialog();
     }
     else {
         FormDefEdit FormDefEdit2 = new FormDefEdit(DefsList[e.Row]);
         FormDefEdit2.IsNew=false;
         FormDefEdit2.ShowDialog();
         //Preferences2.GetCatList(listCategory.SelectedIndex);
     }
     changed=true;
     FillDefs();
 }
		private void tbContacts_CellDoubleClicked(object sender, CellEventArgs e){
			FormContactEdit FormCE=new FormContactEdit();
			FormCE.ContactCur=ContactList[e.Row];
			FormCE.ShowDialog();
			if(FormCE.DialogResult==DialogResult.OK)
				FillGrid();
		}
Beispiel #6
0
 private void tbDefs_CellClicked(object sender, CellEventArgs e)
 {
     if(tbDefs.Cell.GetLength(1)==0) {//Last row was deleted.
         return;
     }
     //Can't move this logic into the Table control because we never want to paint on col 3
     if(DefsIsSelected){
         if(DefsSelected==e.Row){
             tbDefs.BackGColor[0,e.Row]=Color.White;
             tbDefs.BackGColor[1,e.Row]=Color.White;
             DefsIsSelected=false;
         }
         else{
             tbDefs.BackGColor[0,DefsSelected]=Color.White;
             tbDefs.BackGColor[1,DefsSelected]=Color.White;
             tbDefs.BackGColor[0,e.Row]=Color.LightGray;
             tbDefs.BackGColor[1,e.Row]=Color.LightGray;
             DefsSelected=e.Row;
             DefsIsSelected=true;
         }
     }
     else{
         tbDefs.BackGColor[0,e.Row]=Color.LightGray;
         tbDefs.BackGColor[1,e.Row]=Color.LightGray;
         DefsSelected=e.Row;
         DefsIsSelected=true;
     }
     tbDefs.Refresh();
 }
Beispiel #7
0
		private void tbCommlog_CellDoubleClicked(object sender, CellEventArgs e){
			FormCommItem FormCI=new FormCommItem((Commlog)ALCommItems[e.Row]);
			FormCI.ShowDialog();
			FillComm();
		}		
Beispiel #8
0
		}//end FillProcedures

		private void tbProc_CellClicked(object sender, CellEventArgs e){
			if(textAddTime.errorProvider1.GetError(textAddTime)!=""
				//|| textDateTerm.errorProvider1.GetError(textDateTerm)!=""
				){
				MessageBox.Show(Lan.g(this,"Please fix data entry errors first."));
				return;
			}
			if(AptCur.AptStatus==ApptStatus.Complete){
				//added procedures would be marked complete when form closes. We'll just stop it here.
				if(!Security.IsAuthorized(Permissions.ProcComplCreate)){
					return;
				}
			}
			procsHaveChanged=true;
			Procedure ProcCur=arrayProc[ApptProc2[e.Row].Index];
			//Procedure ProcOld=ProcCur.Copy();
			if(AptCur.AptStatus==ApptStatus.Planned){
				if(ProcCur.PlannedAptNum==AptCur.AptNum){
					ProcCur.PlannedAptNum=0;
				}
				else{
					ProcCur.PlannedAptNum=AptCur.AptNum;
				}
				Procedures.UpdatePlannedAptNum(ProcCur.ProcNum,ProcCur.PlannedAptNum);
			}
			else{//not Planned
				if(ProcCur.AptNum==AptCur.AptNum){
					ProcCur.AptNum=0;
				}
				else{
					ProcCur.AptNum=AptCur.AptNum;
				}
				Procedures.UpdateAptNum(ProcCur.ProcNum,ProcCur.AptNum);
			}
			//changing the AptNum of a proc does not affect the recall synch, so no synch here.
			//Procedures.Update(ProcCur,ProcOld);
			//ProcCur.Update(ProcOld);
			int scroll=tbProc.ScrollValue;
			FillProcedures();
			tbProc.ScrollValue=scroll;
			CalculateTime();
			FillTime();
		}
Beispiel #9
0
		///<summary></summary>
		protected virtual void OnCellDoubleClicked(CellEventArgs e){
			if(CellDoubleClicked !=null){
				CellDoubleClicked(this,e);
			}
		}
Beispiel #10
0
		private void tbZips_CellDoubleClicked(object sender, CellEventArgs e){
			if(tbZips.SelectedRow==-1){
				return;
			}
      FormZipCodeEdit FormZCE=new FormZipCodeEdit();
			FormZCE.ZipCodeCur=ZipCodes.List[tbZips.SelectedRow];
			FormZCE.ShowDialog();
			if(FormZCE.DialogResult!=DialogResult.OK){
				return;
			}
			changed=true;
			FillTable(); 
		}