public ModelSolid(Venturi mod) { PartName = mod.Name; ThroatDim = mod.Value.DiamThroat; ThroatLength = mod.Value.LengthThroat; ConfDim = mod.Value.DiamConfandDiff; ConfLength = mod.Value.LengthConf; DiffLength = mod.Value.LengthDif; AllLength = mod.Value.LengthThroat + mod.Value.LengthConf + Lengthfistline + mod.Value.LengthDif; }
public VenturiControl(string name) { Venturis = GetData(); CurrentVenturi = Venturis.SingleOrDefault(v => v.Name == name); if (CurrentVenturi == null) { //log.Info("Создание Аппарата"); CurrentVenturi = new Venturi(name); CreateEvent?.Invoke(this, new NewVentEventArgs($"Аппарат создан {CurrentVenturi.Name}")); SendEmailAsync().GetAwaiter(); Venturis.Add(CurrentVenturi); IsNewVent = true; } else { Console.WriteLine("Данный аппарат существует. Нажмите 2, чтобы посмотреть все существующие аппараты."); } }