public void AddWheel() { WheelControl lastWheel = WheelList.Find(w => w.WheelState == WheelControlState.Plus); if (lastWheel != null) { lastWheel.WheelState = WheelControlState.One; lastWheel.ClearWheelValues(); } }
private void UpdateView() { l_kol_os.Text = _currentAuto.AxisList.Count.ToString(); l_mass.Text = _currentAuto.FullWeightData.Value.ToString(CultureInfo.InvariantCulture); l_massDopus.Text = _currentAuto.FullWeightData.Limit.ToString(CultureInfo.InvariantCulture); l_massOver.Text = _currentAuto.FullWeightData.Over.ToString(CultureInfo.InvariantCulture); l_massOverPercent.Text = _currentAuto.FullWeightData.PercentageExceeded.ToString(CultureInfo.InvariantCulture) + "%"; foreach (Axis axis in _currentAuto.AxisList) { WheelControl wheelControl = GetWheelByIndex(axis.Index); wheelControl.SetWeightValueWithInaccuracy(axis.WeightValueWithInaccuracy); wheelControl.SetDistanceToNextWithInaccuracy(axis.DistanceToNextWithInaccuracy); wheelControl.SetLoadLimit(axis.LoadLimit); wheelControl.SetOver(axis.GetOver()); wheelControl.SetBlockInfo(axis.BlockInfo); wheelControl.SetOverPercent(axis.GetOverPercent()); } if (Program.User == "Admin") { tb_razmerUsherba.Text = $"Размер ущерба (руб): {_currentAuto.FullAutoDamage}"; } }