Пример #1
0
 //Desc: adds hole of complex hole number to end of array
 private void addComplexHole(int c_current_hole, int p)
 {
     holeLib h = new holeLib();
     h.h_num = c_current_hole;
     h.t_color = getComplexTeeColor(p);
     h.b_letter = getComplexLetter(p);
     h.h_par = getComplexPar(p);
     h.h_yardage = getComplexYard(p);
     holeList.Add(h);
 }
Пример #2
0
 //Desc: Creates new hole using custom hole values
 //Post: Returns holeLib
 private holeLib getHoleLibCustom()
 {
     holeLib h = new holeLib();
     h.h_num = custom_current_hole;
     h.h_yardage = int.Parse(yardage_tb.Text);
     h.h_par = int.Parse(par_cb.Text);
     if(yardagetype_cb.Text == "Ft.")
     {
         h.h_unit = "Feet";
     }
     else if(yardagetype_cb.Text == "Yrd.")
     {
         h.h_unit = "Yard";
     }
     else
     {
         h.h_unit = "Meter";
     }
     h.h_name = holename_tb.Text;
     h.h_mando = getRadioButton(mandoyes_rb, mandono_rb);
     h.h_hazzards = getRadioButton(hazordyes_rb, hazordno_rb);
     h.b_letter = char.Parse(basketletter_cb.Text);
     h.b_deduction = int.Parse(basketyardage_tb.Text);
     h.b_note = basketnote_tb.Text;
     h.t_color = teecolor_cb.Text;
     h.t_pad_type = teepadtype_cb.Text;
     h.t_notes = teepadtype_cb.Text;
     h.m_guide = miscguidetohole_tb.Text;
     h.m_trash = getRadioButton(trashy_rb, trashno_rb);
     h.m_trail = getRadioButton(traily_rb, trailn_rb);
     h.m_road = getRadioButton(roady_rb, roadn_rb);
     h.m_general_comments = gencomments_tb.Text;
     h.r_disc = recshot_tb.Text;
     h.r_shots = recdisc_tb.Text;
     return h;
 }