public AddSLTreeItemWindowViewModel(ISLsService sLsService, ITLsService tLsService, IDLTypesService dLTypesService, ISystemAccountingSettingsService systemAccountingSettingsService, IPropertiesService propertiesService, IAccountsNaturesService accountsNaturesService) { _dLTypesService = dLTypesService; _sLsService = sLsService; _tLsService = tLsService; _systemAccountingSettingsService = systemAccountingSettingsService; _propertiesService = propertiesService; _accountsNaturesService = accountsNaturesService; // CancelCommand = new RelayCommand(OnCancel); SaveCommand = new RelayCommand(OnSave, CanSave); TLsDropDownOpenedCommand = new RelayCommand(OnTLsDropDownOpened, () => TLs != null && TLs.Any()); PropertiesDropDownOpenedCommand = new RelayCommand(OnPropertiesDropDownOpened, () => Properties != null && Properties.Any()); AccountsNaturesDropDownOpenedCommand = new RelayCommand(OnAccountsNaturesDropDownOpened, () => AccountsNatures != null && AccountsNatures.Any()); SelectedDLTypes1 = new ObservableCollection <DLType>(); SelectedDLTypes2 = new ObservableCollection <DLType>(); // SLStandardDescriptionListViewModel = SmObjectFactory.Container.GetInstance<SLStandardDescriptionListViewModel>(); SL = new SL(); }
public int GetShots(double d, TLs tl, Beams beam, PowerCells powerCell, int cellCount, out string specials, TLs cellTL = 0) { int shots = 0; cellTL = tl; specials = ""; switch (beam) { case Beams.Laser: ShotsByTL(tl, 255, 450, 450, 450); ShotsByTL(cellTL, shots); break; case Beams.Blaster: ShotsByTL(tl, 34, 68, 68, 68); ShotsByTL(cellTL, shots); break; case Beams.NeutralParticleBeam: ShotsByTL(tl, 16, 67, 67, 67); ShotsByTL(cellTL, shots); break; case Beams.RainbowLaser: ShotsByTL(cellTL, 112); break; case Beams.XRayLaser: ShotsByTL(tl, 112, 112, 225, 225); ShotsByTL(cellTL, shots); break; case Beams.Pulsar: ShotsByTL(tl, 135, 135, 135, 270); ShotsByTL(cellTL, shots); break; case Beams.Graser: ShotsByTL(cellTL, 28); break; case Beams.LowTechLaser: if (tl == TLs.TL8) { shots = 45; } ShotsByTL(cellTL, shots); break; case Beams.Electrolaser: ShotsByTL(tl, 2304, 5760, 5670, 5670); ShotsByTL(cellTL, shots); break; case Beams.SonicStunner: ShotsByTL(cellTL, 445); break; case Beams.HighOutputPulseLaser: ShotsByTL(tl, 2083, 2083, 5670, 5670); ShotsByTL(cellTL, shots); break; case Beams.Plasma: ShotsByTL(tl, 844, 2110, 2110, 2110); ShotsByTL(cellTL, shots); break; case Beams.PlasmaFlamer: ShotsByTL(tl, 450, 1125, 1125, 1125); ShotsByTL(cellTL, shots); break; case Beams.PlasmaLance: ShotsByTL(tl, 29, 29, 72, 72); ShotsByTL(cellTL, shots); break; case Beams.SonicScreamer: case Beams.SoundDisruptors: ShotsByTL(cellTL, 1780); break; case Beams.GravitonBeam: ShotsByTL(tl, 14, 14, 14, 28); ShotsByTL(cellTL, shots); break; case Beams.ForceBeam: ShotsByTL(tl, 270, 270, 540, 540); ShotsByTL(cellTL, shots); break; case Beams.Disraptor: ShotsByTL(cellTL, 6250); break; case Beams.NeuralDisraptor: case Beams.MindDisraptor: ShotsByTL(cellTL, 111); break; } return((int)(shots * cellCount / Math.Pow(d, 3))); }
public SLListViewModel(ISystemAccountingSettingsService systemAccountingSettingsService, ICompanyInformationsService companyInformationsService) { _companyInformationsService = companyInformationsService; CompanyInformationModel = _companyInformationsService.GetCompanyInformationModel(); _systemAccountingSettingsService = systemAccountingSettingsService; AddSLCommand = new RelayCommand(OnAddSL); AddSLStandardDescriptionCommand = new RelayCommand <SL>(OnAddSLStandardDescription); TLsDropDownOpenedCommand = new RelayCommand(OnTLsDropDownOpened, () => TLs != null && TLs.Any()); SL = new SL(); _accessUtility = SmObjectFactory.Container.GetInstance <AccessUtility>(); }
public double GetEmptyWeight(double d, TLs tl, Beams beam, Focus focus, Generators generator, Barells barell = 0, bool oldWeap = false) { double s, e = 0, f = 0, g = 0, b = 1, oldMod = 1; if (oldWeap) { oldMod = 2; } #region IfForSForSuperS if ((int)beam < 11 && (int)tl >= 5) { s = 0.5; } else { s = 1; } #endregion IfForSForSuperS #region SwitchForEFromBeam switch (beam) { case Beams.Pulsar: case Beams.Plasma: case Beams.PlasmaLance: e = 6; break; case Beams.ForceBeam: e = 4; break; case Beams.GravitonBeam: e = 1.5; break; case Beams.Electrolaser: e = 3.1; break; case Beams.HighOutputPulseLaser: e = 5; break; case Beams.SonicStunner: case Beams.SonicScreamer: case Beams.SoundDisruptors: case Beams.NeuralDisraptor: case Beams.MindDisraptor: e = 2.75; break; case Beams.Disraptor: e = 32; break; default: e = 3; break; } #endregion SwitchForEFromBeam #region SwithForFFromFocus switch (focus) { case Focus.Tiny: f = 0.25; break; case Focus.VerySmall: f = 0.5; break; case Focus.Small: f = 0.8; break; case Focus.Medium: f = 1; break; case Focus.Large: f = 1.25; break; case Focus.VeryLarge: f = 1.6; break; case Focus.ExtremelyLarge: f = 2; break; } #endregion SwithForFFromFocus #region SwithForGFromGen switch (generator) { case Generators.SingleShot: g = 1; break; case Generators.SemiAuto: case Generators.LightAuto: g = 1.25; break; case Generators.SlowGen3: g = 0.7; break; case Generators.SlowGen5: g = 0.6; break; case Generators.SlowGen10: g = 0.5; break; default: g = 2; break; } if (beam == Beams.Plasma) { if (generator == Generators.LightAuto) { g = 1.5; } else if (generator == Generators.LightGatling || generator == Generators.HeavyGatling) { g = 4; } } #endregion SwithForGFromGen #region IfForBfromBarrel if (barell == Barells.Light) { b = 0.75; } else if (barell == Barells.Heavy) { b = 1.5; } #endregion IfForBfromBarrel if (beam == Beams.LowTechLaser) { return(Math.Round((Math.Pow(d * s * 3.7, 3) * f) * oldMod, 2)); } return(Math.Round((Math.Pow(((d * s) / e), 3) * f * g * b) * oldMod, 2)); }