예제 #1
0
 //Увеличить, уменьшить длину болта вручную
 public void UpLengthManually()
 {
     if (AutoLength)
     {
         return;
     }
     if (index_length + 1 >= gost_base.Tables["Длина резьбы"].Rows.Count)
     {
         return;
     }
     index_length++;
     BoltLength   = TableReader.GetDoubleCell(gost_base.Tables["Длина резьбы"].Rows[index_length], 0);
     ThreadLength = TableReader.GetDoubleCell(gost_base.Tables["Длина резьбы"].Rows[index_length], BoltName);
     if (ResultChangedEvent != null)
     {
         ResultChangedEvent(BoltLength.ToString(System.Globalization.CultureInfo.InvariantCulture));
     }
     CheckBoltLengths();
 }
예제 #2
0
 //Выбрать характеристики стали
 public void SetSteelCharact()
 {
     foreach (DataRow dr in my_base.Tables[2].Rows)
     {
         if (SelectedSteelMark == null)
         {
             return;
         }
         if (SelectedSteelMark.Name == TableReader.GetStringCell(dr, 0) && DetailThickness >= TableReader.GetDoubleCell(dr, 1) && DetailThickness <= TableReader.GetDoubleCell(dr, 2))
         {
             SelectedSteelMark.Ryn = TableReader.GetDoubleCell(dr, 3);
             SelectedSteelMark.Run = TableReader.GetDoubleCell(dr, 4);
             break;
         }
         else
         {
             SelectedSteelMark.Ryn = 0;
             SelectedSteelMark.Run = 0;
         }
     }
 }