public ToEMPMetBlastRefMetBlastEMP(Hero me, Key key) : base(me, key) { this._tornado = new Tornado(me, () => 0); this._emp1 = new EMP(me, this.EMPDelay1); this._meteor1 = new Meteor(me, this.MeteorDelay1); this._deafeningBlast1 = new DeafeningBlast(me, this.BlastDelay1); this._refresher = new Refresher(me); this._meteor2 = new Meteor(me); this._deafeningBlast2 = new DeafeningBlast(me); this._emp2 = new EMP(me); this._sunstrike = new Sunstrike(me); this._coldSnap = new ColdSnap(me); // _sunstrike2.PositionChange = ... this.AbilitySequence = new List <ISequenceEntry> { new AwaitBlinkOrMove(me, () => this.EngageRange), this._tornado, new AwaitModifier("modifier_invoker_tornado", 3000), new AwaitBlinkOrMove(me, () => (int)this._meteor1.Ability.CastRange), this._emp1, this._meteor1, this._deafeningBlast1, this._refresher, this._meteor2, this._deafeningBlast2, this._emp2, this._coldSnap // sunstrike? }; }
public virtual void Refresh() { Refresher?.Invoke(); if (constrainElements) { int count = elements.Count; int perRow = Mathf.CeilToInt(count / rows); int remainder = count - (perRow * rows); perRow += remainder; int x = 0; int y = 0; Vector2 size = new Vector2((width - (padding * 2) - (spacing * (perRow - 1))) / perRow, (height - (padding * 2) - (spacing * (rows - 1))) / rows); for (int i = 0; elements.Count > i; i++) { if (x > perRow - 1) { x = 0; y++; } elements[i].SetWidthAndHeight(size); elements[i].SetLocalPosition(new Vector3((-width * 0.5f) + (size.x * x) + (size.x * 0.5f) + (spacing * x) + padding, 1, (height * 0.5f) - (size.y * y) - (size.y * 0.5f) - (spacing * y) - padding)); x++; } } }
public AssassinationCombo(Hero me, Key key) : base(me, key) { this._tornado = new Tornado(me, () => 0); this._sunstrike1 = new Sunstrike(me, this.SunstrikeDelay1); this._meteor1 = new Meteor(me, this.MeteorDelay1); this._deafeningBlast = new DeafeningBlast(me, this.BlastDelay); this._refresher = new Refresher(me); this._meteor2 = new Meteor(me); this._sunstrike2 = new Sunstrike(me); // _sunstrike2.PositionChange = ... this.AbilitySequence = new List <ISequenceEntry> { new AwaitBlinkOrMove(me, () => this.EngageRange), this._tornado, new AwaitModifier("modifier_invoker_tornado", 3000), new AwaitBlinkOrMove(me, () => (int)this._meteor1.Ability.CastRange), this._sunstrike1, this._meteor1, this._deafeningBlast, this._refresher, this._meteor2, this._sunstrike2 }; }
public Control(Refresher refresher, Informer informMethod, ref Rsx.DGV.IFind searcher) { _informMethod = informMethod; _refreshMethod = refresher; OFD = new OpenFileDialog(); SFD = new SaveFileDialog(); this.OFD.DefaultExt = "xml"; this.OFD.FileName = "File"; this.OFD.Filter = "XML Tables | *.xml"; this.OFD.Title = "Import Table File"; // // SFD // this.SFD.DefaultExt = "xml"; this.SFD.FileName = "File"; this.SFD.Filter = "XML Tables | *.xml"; this.SFD.Title = "Export Table File"; SFD.FileOk += SFD_FileOk; OFD.FileOk += OFD_FileOk; search = searcher; }
public override void RunFinished() { using (ThreadedWaitDialogProgressScope scope = new ThreadedWaitDialogProgressScope("Checking installed packages...")) { _packageService.InstallLatestPackages(scope, _currentProject); } using (ThreadedWaitDialogProgressScope scope = new ThreadedWaitDialogProgressScope("Checking resolved references...")) { // _referenceService.AddRequiredReferences(scope,_currentProject); Service.ReferenceService.EnsureReferences(scope, ReferencesOption.Common, _currentProject); Service.ReferenceService.EnsureReferences(scope, ReferencesOption.MSBuild, _currentProject); Service.ReferenceService.EnsureReferences(scope, ReferencesOption.Wpf, _currentProject); Service.ReferenceService.EnsureReferences(scope, ReferencesOption.EnvDTE, _currentProject); Service.ReferenceService.EnsureReferences(scope, ReferencesOption.Shell, _currentProject); } foreach (Reference reference in _project.References) { if (reference.Name.StartsWith("envdte", System.StringComparison.CurrentCultureIgnoreCase) || reference.Name.StartsWith("vslangproj", System.StringComparison.CurrentCultureIgnoreCase)) { if (reference is Reference5 reference5) { reference5.EmbedInteropTypes = false; } } } Refresher.RefreshProject(_currentProject); }
protected override void Setup(FeatureConfigurationContext context) { var routingTable = context.Settings.Get <UnicastRoutingTable>(); var refresherTask = new Refresher(routingTable); context.RegisterStartupTask(refresherTask); }
public static ISensor GetSensor(SensorWeatherType sensorWeatherType, string name, int sensorId, bool rgbDisplay) { if (webWeather == null) { webWeather = new WebWeather(); refresher = new Refresher(); refresher.AddSensor(webWeather); refresher.Start(600000); } switch (sensorWeatherType) { case SensorWeatherType.Temperature: return(new WeatherTemperature(webWeather, name, sensorId, rgbDisplay)); case SensorWeatherType.Humidity: return(new WeatherHumidity(webWeather, name, sensorId, rgbDisplay)); case SensorWeatherType.Pressure: return(new WeatherPressure(webWeather, name, sensorId, rgbDisplay)); case SensorWeatherType.WindSpeed: return(new WeatherWindSpeed(webWeather, name, sensorId, rgbDisplay)); case SensorWeatherType.WindDirection: return(new WeatherWindDirection(webWeather, name, sensorId, rgbDisplay)); default: throw new Exception("The type <" + webWeather + "> is not manage by the WeatherSensorBuilder"); } }
public static async Task Main(string[] args) { IConfigurationRoot configuration = InitializeConfiguration(); IServiceCollection services = ConfigureServices(configuration); using (ServiceProvider serviceProvider = services.BuildServiceProvider()) { var clientId = Convert.ToInt32(configuration["clientId"]); var featureManager = serviceProvider.GetRequiredService <IFeatureManager>(); var renderer = new FeatureFlagRenderer(featureManager); var timer = new System.Timers.Timer(TimeSpan.FromSeconds(5).TotalMilliseconds); timer.Elapsed += async(sender, e) => { await Refresher.RefreshAsync(); }; timer.Start(); while (true) { await renderer.RenderFlags(clientId); await Task.Delay(TimeSpan.FromSeconds(1)); } ; } }
public override void CreateNodes() { CreateProjectNode(); CreateSourceNode(); CreateGroupNode(); Refresher.RefreshCurrentNode(); }
public void AddUser(string userName, string password, int questionID, string answer, ForumType type) { var refe = new Refresher(userName, password, questionID, answer, type); refreshers.Add(refe); S1Manager.AddUserToDB(refe.User); RefreshDataGridView(); }
public Form1() { InitializeComponent(); maskedTextBox1.Mask = "000"; maskedTextBox1.Text = "20"; formThread = Thread.CurrentThread; addPanelDelegate = new addpanel2(addPanel2); refresherDelegate = new Refresher(refresher); this.AcceptButton = button2; }
static void Main(string[] args) { IDictionary <string, string> parameters = new Dictionary <string, string>(); parameters.Add("ConnectionString", "Server = 20.200.20.36; Database = northwind; User Id = usman; Password = 4Islamabad;"); Refresher refresher = new Refresher(); refresher.Init(parameters, "newcahe"); refresher.LoadDatasetOnStartup("products"); Console.WriteLine("Hello World!"); }
private void Refresh_Tick(object sender, EventArgs e) { if (this.Visible == true) { ResultBox.Text = CrossFormVariables.Result; } else { Refresher.Stop(); } }
public void Refresh() { if (_doingRefresh) { return; } _doingRefresh = true; Refresher?.Invoke(this); _doingRefresh = false; }
/// <summary> /// 监视器回调 /// </summary> /// <param name="o">oauthKey</param> private void MonitorCallback(object o) { string oauthKey = o.ToString(); string str = Http.PostBody("https://passport.bilibili.com/qrcode/getLoginInfo", "oauthKey=" + oauthKey + "&gourl=https%3A%2F%2Fwww.bilibili.com%2F", null, "application/x-www-form-urlencoded;charset=utf-8", "https://passport.bilibili.com/login"); if (!string.IsNullOrEmpty(str)) { JObject obj = JObject.Parse(str); if (obj.Property("code") != null) { if ((int)obj["code"] == 0)//登陆成功 { //关闭监视器 Monitor.Change(Timeout.Infinite, Timeout.Infinite); Refresher.Change(Timeout.Infinite, Timeout.Infinite); string Querystring = Regex.Split(obj["data"]["url"].ToString(), "\\?")[1]; string[] KeyValuePair = Regex.Split(Querystring, "&"); string cookies = ""; for (int i = 0; i < KeyValuePair.Length - 1; i++) { cookies += KeyValuePair[i] + "; "; } cookies = cookies.Substring(0, cookies.Length - 2); Raffle.Cookies = cookies; Dispatcher.Invoke(delegate() { DialogResult = true; Close(); }); } } else { switch ((int)obj["data"]) { case -4: //未扫描 break; case -5: //已扫描 lbl_stauts.Dispatcher.Invoke(delegate() { lbl_stauts.Visibility = Visibility.Visible; }); break; case 0: //登陆成功 break; } } } }
private void PerfomFilterStudents(string filter) { var filtered = FilterUtils.GetFiltered( SelectedGroup, filter, (student, search) => FilterUtils.ContainsIgnoreCase(student.FullName, search) ); var first = filtered.FirstOrDefault(); SelectedGroup.SetCurrentByReference(first); RefreshSelectedStudentInfo(); Refresher.RefreshSelector(StudentsListBox, filtered, first); }
public void OnDeath() { // TODO: if (aStation == null) { transform.position = startPosition; } else { transform.position = aStation.transform.position; } rb.velocity = new Vector2(0, 0); Refresher.RefreshRefreshers(); ResetQueue(ActionList); StartCoroutine(WaitAfterDeath()); }
public void GroupsSelectionChanged(object sender, RoutedEventArgs e) { var Item = (NamedDoubleLinkedList <Student>)GroupSelect.SelectedItem; if (GroupSelect.SelectedIndex < 0) { SelectedFaculty?.UnsetCurrent(); } else { SelectedFaculty?.SetCurrentByReference(Item); } Refresher.RefreshSelector(StudentsListBox, SelectedGroup, SelectedStudent); NotifyIsGroupSelectedChanged(); NotifyIsStudentSelectedChanged(); // todo: filter ? }
private void connected_Tick(object sender, EventArgs e) { try { geckoWebBrowser.Document.GetElementById("login_urlname").SetAttribute("value", ""); Refresher.Stop(); connected.Stop(); Downloadbtn.Enabled = true; Downloadbtn.Text = "Login"; } catch { Downloadbtn.Enabled = false; Downloadbtn.Text = "Connecting to Plays... This can take up to 1 minute."; if (Refresher.Enabled == false) { Refresher.Start(); } } }
public GObjectList(int ProcessIdOfWoW) { bool didit = false; this.ProcessIdOfWoW = ProcessIdOfWoW; while (didit == false) { Memory = new BlackMagic(); //this.form = form; //Lets Open wow for manipulation Memory.OpenProcessAndThread(ProcessIdOfWoW); //Lets find the Pattern - Shynd dwCodeLoc = SPattern.FindPattern(Memory.ProcessHandle, Memory.MainModule, PatternClientConnection, MaskClientConnection, ' '); //Lets find the s_curMgr try { g_clientConnection = Memory.ReadUInt(dwCodeLoc + 0x16); clientConnection = Memory.ReadUInt(g_clientConnection); curMgrOffset = Memory.ReadUInt(dwCodeLoc + 0x1C); //Lets find the CurMgr Offset curMgr = Memory.ReadUInt(clientConnection + curMgrOffset); //clientConnection + CurMgrOffest = Win LocalGUIDVariable = Memory.ReadUInt64(curMgr + LocalGuidOffset); localPlayerObject = getObjectByGUID(LocalGUIDVariable); localPlayer = new GPlayerSelf(this, localPlayerObject); } catch { } Descriptor = new Descriptors(Memory); //Lets start the object refresher objectRefresher = new Refresher(ProcessIdOfWoW); objectRefresher.GameObjectCreated += new EventHandler <GameObjectEventArgs>(addToLists); objectRefresher.GameObjectReleased += new EventHandler <GameObjectEventArgs>(removeFromLists); didit = true; } }
public void RefreshFacultySelect() { //FacultyList?.Sort((l1,l2) => string.CompareOrdinal(l1?.Name, l2?.Name) <= 0); FacultyList?.Sort(); Refresher.RefreshSelector(FacultySelect, FacultyList, SelectedFaculty); }
private void OnDisable() { RefresherCallback = null; }
private void ResultWindow_Activated(object sender, EventArgs e) { Refresher.Start(); }
public override async Task ExecuteAsync(CancellationToken token) { if (TargetSelector.IsActive) { Target = TargetSelector.Active.GetTargets().FirstOrDefault(); } if (Target != null) { if (Output.Unit != null && Output.AoeTargetsHit.Count >= (Config.AmountItem.Value == 1 ? 0 : Config.AmountItem.Value) && (BlackHole == null || !BlackHole.Ability.IsChanneling)) { Elsecount = 0; // Blink if (Blink != null && BlackHole != null && BlackHole.IsReady && Owner.Distance2D(Output.CastPosition) <= Blink.CastRange + (Lens != null ? Lens.GetCastRange() : 0) && Config.ItemsToggler.Value.IsEnabled(Blink.Item.Name) && Blink.CanBeCasted && Owner.Distance2D(Output.CastPosition) >= 400) { Blink.UseAbility(Output.CastPosition); await Await.Delay(Blink.GetCastDelay(Target.Position), token); } if (Blink == null || !Blink.CanBeCasted || !Config.ItemsToggler.Value.IsEnabled(Blink.Item.Name) || Owner.Distance2D(Output.CastPosition) <= 400) { UseItem(token); } // BlackHole if (BlackHole != null && Config.AbilityToggler.Value.IsEnabled(BlackHole.Ability.Name) && BlackHole.CanBeCasted && Elsecount == 6) { BlackHole.UseAbility(Output.CastPosition); await Await.Delay(BlackHole.GetCastDelay(Output.CastPosition), token); } else { Elsecount += 1; } // Refresher if (Refresher != null && Config.ItemsToggler.Value.IsEnabled(Refresher.Item.Name) && Refresher.CanBeCasted && BlackHole != null && !BlackHole.CanBeCasted && !BlackHole.Ability.IsChanneling && Elsecount == 7) { Refresher.UseAbility(); await Await.Delay(Refresher.GetCastDelay(), token); } } if (Target.IsAttackImmune() || Target.IsInvulnerable() && (BlackHole == null || !BlackHole.Ability.IsChanneling)) { Orbwalker.Move(Game.MousePosition); } else if (BlackHole == null || !BlackHole.Ability.IsChanneling) { Orbwalker.OrbwalkTo(Target); } } else if (BlackHole == null || !BlackHole.Ability.IsChanneling) { Orbwalker.Move(Game.MousePosition); } }
public void RunFinished() { Refresher.RefreshProject(_currentProject); }
public void RefreshGroupsSelect() { //SelectedFaculty?.Sort((l1, l2) => string.CompareOrdinal(l1?.Name, l2?.Name) <= 0); SelectedFaculty?.Sort(); Refresher.RefreshSelector(GroupSelect, SelectedFaculty, SelectedGroup); }
/// <summary> /// 监视器回调 /// </summary> /// <param name="o">oauthKey</param> private void MonitorCallback(object o) { string oauthKey = o.ToString(); string str = Bas.PostHTTPBody("https://passport.bilibili.com/qrcode/getLoginInfo", "oauthKey=" + oauthKey + "&gourl=https%3A%2F%2Fwww.bilibili.com%2F", "", "https://passport.bilibili.com/login"); if (!string.IsNullOrEmpty(str)) { JObject obj = JObject.Parse(str); if (obj.Property("code") != null) { if ((int)obj["code"] == 0)//登陆成功 { //关闭监视器 Monitor.Change(Timeout.Infinite, Timeout.Infinite); Refresher.Change(Timeout.Infinite, Timeout.Infinite); string Querystring = Regex.Split(obj["data"]["url"].ToString(), "\\?")[1]; string[] KeyValuePair = Regex.Split(Querystring, "&"); string cookies = ""; for (int i = 0; i < KeyValuePair.Length - 1; i++) { cookies += KeyValuePair[i] + "; "; string[] tmp = Regex.Split(KeyValuePair[i], "="); switch (tmp[0]) { case "bili_jct": Bas.account.Csrf_Token = tmp[1]; break; case "DedeUserID": Bas.account.Uid = tmp[1]; break; default: break; } } cookies = cookies.Substring(0, cookies.Length - 2); DateTime expires = DateTime.Now.AddDays(29); Bas.account.Cookies = cookies; Bas.account.Expires = expires; Bas.account.Save(); Dispatcher.Invoke(delegate() { DialogResult = true; Close(); }); } } else { switch ((int)obj["data"]) { case -4: //未扫描 break; case -5: //已扫描 lbl_stauts.Dispatcher.Invoke(delegate() { lbl_stauts.Visibility = Visibility.Visible; }); break; case 0: //登陆成功 break; } } } }
public void RefreshStudentsList() { SelectedGroup?.Sort(); Refresher.RefreshSelector(StudentsListBox, SelectedGroup, SelectedStudent); }