public LabelBuilder ModifyPrintSpeed(PrintSpeed printSpeed, SlewSpeed slewSpeed, BackfeedSpeed backfeedSpeed) { Context.PrintSpeed = printSpeed; Context.SlewSpeed = slewSpeed; Context.BackfeedSpeed = backfeedSpeed; return(this); }
/// <summary> /// Запись значений для графика. /// </summary> public static void WritingValuesForTheChart() { double SpeedValue = double.Parse(PrintSpeed.Replace(" зн/мин", "")); SpeedValues.Add(SpeedValue); double AccuracyValue = double.Parse(Accuracy.Replace(" %", "")); AccuracyValues.Add(AccuracyValue); }
/// <summary> /// Вычисление оценки результата. /// </summary> /// <returns></returns> public static string Rating() { double coefficient = double.Parse(PrintSpeed.Substring(0, PrintSpeed.Length - 7)) * double.Parse(Accuracy.Substring(0, Accuracy.Length - 2)) / 100; if (coefficient < 80) { return("Попробуйте еще раз."); } else if (coefficient >= 80 & coefficient < 200) { return("Неплохо!"); } else if (coefficient >= 200) { return("Потрясающе!"); } else { return(""); } }
public static ZPLCommand PR(PrintSpeed speed, SlewSpeed slew, BackfeedSpeed backfeed) => new ZPLCommand("^PR", (int)speed, (int)slew, (int)backfeed);