///<summary></summary> protected void OnSegmentDrawn(string drawingSegment) { ToothChartDrawEventArgs tArgs = new ToothChartDrawEventArgs(drawingSegment); if (SegmentDrawn != null) { SegmentDrawn(this, tArgs); } }
private void toothChart_SegmentDrawn(object sender,ToothChartDrawEventArgs e) { OnSegmentDrawn(e.DrawingSegement); }
private void toothChart_SegmentDrawn(object sender,ToothChartDrawEventArgs e) { if(radioPen.Checked){ ToothInitial ti=new ToothInitial(); ti.DrawingSegment=e.DrawingSegement; ti.InitialType=ToothInitialType.Drawing; ti.PatNum=PatCur.PatNum; ti.ColorDraw=panelDrawColor.BackColor; ToothInitials.Insert(ti); ToothInitialList=ToothInitials.Refresh(PatCur.PatNum); FillToothChart(true); } else if(radioEraser.Checked){ //for(int i=0;i<ToothInitialList.Count;i++){ for(int i=ToothInitialList.Count-1;i>=0;i--) {//go backwards if(ToothInitialList[i].InitialType!=ToothInitialType.Drawing) { continue; } if(ToothInitialList[i].DrawingSegment!=e.DrawingSegement) { continue; } ToothInitials.Delete(ToothInitialList[i]); ToothInitialList.RemoveAt(i); //no need to refresh since that's handled by the toothchart. } } else if(radioColorChanger.Checked){ for(int i=0;i<ToothInitialList.Count;i++){ if(ToothInitialList[i].InitialType!=ToothInitialType.Drawing){ continue; } if(ToothInitialList[i].DrawingSegment!=e.DrawingSegement){ continue; } ToothInitialList[i].ColorDraw=panelDrawColor.BackColor; ToothInitials.Update(ToothInitialList[i]); FillToothChart(true); } } }
///<summary></summary> protected void OnSegmentDrawn(string drawingSegment){ ToothChartDrawEventArgs tArgs=new ToothChartDrawEventArgs(drawingSegment); if(SegmentDrawn!=null){ SegmentDrawn(this,tArgs); } }
private void toothChart_SegmentDrawn(object sender, ToothChartDrawEventArgs e) { OnSegmentDrawn(e.DrawingSegement); }