private void SendMessageInternal(Jid to, MessageType type, Automatic <CultureInfo> lang, IEnumerable <Body> bodies, bool check) { var stanza = new XElement(ClientNamespace.Message, new XAttribute("id", this.GenerateId())); stanza.Add(new XAttribute("to", to)); if (type.IsNotNull()) { stanza.Add((XAttribute)type); } if (!lang.HasValue || lang.Value.IsNotNull()) { stanza.Add(new XAttribute(XmlNamespace.Lang, lang.ValueOr(CultureInfo.CurrentCulture))); } if (bodies.IsNotNullOrEmpty()) { stanza.Add(bodies.Select(i => (XElement)i)); } this.SendInternal(stanza, check); }
public void TryAllTreesTest() { string input = "int a = +150; i n t -05 qweg12 +012"; List <KeyValuePair <string, string> > expected = new List <KeyValuePair <string, string> >(); expected.Add(new KeyValuePair <string, string>("int", "int")); expected.Add(new KeyValuePair <string, string>("name", "a")); expected.Add(new KeyValuePair <string, string>("symbol", "=")); expected.Add(new KeyValuePair <string, string>("value", "+150")); expected.Add(new KeyValuePair <string, string>("symbol", ";")); expected.Add(new KeyValuePair <string, string>("name", "i")); expected.Add(new KeyValuePair <string, string>("name", "n")); expected.Add(new KeyValuePair <string, string>("name", "t")); expected.Add(new KeyValuePair <string, string>("symbol", "-")); expected.Add(new KeyValuePair <string, string>("value", "5")); expected.Add(new KeyValuePair <string, string>("name", "qweg12")); expected.Add(new KeyValuePair <string, string>("symbol", "+")); expected.Add(new KeyValuePair <string, string>("value", "12")); Automatic automatic = new Automatic(); List <KeyValuePair <string, string> > result = automatic.TryAllTrees(input); for (int i = 0; i < result.Count; i++) { Assert.AreEqual(expected[i].Key, result[i].Key, "Wrong lexema!"); Assert.AreEqual(expected[i].Value, result[i].Value, "Wrong substring!"); } }
public static void OnTick(EntropyEventArgs args) { if (LocalPlayer.Instance.IsDead() || LocalPlayer.Instance.IsRecalling() || GameConsole.IsOpen) { return; } if (W.Ready) { Automatic.ExecuteW(); } switch (Orbwalker.Mode) { case OrbwalkingMode.Combo when W.Ready: Combo.ExecuteW(); break; case OrbwalkingMode.Harass when W.Ready: Harass.ExecuteW(); break; case OrbwalkingMode.Laneclear when W.Ready: LaneClear.ExecuteW(); JungleClear.ExecuteW(); break; } }
private static void OnGameUpdate(EventArgs args) { Killsteal.CastQ(); Killsteal.CastR(); if (R.IsReady()) { if (mainMenu["Automatic"].GetValue <MenuSliderButton>("safe").Enabled) { if (GameObjects.Player.CountEnemyHeroesInRange( mainMenu["Automatic"].GetValue <MenuSliderButton>("safe").Value) == 0) { Automatic.OnImmobile(); } } else { Automatic.OnImmobile(); } Combo.SemiR(); } if (Q.IsReady()) { Automatic.CastQ(); } switch (Orbwalker.ActiveMode) { case OrbwalkerMode.Combo: if (mainMenu["Combo"].GetValue <MenuSliderButton>("priority").Enabled&& GameObjects.Player.ManaPercent <= mainMenu["Combo"].GetValue <MenuSliderButton>("priority").Value) { Combo.CastW(); Combo.CastQ(); } else { Combo.CastW(); Combo.CastQ(); } break; case OrbwalkerMode.Harass: Harass.CastW(); Harass.CastQ(); break; case OrbwalkerMode.LaneClear: LaneClear.CastQ(); JungleClear.CastW(); JungleClear.CastQ(); Structureclear.CastW(); break; case OrbwalkerMode.LastHit: Lasthit.CastQ(); break; } }
private void SendPresenceInternal(Jid to, PresenceType type, Automatic <CultureInfo> lang, IEnumerable <XElement> extendedContent, bool check) { var stanza = new XElement(ClientNamespace.Presence, new XAttribute("id", this.GenerateId())); if (to.IsNotNull()) { stanza.Add(new XAttribute("to", to)); } if (type.IsNotNull()) { stanza.Add((XAttribute)type); } if (!lang.HasValue || lang.Value.IsNotNull()) { stanza.Add(new XAttribute(XmlNamespace.Lang, lang.ValueOr(CultureInfo.CurrentCulture))); } if (extendedContent.IsNotNullOrEmpty()) { stanza.Add(extendedContent); } this.SendInternal(stanza, check); }
public static void OnWndProc(GameWndProcEventArgs args) { if (args.WParam != ComboMenu.RSemiAutoKeyBind.Key) { return; } Automatic.SemiAutomaticR(args); }
public void TryTreeTest(string input, bool grammar, int number, string tree) { Automatic automatic = new Automatic(); Token expected = new Token(grammar, number); Token result = automatic.TryTree(input, 0, tree); Assert.AreEqual(expected.isGrammar, result.isGrammar, "Wrong answer!"); Assert.AreEqual(expected.lastNumber, result.lastNumber, "Wrong last number!"); }
public Trigger(ISource source, Card card, Automatic skill) { Identity = GameEvents.Activate; Player = card.Controller; Source = source; Card = card; Skill = skill; PositionInLink = skill.PositionInLink; }
public static void OnWndProc(GameWndProcEventArgs args) { if (E.Ready && args.WParam == ComboMenu.ESemiAutoKeyBind.Key) { Automatic.SemiAutomaticE(); } if (R.Ready && args.WParam == RSettings.RSemiAutoKeyBind.Key) { Automatic.SemiAutomaticR(); } }
private static void OnGameUpdate(EventArgs args) { if (Player.IsDead) { return; } if (R.IsReady()) { Combo.SemiRCast(); Automatic.CastR(); Killsteal.CastR(); } if (W.IsReady()) { Killsteal.CastW(); } switch (Orbwalker.ActiveMode) { case OrbwalkerMode.Combo: if (Q.IsReady()) { Combo.CastQ(); } if (W.IsReady()) { Combo.CastW(); } break; case OrbwalkerMode.Harass: if (Q.IsReady()) { Harass.CastQ(); } if (W.IsReady()) { Harass.CastW(); } break; case OrbwalkerMode.LaneClear: if (Q.IsReady()) { Laneclear.CastQ(); } break; } }
public Base() { InitializeComponent(); // Inicializace jednotlivých komponent _boot = new Boot(); // FBS - First Boot Sequence _boot.DetectLibs(); // Detekce knihoven _search = new Search(); // Vyhledávač slov _registry = new Registry(); // Práce s registrama _automatic = new Automatic(); // Automatické práce }
public void Update() { if (Automatic.Update()) { FireOneShot(m_TargetTransform); } MuzzleFlash.Update(); Shell.Update(); Effect.Update(); Recoil.Update(); }
public void Stop() { if (TargetEntityComponent != null && EntityComponent != null) { TargetEntityComponent.RemoveActiveCounterpart(EntityComponent.RootEntity as ICECreatureEntity); } if (Automatic.Stop()) { FireOneShot(m_TargetTransform); } }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { var hash = 41; // Suitable nullity checks etc, of course :) if (Automatic != null) { hash = hash * 57 + Automatic.GetHashCode(); } if (IndexingMode != null) { hash = hash * 57 + IndexingMode.GetHashCode(); } if (IncludePaths != null) { hash = hash * 57 + IncludePaths.GetHashCode(); } if (IndexType != null) { hash = hash * 57 + IndexType.GetHashCode(); } if (NumericPrecision != null) { hash = hash * 57 + NumericPrecision.GetHashCode(); } if (StringPrecision != null) { hash = hash * 57 + StringPrecision.GetHashCode(); } if (Path != null) { hash = hash * 57 + Path.GetHashCode(); } if (ExcludePaths != null) { hash = hash * 57 + ExcludePaths.GetHashCode(); } return(hash); } }
public Body(string value, Automatic <CultureInfo> lang) { this.element = new XElement(ClientNamespace.Body); if (!lang.HasValue || lang.Value.IsNotNull()) { this.element.Add(new XAttribute(XmlNamespace.Lang, lang.ValueOr(CultureInfo.CurrentCulture))); } if (value.IsNotNull()) { this.element.Add(value); } }
/// <summary> /// Returns true if IndexingPolicy instances are equal /// </summary> /// <param name="other">Instance of IndexingPolicy to be compared</param> /// <returns>Boolean</returns> public bool Equals(IndexingPolicy other) { // credit: http://stackoverflow.com/a/10454552/677735 if (other == null) { return(false); } return (( Automatic == other.Automatic || Automatic != null && Automatic.Equals(other.Automatic) ) && ( IndexingMode == other.IndexingMode || IndexingMode != null && IndexingMode.SequenceEqual(other.IndexingMode) ) && ( IncludePaths == other.IncludePaths || IncludePaths != null && IncludePaths.Equals(other.IncludePaths) ) && ( IndexType == other.IndexType || IndexType != null && IndexType.Equals(other.IndexType) ) && ( NumericPrecision == other.NumericPrecision || NumericPrecision != null && NumericPrecision.Equals(other.NumericPrecision) ) && ( StringPrecision == other.StringPrecision || StringPrecision != null && StringPrecision.Equals(other.StringPrecision) ) && ( Path == other.Path || Path != null && Path.Equals(other.Path) ) && ( ExcludePaths == other.ExcludePaths || ExcludePaths != null && ExcludePaths.Equals(other.ExcludePaths) )); }
public Body(string value, Automatic<CultureInfo> lang ) { this.element = new XElement(ClientNamespace.Body); if (!lang.HasValue || lang.Value.IsNotNull()) { this.element.Add(new XAttribute(XmlNamespace.Lang, lang.ValueOr(CultureInfo.CurrentCulture))); } if (value.IsNotNull()) { this.element.Add(value); } }
private static void OnGameUpdate(EventArgs args) { if (Player.IsDead) { return; } if (R.IsReady()) { Automatic.CastR(); Combo.SemiR(); Killsteal.CastR(); } }
public void RenderScript(ScriptTextWriter writer) { writer.WriteStartElement("binding"); if (Automatic == false) { writer.WriteAttributeString("automatic", Automatic.ToString()); } if (DataContext != "") { writer.WriteAttributeString("dataContext", DataContext); } if (DataPath != "") { writer.WriteAttributeString("dataPath", DataPath); } if (Direction != BindingDirection.In) { writer.WriteAttributeString("direction", Direction.ToString()); } if (ID != "") { writer.WriteAttributeString("id", ID); } if (Property != "") { writer.WriteAttributeString("property", Property); } if (PropertyKey != "") { writer.WriteAttributeString("propertyKey", PropertyKey); } if (TransformerArgument != "") { writer.WriteAttributeString("transformerArgument", TransformerArgument); } writer.WriteEndElement(); }
/// <summary> /// Fires a burst if /// </summary> /// <param name="_target">Target.</param> /// <param name="_limit">Limit.</param> public void FireBurst(Transform _target, int _limit) { m_TargetTransform = _target; if (TargetEntityComponent != null && EntityComponent != null) { TargetEntityComponent.AddActiveCounterpart(EntityComponent.RootEntity as ICECreatureEntity); } if (Automatic.Enabled) { Automatic.StartWithImpulsLimit(_limit); } else { FireOneShot(_target); } }
private static void OnGameUpdate(EventArgs args) { if (GameObjects.Player.IsDead) { return; } if (Extension.AttackedTimer < Game.Time) { Extension.Attacked = false; } if (E.IsReady()) { Automatic.CastE(); Automatic.SemiE(); if (KillstealMenu.EBool.Enabled) { Killsteal.CastE(); } } switch (Orbwalker.ActiveMode) { case OrbwalkerMode.Combo: if (E.IsReady()) { Combo.CastE(); } if (Q.IsReady()) { Combo.CastQ(); } break; case OrbwalkerMode.Harass: if (E.IsReady()) { Harass.CastE(); } break; } }
void Update() { Aim(); if (Input.GetKeyDown("1")) { gunSwitch = !gunSwitch; Automatic.SetActive(gunSwitch); Pistol.SetActive(!gunSwitch); crossSwitch = !crossSwitch; cross2.SetActive(crossSwitch); cross1.SetActive(!crossSwitch); } if (Input.GetKeyDown("9")) { camSwitch = !camSwitch; FirstPersonCam.gameObject.SetActive(camSwitch); ThirdPersonCam.gameObject.SetActive(!camSwitch); } }
private static void OnGameUpdate(EventArgs args) { Killsteal.CastQ(); Killsteal.CastE(); Harass.CastE(); Automatic.CastR(); Automatic.CastW(); switch (Orbwalker.ActiveMode) { case OrbwalkerMode.Combo: if (Configs.AutomaticMenu.MinionsChase.Enabled) { if (Orbwalker.GetTarget() == null) { if (GameObjects.EnemyHeroes.Any(x => x.IsValidTarget(1300f) && GameObjects.Player.Distance(x) > GameObjects.Player.AttackRange)) { var minion = GameObjects.EnemyMinions.OrderBy(x => x.Distance(GameObjects.Player)).FirstOrDefault(); if (minion != null) { Orbwalker.Orbwalk(minion, Game.CursorPos); } } } } Combo.CastQ(); break; case OrbwalkerMode.Harass: Harass.CastQ(); break; case OrbwalkerMode.LaneClear: Jungleclear.CastQ(); Jungleclear.CastE(); Laneclear.CastE(); break; case OrbwalkerMode.LastHit: Lasthit.CastE(); break; } }
public void Fire(Transform _target, bool _reset) { //Debug.Log( "TEST: Fire" ); m_TargetTransform = _target; if (TargetEntityComponent != null && EntityComponent != null) { TargetEntityComponent.AddActiveCounterpart(EntityComponent.RootEntity as ICECreatureEntity); } if (Automatic.Enabled) { Automatic.Start(_reset); } else { FireOneShot(_target); } }
private static void OnGameUpdate(EventArgs args) { if (GameObjects.Player.IsDead) { return; } if (W.IsReady()) { Automatic.CastWSlowed(); } if (R.IsReady()) { Automatic.CastRImmobile(); Combo.SemiCastR(); } Killsteal.Cast(); switch (Orbwalker.ActiveMode) { case OrbwalkerMode.Combo: if (W.IsReady()) { Combo.CastW(); } break; case OrbwalkerMode.LaneClear: if (E.IsReady()) { Laneclear.CastE(); } break; } }
private static void OnGameUpdate(EventArgs args) { Automatic.CastQ(); Killsteal.CastE(); switch (Orbwalker.ActiveMode) { case OrbwalkerMode.Combo: Combo.CastQ(); Combo.CastW(); Combo.CastR(); break; case OrbwalkerMode.Harass: Harass.CastW(); Harass.CastE(); break; case OrbwalkerMode.LaneClear: Laneclear.CastE(); Jungleclear.CastW(); Jungleclear.CastE(); break; } }
public void AddAutomatic() { mAutomatic = new Automatic(); Debug.Log("Turbodrive transmission detected"); }
void Start() { automatic = gameObject.GetComponentInParent <Automatic>(); minX = maxX * -1; minY = maxY * -1; }
public void SendMessage(Jid to, MessageType type, Automatic <CultureInfo> lang, IEnumerable <Body> bodies) { this.SendMessageInternal(to, type, lang, bodies, true); }
public void SendPresence(Jid to, PresenceType type, Automatic <CultureInfo> lang, IEnumerable <XElement> extendedContent) { this.SendPresenceInternal(to, type, lang, extendedContent, true); }
public async Task <BalanceDTO> InsertSalesTransaction(SalesTransactionDTO newTransaction) { if ((newTransaction.SoldAmount > 50000 && newTransaction.SoldCurrency != "ALL") || (newTransaction.SoldAmount > 500000 && newTransaction.SoldCurrency == "ALL")) { Staff staffMember = new Staff() { Department = "sales", Email = "*****@*****.**", FirstName = "Henri", LastName = "Haka", KeycloakId = "asdasdadasd", }; Manual manualTransaction = new Manual() { ApprovedBy = staffMember, BoughtAmount = newTransaction.SoldAmount * newTransaction.ExchangeRate, BoughtCurrency = newTransaction.BoughtCurrency, CreatedDate = newTransaction.CreatedDate, Customer = newTransaction.Customer, ExchangeRate = newTransaction.ExchangeRate, SoldAmount = newTransaction.SoldAmount, SoldCurrency = newTransaction.SoldCurrency, Position = await _unitOfWork.Positions.GetLatestPosition() }; BalanceDTO updatedBalance = await _balanceService.PrepareBalance(newTransaction); _unitOfWork.ManualTransactions.Add(manualTransaction); _unitOfWork.SaveChanges(); return(updatedBalance); } else { Staff staffMember = new Staff() { Department = "sales", Email = "*****@*****.**", FirstName = "Henri", LastName = "Haka", KeycloakId = "asdasdadasd", }; //automatic Automatic automaticTransaction = new Automatic() { ApprovedBy = staffMember, BoughtAmount = newTransaction.SoldAmount * newTransaction.ExchangeRate, BoughtCurrency = newTransaction.BoughtCurrency, CreatedDate = newTransaction.CreatedDate, Customer = newTransaction.Customer, ExchangeRate = newTransaction.ExchangeRate, SoldAmount = newTransaction.SoldAmount, SoldCurrency = newTransaction.SoldCurrency, Position = await _unitOfWork.Positions.GetLatestPosition() }; BalanceDTO updatedBalance = await _balanceService.PrepareBalance(newTransaction); _unitOfWork.AutomaticTransactions.Add(automaticTransaction); _unitOfWork.SaveChanges(); return(updatedBalance); } }