public ComboNode(EAnimation animation, Dictionary <Keys, ComboNode> next, Intervall intervall, Keys key, Buttons button) { _animation = animation; _next = next; _intervall = intervall; _key = key; _button = button; }
public override string BuildArguments() { if (string.IsNullOrEmpty(OutputDirectory)) { throw new ArgumentException("OutputDirectory must be set!"); } string intervall = Intervall.ToString("f3", CultureInfo.InvariantCulture); return($"-i \"{InputFile}\" -vf \"scale={Width}:{Height}, fps=1/{intervall}\" \"{OutputDirectory}%05d.jpg\" -stats"); }
private void _timer_Elapsed(object sender, ElapsedEventArgs e) { var now = DateTime.Now; if (_intervalls == null) { return; } switch (_state) { case InitState.Running: { var msg = ""; TimeSpan ts = new TimeSpan(0, 0, 0); for (var i = 0; i < _intervalls.Count - 1; i++) { msg += string.Format("{0}: {1} Stunden {2} Minuten\n", _intervalls[i], _intervalls[i].Ellapsed.Hours, _intervalls[i].Ellapsed.Minutes); ts = ts.Add(_intervalls[i].Ellapsed); } var last = new Intervall(_intervalls[_intervalls.Count - 1].ToString() + string.Format("{0:00}:{1:00}", now.Hour, now.Minute)); ts = ts.Add(last.Ellapsed); msg += string.Format("{0}: {1} Stunden {2} Minuten\n", last, last.Ellapsed.Hours, last.Ellapsed.Minutes); if (_intervalls.Count > 1) { msg += string.Format("TOTAL: {0} Stunden {1} Minuten", ts.Hours, ts.Minutes); } FeedbackText = msg; } break; case InitState.Paused: { var msg = ""; TimeSpan ts = new TimeSpan(0, 0, 0); for (var i = 0; i < _intervalls.Count; i++) { msg += string.Format("{0}: {1} Stunden {2} Minuten\n", _intervalls[i], _intervalls[i].Ellapsed.Hours, _intervalls[i].Ellapsed.Minutes); ts = ts.Add(_intervalls[i].Ellapsed); } if (_intervalls.Count > 1) { msg += string.Format("TOTAL: {0} Stunden {1} Minuten", ts.Hours, ts.Minutes); } FeedbackText = msg; } break; default: FeedbackText = ""; break; } }
/// <summary> /// Wählt erst eine Seltenheit aus und dann durch den inneren Algorithmus das finale Loot-Objekt /// </summary> /// <param name="allLoot">Das ursprüngliche gesamte Loot</param> /// <returns>Das gelootete Objekt</returns> public ILootable <T> Loot(ILootable <T>[] allLoot) { int lowest = rarTable.Chain.Intervalls.First().X; int highest = rarTable.Chain.Intervalls.Last().Y; lastEntireRarRange = new Intervall(lowest, highest); lastRandomRoll = GlobalRandom.Next(lowest + 1, highest + 1); int intervallIndex = Array.FindIndex(rarTable.Chain.Intervalls, i => i.X <= lastRandomRoll && i.Y >= lastRandomRoll); lastRarRange = rarTable.Chain.Intervalls[intervallIndex]; lastProp = 100 / (double)(highest - lowest) * (double)lastRarRange.Range; lastRarName = rarTable.Values[intervallIndex]; return(lastLootingAlgorithm.Loot(allLoot.Where(i => i.Rarity > lastRarRange.X && i.Rarity <= lastRarRange.Y).ToArray())); }
void ReleaseDesignerOutlets() { if (Intervall != null) { Intervall.Dispose(); Intervall = null; } if (TetxtFieldIntervall != null) { TetxtFieldIntervall.Dispose(); TetxtFieldIntervall = null; } }
public override string BuildArguments() { if (string.IsNullOrEmpty(OutputDirectory)) { throw new ArgumentException("OutputDirectory must be set!"); } string intervall = Intervall.ToString("f3", CultureInfo.InvariantCulture); return($"-i \"{InputFile}\" " + "-vf \"" + $"fps=1/{intervall}" + (ClipLeft ? ", stereo3d=sbsl:ml" : "") + // (DeLense ? $", lenscorrection=k1=-0.18:k2=-0.022" : "") + (ClipLeft ? $", scale = {Width / 2}:{Height}" : $", scale = {Width}:{Height}") + $"\" " + $"\"{OutputDirectory}%05d.jpg\" -stats"); }
public PowerBall() { IsSpecialNumber = true; LotteryName = "PowerBall"; Numbers = new Intervall { Start = 1, Stop = 69 }; SpecialNumber = new Intervall { Start = 1, Stop = 26 }; NumbersCount = 5; SpecialNumbersCount = 1; }
public EuroJackpot() { IsSpecialNumber = true; LotteryName = "Euro Jackpot"; Numbers = new Intervall { Start = 1, Stop = 50 }; SpecialNumber = new Intervall { Start = 1, Stop = 10 }; NumbersCount = 5; SpecialNumbersCount = 2; }
public EuroMillions() { IsSpecialNumber = true; LotteryName = "Euro Millions"; Numbers = new Intervall { Start = 1, Stop = 50 }; SpecialNumber = new Intervall { Start = 1, Stop = 12 }; NumbersCount = 5; SpecialNumbersCount = 2; }
public MegaMillions() { IsSpecialNumber = true; LotteryName = "Mega Millions"; Numbers = new Intervall { Start = 1, Stop = 70 }; SpecialNumber = new Intervall { Start = 1, Stop = 25 }; NumbersCount = 5; SpecialNumbersCount = 1; }
/// <summary> /// Wählt aus dem Input <see cref="Array"/> ein Objekt aus und gibt dieses zurück /// </summary> /// <param name="allLoot">Das gesamte Ausgangsmaterial</param> /// <returns>Das EINE Loot</returns> /// <exception cref="NoMatchingLootException">Bei leerem Input</exception> public ILootable <T> Loot(ILootable <T>[] allLoot) { if (allLoot.Length.Equals(0)) { throw new NoMatchingLootException("no input items"); } int counter = 0; int j = 0; allLastItemNames = new string[allLoot.Length]; allLastItemRarities = new int[allLoot.Length]; lastInnerChain = new IntervallChain((allLoot.Select(l => { allLastItemNames[j] = l.Name; allLastItemRarities[j++] = l.Rarity; return(counter += l.Rarity); })).ToArray(), 0); lastEntireRange = counter; lastRandomRoll = GlobalRandom.Next(0, counter); int index = Array.FindIndex(lastInnerChain.Intervalls, i => i.X <= lastRandomRoll && i.Y >= lastRandomRoll); lastUsedIntervall = lastInnerChain.Intervalls[index]; return(allLoot[index]); }
/// <summary> /// Konstruktor, der den <see cref="string"/> Wert und das mögliche <see cref="Intervall"/> setzt /// </summary> /// <param name="_propName">Der <see cref="string"/>-Wert</param> /// <param name="_intervall">Der Wertebereich</param> public SingleIntervallProp(string _propName, Intervall _intervall) { intervall = _intervall; propNames = new string[] { _propName }; }
/// <summary> /// Konstruktor, der die <see cref="string"/> Werte und das mögliche <see cref="Intervall"/> setzt /// </summary> /// <param name="_propNames">Die <see cref="string"/>-Werte</param> /// <param name="_intervall">Der Wertebereich</param> public SingleIntervallProp(string[] _propNames, Intervall _intervall) { intervall = _intervall; propNames = _propNames; }