void FixtureCreateHealth() { Configuration.ClearInstance(); UpdateManager.ClearInstance(); System.GC.Collect(); var obj = new GameObject(); config = obj.AddComponent<Configuration>(); Assert.NotNull(config); umgr = obj.AddComponent<UpdateManager>(); Assert.NotNull(umgr); var objx = new GameObject(); character = objx.AddComponent<Character>(); Assert.NotNull(character); health = objx.GetComponent<CharacterHealth>(); Assert.NotNull(health); col2d = objx.GetComponent<PlatformerCollider2D>(); Assert.NotNull(col2d); health.onHeal += () => { onHealCalled = true; }; health.onDamage += () => { onDamageCalled = true; }; health.onImmunity += () => { onImmunityCalled = true; }; health.onMaxHealth += () => { onMaxHealthCalled = true; }; health.onInjured += (Damage dt, CharacterHealth to) => { onInjuredCalled = true; }; health.onHurt += (Damage dt, CharacterHealth to) => { onHurtCalled = true; }; health.onDeath += () => { onDeathCalled = true; }; health.onGameOver += () => { onGameOverCalled = true; }; health.onInvulnerabilityStart += () => { onInvulnerabilityStartCalled = true; }; health.onInvulnerabilityEnd += () => { onInvulnerabilityEndCalled = true; }; health.onRespawn += () => { onRespawnCalled = true; }; ResetCallbacks(); }
private bool worldMatrixDirty = true; // set to true if worldMatrix is no longer valid, see 'UpdateWorldMatrix()' //create the actor public Actor(ContentRegister content, UpdateManager updateManager, MaterialLightCollection lights, float groundRadius) { this.groundRadius = groundRadius; model = new ModelInstance(); model.LightCollection = lights; //force the model to render using spherical harmonic lighting //this will significantly improve performance on some hardware when GPU limited model.ShaderProvider = new Xen.Ex.Graphics.Provider.LightingDisplayShaderProvider(LightingDisplayModel.ForceSphericalHarmonic, model.ShaderProvider); //random starting position position = GetRandomPosition(); //initially target the current position //the 'move to next target' timer will wind down and then the actor will move target = position; //randomize a bit lookAngle = (float)random.NextDouble() * MathHelper.TwoPi; moveSpeed = (float)random.NextDouble() * 0.9f + 0.1f; content.Add(this); updateManager.Add(this); InitaliseAnimations(updateManager); }
public UpdateProgressViewModel(UpdateManager updateManger,IProductUpdate productUpdate) { _updateManger = updateManger; _productUpdate = productUpdate; _dispatcherTimer = new DispatcherTimer(DispatcherPriority.Normal, Dispatcher.CurrentDispatcher); StartUpdateProgressTimer(); }
/// <summary>Construct the logo</summary> public XenLogo(UpdateManager updateManager) { if (updateManager == null) throw new ArgumentNullException(); content = new ContentLoader(Application.GetApplicationInstance().Services); this.clearBackground = true; //setup the system and drawer this.particles = new Xen.Ex.Graphics.ParticleSystem(updateManager); this.particleDrawer = new VelocityBillboardParticles2DElement(this.particles, false, 0.025f); //align it... this.particleDrawer.VerticalAlignment = Xen.Ex.Graphics2D.VerticalAlignment.Centre; this.particleDrawer.HorizontalAlignment = Xen.Ex.Graphics2D.HorizontalAlignment.Centre; //clear background is optional. this.clear = new Xen.Graphics.Modifier.ClearBufferModifier(Microsoft.Xna.Framework.Graphics.ClearOptions.Target); this.clear.ClearColour = new Microsoft.Xna.Framework.Color(); //load the data straight from the assembly. this.particles.ParticleSystemData = content.Load<Xen.Ex.Graphics.Content.ParticleSystemData>("Logo"); this.particleTrigger = this.particles.GetTriggerByName("Fire"); updateManager.Add(this); }
/// <summary> /// Construct the particle system. Before the particle system is used, the <see cref="ParticleSystemData"/> must be set /// </summary> /// <param name="update"></param> public ParticleSystem(UpdateManager update) : this() { if (update == null) throw new ArgumentNullException(); update.Add(this); }
public static async Task Update() { if (!CanUpdate()) return; using (var mgr = new UpdateManager(UpdatePath, AppName)) { await mgr.UpdateApp(); } }
//The class is constructed with a camera and a reference to the Applications //UpdateManager public CameraOrbit(Camera3D camera, UpdateManager manager) { //keep a reference to the camera this.camera = camera; //Add this object to the update manager manager.Add(this); }
public void FindPrereleasePackage() { var rep = GetLocalRepository(); var sut = new UpdateManager(APP_NAME, new Version(1, 1), rep); sut.CheckForUpdate(includePrereleases: true); Assert.AreEqual(1, sut.AvailableUpdates.Count()); }
public void NoNewerReleasePackages() { var rep = GetLocalRepository(); var sut = new UpdateManager(APP_NAME, new Version(1, 1), rep); sut.CheckForUpdate(); Assert.AreEqual(0, sut.AvailableUpdates.Count()); }
public void WithNoCurrentVersionGetAllPackages() { var rep = GetLocalRepository(); var sut = new UpdateManager(APP_NAME, null, rep); sut.CheckForUpdate(); Assert.AreEqual(2, sut.AvailableUpdates.Count()); }
/// <summary> /// Ensure that there is an instance of this class somewhere in the scene. /// </summary> static void CreateInstance() { if (mInstance == null) { GameObject go = new GameObject("_UpdateManager"); mInstance = go.AddComponent<UpdateManager>(); DontDestroyOnLoad(go); } }
/// <summary> /// Construct a particle system with data /// </summary> /// <param name="systemData"></param> /// <param name="update"></param> public ParticleSystem(ParticleSystemData systemData, UpdateManager update) : this() { if (update == null) throw new ArgumentNullException(); Initalise(systemData, DefaultProcessorType); update.Add(this); }
public static async Task<ReleaseEntry> CheckForUpdate() { if (!CanUpdate()) return null; using (var mgr = new UpdateManager(UpdatePath, AppName)) { var updateInfo = await mgr.CheckForUpdate(); return updateInfo.FutureReleaseEntry; } }
private static int Compare(UpdateManager.UpdateEntry a, UpdateManager.UpdateEntry b) { if (a.index < b.index) { return 1; } if (a.index > b.index) { return 1; } return 0; }
public ShimmerInstaller(ShimmerConfiguration configuration) { var urlOrPath = configuration.UrlOrPath; var applicationName = configuration.ApplicationName; var frameworkVersion = configuration.FrameworkVersion; updateManager = new UpdateManager(urlOrPath, applicationName, frameworkVersion); updateInfo = updateManager.CheckForUpdate().Wait(); UpdatesAvailable = updateInfo.ReleasesToApply.Any(); InstallationPath = updateManager.LatestInstallationPath(updateInfo); }
void Fixture() { Configuration.ClearInstance(); UpdateManager.ClearInstance(); System.GC.Collect(); var obj = new GameObject(); config = obj.AddComponent<Configuration>(); Assert.NotNull(config); umgr = obj.AddComponent<UpdateManager>(); Assert.NotNull(umgr); ResetCallbacks(); }
public UpdatePropopsalViewModel(IViewModelInteraction viewModelInteraction ,UpdateManager updateManager, IProductUpdate productUpdate) { if (productUpdate == null) throw new ProductUpdateFailedException(new NullReferenceException("ProductUpdate!")); _viewModelInteraction = viewModelInteraction; _productUpdate = productUpdate; _updateManager = updateManager; _userInterfaceFactory = new UpdateUserInterfaceFactory(_updateManager); ShowUpdateInfo(); }
void Fixture() { Configuration.ClearInstance(); UpdateManager.ClearInstance(); System.GC.Collect(); var obj = new GameObject(); config = obj.AddComponent<Configuration>(); Assert.NotNull(config); umgr = obj.AddComponent<UpdateManager>(); Assert.NotNull(umgr); char1 = new TestCharacter("char1"); char2 = new TestCharacter("char2"); }
/// <summary> /// Ensure that there is an instance of this class present. /// </summary> static void CreateInstance () { if (mInst == null) { mInst = GameObject.FindObjectOfType(typeof(UpdateManager)) as UpdateManager; if (mInst == null && Application.isPlaying) { GameObject go = new GameObject("_UpdateManager"); DontDestroyOnLoad(go); //go.hideFlags = HideFlags.HideAndDontSave; mInst = go.AddComponent<UpdateManager>(); } } }
private ParticleSystemHotLoader(UpdateManager updateManager, ParticleSystem system, string pathToShaderSystem) { if (system == null || updateManager == null) throw new ArgumentNullException(); if (system.ParticleSystemData == null) throw new ArgumentNullException("ParticleSystem.ParticleSystemData"); this.system = new WeakReference(system); this.filename = system.ParticleSystemData.FileName; this.pathToShaderSystem = pathToShaderSystem; this.sourceFileModifiedDate = File.GetLastWriteTime(this.filename); updateManager.Add(this); }
internal AnimationProcessor(UpdateManager manager, object parent) { if (manager != null) { manager.Add(this); isAsync = true; if (parent != null) { parents = new List<WeakReference>(); parents.Add(new WeakReference(parent)); } threadAnimations = new List<AnimationStreamControl>(); } animations = new List<AnimationStreamControl>(); wasDrawn = true; }
public void NewReleasesShouldBeDetected() { var openPath = new Func<string, Stream>(s => { Assert.Equal(s, Path.Combine("packages", "RELEASES")); return File.OpenRead(IntegrationTestHelper.GetPath("fixtures", "RELEASES-OnePointOh")); }); var downloadUrl = new Func<string, IObservable<string>>(url => { var path = IntegrationTestHelper.GetPath("fixtures", "RELEASES-OnePointOne"); return Observable.Return(File.ReadAllText(path, Encoding.UTF8)); }); var fixture = new UpdateManager("http://lol", openPath, downloadUrl); var result = fixture.CheckForUpdate().First(); Assert.NotNull(result); Assert.Equal(1, result.Version.Major); Assert.Equal(1, result.Version.Minor); }
//load the avatar public Avatar(ContentRegister content, UpdateManager update, out bool contentLoaded) { //create a random avatar description... Microsoft.Xna.Framework.GamerServices.AvatarDescription description; description = Microsoft.Xna.Framework.GamerServices.AvatarDescription.CreateRandom(); //Create the avatar instance avatar = new AvatarInstance(description, true); //Create the animation controller. animationController = avatar.GetAnimationController(); //NOTE: Animations cannot be played until the avatar animation data has been loaded... update.Add(this); //to play animations from a file, the user must download additional content. //however, we don't want to crash if they haven't... so only crash if the debugger is present //this will allow the user to download the content. contentLoaded = false; try { content.Add(this); contentLoaded = true; } catch { content.Remove(this); //failed! but don't crash } if (contentLoaded) { //At this point in this tutorial, the animation is now loaded. //get the index of the walk animation int animationIndex = animationController.AnimationIndex("Walk"); //begin playing the animation, looping walkAnimation = animationController.PlayLoopingAnimation(animationIndex); } }
public void CheckThereAreTwoPackagesForIntegrationTests() { string appPathBase; using (CreateTempTestPath(out appPathBase)) { var sut = new UpdateManager(APP_NAME, null, PackageSource, appPathBase, _nuGetCachePathForTests); sut.CheckForUpdate(); Assert.AreEqual(2, sut.AvailableUpdates.Count()); } }
void UnregisterManagers() { UpdateManager.Unregister(); }
public void Uninstall() { UpdateManager.Unsubscribe(OnUpdate); }
private static void Main(string[] args) { ThisProcess = Process.GetCurrentProcess(); CommandLineArgs = args; Console.Title = WindowTitle; new FolderStructure().Build(); m_config = new Config(); debugMode = m_config.Settings.DebugMode; var path = Path.Combine(Environment.CurrentDirectory, "Newtonsoft.Json.dll"); if (File.Exists(path)) { try { var name = AssemblyName.GetAssemblyName(path); if (name.Version < new Version("10.0.0.0")) { using (Stream s = Assembly.GetCallingAssembly().GetManifestResourceStream("HellionExtendedServer.Resources.Newtonsoft.Json.dll")) { byte[] data = new byte[s.Length]; s.Read(data, 0, data.Length); File.WriteAllBytes(path, data); } } } catch (Exception) { } } else { try { using (Stream s = Assembly.GetCallingAssembly().GetManifestResourceStream("HellionExtendedServer.Resources.Newtonsoft.Json.dll")) { byte[] data = new byte[s.Length]; s.Read(data, 0, data.Length); File.WriteAllBytes(path, data); } } catch (Exception) { } } AppDomain.CurrentDomain.AssemblyResolve += (sender, rArgs) => { string assemblyName = new AssemblyName(rArgs.Name).Name; if (assemblyName.EndsWith(".resources")) { return(null); } string dllName = assemblyName + ".dll"; string dllFullPath = Path.Combine(Path.GetFullPath("Hes\\bin"), dllName); if (dllName == "Newtonsoft.Json.dll") { try { if (new AssemblyName(rArgs.Name).Version < new Version("10.0.0.0")) { using (Stream s = Assembly.GetCallingAssembly().GetManifestResourceStream("HellionExtendedServer.Resources.Newtonsoft.Json.dll")) { byte[] data = new byte[s.Length]; s.Read(data, 0, data.Length); File.WriteAllBytes(path, data); } return(Assembly.LoadFrom(path)); } } catch (Exception) { } } if (debugMode) { Console.WriteLine($"The assembly '{dllName}' is missing or has been updated. Adding/Updating missing assembly."); } using (Stream s = Assembly.GetCallingAssembly().GetManifestResourceStream("HellionExtendedServer.Resources." + dllName)) { byte[] data = new byte[s.Length]; s.Read(data, 0, data.Length); File.WriteAllBytes(dllFullPath, data); } return(Assembly.LoadFrom(dllFullPath)); }; // This is for args that should be used before HES loads bool noUpdateHes = false; bool noUpdateHellion = false; bool usePrereleaseVersions = false; Console.ForegroundColor = ConsoleColor.Green; foreach (string arg in args) { if (arg.Equals("-noupdatehes")) { noUpdateHes = true; } if (arg.Equals("-noupdatehellion")) { noUpdateHellion = true; } if (arg.Equals("-usedevversion")) { usePrereleaseVersions = true; } } if (usePrereleaseVersions || Config.Settings.EnableDevelopmentVersion) { Console.WriteLine("HellionExtendedServer: (Arg: -usedevversion is set) HES Will use Pre-releases versions"); } if (noUpdateHes || !Config.Settings.EnableAutomaticUpdates) { UpdateManager.EnableAutoUpdates = false; Console.WriteLine("HellionExtendedServer: (Arg: -noupdatehes is set or option in HES config is enabled) HES will not be auto-updated.\r\n"); } if (noUpdateHellion || !Config.Settings.EnableHellionAutomaticUpdates) { SteamCMD.AutoUpdateHellion = false; Console.WriteLine("HellionExtendedServer: (Arg: -noupdatehellion is set) Hellion Dedicated will not be auto-updated."); } Console.ResetColor(); updateManager = new UpdateManager(); var program = new HES(args); program.Run(args); }
public override void OnEnable() { base.OnEnable(); StartCoroutine(ClientWaitForProvider()); UpdateManager.Add(CallbackType.UPDATE, UpdateMe); }
/// <summary> /// Construct the camera /// </summary> /// <param name="updateManager"></param> /// <param name="startPosition"></param> public FirstPersonControlledCamera3D(UpdateManager updateManager, Vector3 startPosition) : this(updateManager, startPosition, false) { }
public ReadParams(UpdateManager updateManager, int cycleMs = 60000) : base(cycleMs, updateManager, "sss") { Iteration(); }
private void OnEnable() { RefreshPlayerList(); UpdateManager.Add(PeriodicUpdate, refreshTime); }
private void Awake() { Instance = this; DontDestroyOnLoad(gameObject); }
private void OnEnable() { RefreshPlayerList(); UpdateManager.Add(CallbackType.UPDATE, UpdateMe); }
public void Dispose() { UpdateManager.Unsubscribe(this.OnUpdate); this.context.ParticleManger.ParticleAdded -= this.OnParticleAdded; this.context.Renderer.Draw -= this.OnDraw; }
private async void Update_Click(object sender, EventArgs e) { await UpdateManager.Check(true); }
/// <summary> /// Construct the camera /// </summary> /// <param name="updateManager"></param> /// <param name="startPosition"></param> /// <param name="zUp">If true, the Z-Axis is treated as the up/down axis, otherwise Y-Axis is treated as up/down</param> /// <param name="projection"></param> public FirstPersonControlledCamera3D(UpdateManager updateManager, Vector3 startPosition, bool zUp, Projection projection) : base(updateManager, projection) { this.zUp = zUp; CameraMatrix = Matrix.CreateLookAt(startPosition, startPosition + new Vector3(1, 0, 0), new Vector3(0, 0, 1)); this.Position = startPosition; }
protected override void OnDeactivate() { UpdateManager.Unsubscribe(this.OnInventoryUpdate); UpdateManager.Unsubscribe(this.OnInventoryClear); }
void OnDisable() { UpdateManager.Remove(CallbackType.PERIODIC_UPDATE, UpdateMe); }
private void OnDisable() { displaySettings.SettingsChanged -= DisplaySettings_SettingsChanged; SceneManager.activeSceneChanged -= SceneManager_activeSceneChanged; UpdateManager.Remove(CallbackType.UPDATE, UpdateMe); }
public async Task <bool> CastAsync(Unit enemy) { InAction = true; InvokerCrappahilationPaid.Log.Warn("[Async] IceWall Start"); if (!Invoke()) { InvokerCrappahilationPaid.Log.Warn("[Async] IceWall cant invoke"); InAction = false; return(false); } Player.OnExecuteOrder += PlayerOnOnExecuteOrder; Owner.Stop(); await Task.Delay((int)(Game.Ping + 150)); Vector3 pos; float num1; if (!enemy.IsMoving || enemy.HasAnyModifiers("modifier_invoker_deafening_blast_knockback")) { num1 = Owner.TurnTime(enemy.NetworkPosition) + 0.1f; Owner.Move(enemy.NetworkPosition); pos = enemy.NetworkPosition; } else { pos = enemy.InFront(enemy.MovementSpeed * 0.6f); num1 = Owner.TurnTime(pos) + 0.1f; Owner.Move(pos); } if (num1 > 0.0) { await Task.Delay((int)(num1 * 1000.0)); } Owner.Stop(); var delay = Game.Ping > 1.0 ? Game.Ping / 1000f : Game.Ping; await Task.Delay((int)(delay * 1000.0)); var num2 = 220f / Vector3Extensions.Distance(pos, Owner.NetworkPosition); var num3 = Owner.NetworkRotationRad - (float)Math.Acos(num2); var position = new Vector3(Owner.NetworkPosition.X + (float)(Math.Cos(num3) * 10.0), Owner.NetworkPosition.Y + (float)(Math.Sin(num3) * 10.0), Owner.NetworkPosition.Z); var num4 = Owner.TurnTime(position) + 0.1f; Owner.MoveToDirection(position); if (num4 > 0.0) { await Task.Delay((int)(num4 * 1000.0)); } Owner.Stop(); Player.OnExecuteOrder -= PlayerOnOnExecuteOrder; InvokerCrappahilationPaid.Log.Warn("[Async] IceWall End (phase 1)"); UpdateManager.BeginInvoke(() => { InvokerCrappahilationPaid.Log.Warn("[Async] IceWall End (phase 2)"); InAction = false; }, (int)(Game.Ping * 3f)); return(UseAbility()); //await Task.Delay((int)(100.0 + delay)); }
private void DelayedRedraw() { UpdateManager.BeginInvoke(this.RedrawRange); }
public void AddParticle(ParticleEffect particle, string name) { var time = Game.RawGameTime - (Game.Ping / 2000); if (this.Owner.IsVisible) { var startPosition = this.Owner.Position; UpdateManager.BeginInvoke( () => { try { if (!particle.IsValid) { return; } var endPosition = particle.GetControlPoint(0); var obstacle = new LinearProjectileObstacle(this, startPosition, endPosition) { EndCastTime = time, EndObstacleTime = time + (this.RangedAbility.Range / this.RangedAbility.Speed) }; this.Pathfinder.AddObstacle(obstacle); } catch (Exception e) { Logger.Error(e); } }, 10); } else { UpdateManager.BeginInvoke( async() => { try { if (!particle.IsValid) { return; } var startPosition = particle.GetControlPoint(0); await Task.Delay(50); if (!particle.IsValid) { return; } var endPosition = particle.GetControlPoint(0); var obstacle = new LinearProjectileObstacle(this, startPosition, endPosition) { EndCastTime = time, EndObstacleTime = time + (this.RangedAbility.Range / this.RangedAbility.Speed) }; this.Pathfinder.AddObstacle(obstacle); } catch (Exception e) { Logger.Error(e); } }); } }
private async Task Update(bool allowSkip = true, bool notifyUser = false) { try { var assetNamePattern = Environment.Is64BitProcess ? "release_x64.zip" : "release.zip"; var updateManager = new UpdateManager("OliBomby", "Mapping_Tools", assetNamePattern); var hasUpdate = await updateManager.FetchUpdateAsync(); if (!hasUpdate) { if (notifyUser) { MessageQueue.Enqueue("No new versions available."); } return; } // Check if this version is newer than the version we skip var skipVersion = SettingsManager.Settings.SkipVersion; if (allowSkip && skipVersion != null && !(updateManager.UpdatesResult.LastVersion > skipVersion)) { if (notifyUser) { MessageQueue.Enqueue($"Version {updateManager.UpdatesResult.LastVersion} skipped because of user config."); } return; } Dispatcher.Invoke(() => { _updaterWindow = new UpdaterWindow(updateManager.Progress) { ShowActivated = true }; _updaterWindow.ActionSelected += async(sender, action) => { switch (action) { case UpdateAction.Restart: await updateManager.DownloadUpdateAsync(); updateManager.RestartAfterUpdate = true; updateManager.StartUpdateProcess(); _updaterWindow.Close(); Close(); break; case UpdateAction.Wait: await updateManager.DownloadUpdateAsync(); updateManager.RestartAfterUpdate = false; updateManager.StartUpdateProcess(); _updaterWindow.Close(); break; case UpdateAction.Skip: // Update the skip version so we skip this version in the future SettingsManager.Settings.SkipVersion = updateManager.UpdatesResult.LastVersion; _updaterWindow.Close(); break; default: _updaterWindow.Close(); break; } }; _updaterWindow.Closed += (sender, e) => { updateManager.Dispose(); }; _updaterWindow.Show(); }); } catch (Exception e) { MessageBox.Show("UPDATER_EXCEPTION: " + e.Message); if (notifyUser) { MessageQueue.Enqueue("Error fetching update: " + e.Message); } } }
public void OnDestroy() { UpdateManager.Remove(CallbackType.PERIODIC_UPDATE, UpdateMe); }
public async Task UpdateApp(bool silentIfLatestVersion = true) { try { using (UpdateManager updateManager = await GitHubUpdateManager(GitHubRepository)) { UpdateInfo newUpdateInfo; try { // UpdateApp CheckForUpdate will return value only if the app is squirrel installed newUpdateInfo = await updateManager.CheckForUpdate().NonNull(); } catch (Exception e) when(e is HttpRequestException || e is WebException || e is SocketException) { Log.Exception($"|Updater.UpdateApp|Check your connection and proxy settings to api.github.com.", e); updateManager.Dispose(); return; } var newReleaseVersion = Version.Parse(newUpdateInfo.FutureReleaseEntry.Version.ToString()); var currentVersion = Version.Parse(Constant.Version); Log.Info($"|Updater.UpdateApp|Future Release <{newUpdateInfo.FutureReleaseEntry.Formatted()}>"); if (newReleaseVersion <= currentVersion) { if (!silentIfLatestVersion) { MessageBox.Show("You already have the latest Wox version"); } updateManager.Dispose(); return; } try { await updateManager.DownloadReleases(newUpdateInfo.ReleasesToApply); } catch (Exception e) when(e is HttpRequestException || e is WebException || e is SocketException) { Log.Exception($"|Updater.UpdateApp|Check your connection and proxy settings to github-cloud.s3.amazonaws.com.", e); updateManager.Dispose(); return; } await updateManager.ApplyReleases(newUpdateInfo); if (DataLocation.PortableDataLocationInUse()) { var targetDestination = updateManager.RootAppDirectory + $"\\app-{newReleaseVersion.ToString()}\\{DataLocation.PortableFolderName}"; FilesFolders.Copy(DataLocation.PortableDataPath, targetDestination); if (!FilesFolders.VerifyBothFolderFilesEqual(DataLocation.PortableDataPath, targetDestination)) { MessageBox.Show(string.Format("Wox was not able to move your user profile data to the new update version. Please manually" + "move your profile data folder from {0} to {1}", DataLocation.PortableDataPath, targetDestination)); } } else { await updateManager.CreateUninstallerRegistryEntry(); } var newVersionTips = NewVersinoTips(newReleaseVersion.ToString()); MessageBox.Show(newVersionTips); Log.Info($"|Updater.UpdateApp|Update success:{newVersionTips}"); } } catch (Exception e) when(e is HttpRequestException || e is WebException || e is SocketException) { Log.Exception($"|Updater.UpdateApp|Please check your connection and proxy settings to api.github.com.", e); } }
public void Dispose() { this.show.ValueChange -= this.ShowOnValueChange; UpdateManager.Unsubscribe(this.handler); Entity.OnHandlePropertyChange -= this.OnHandlePropertyChange; }
public void Install() { UpdateManager.Subscribe(OnUpdate, 50); }
private async void UpdaterWindow_OnContentRendered(object sender, EventArgs e) { using var updateManager = UpdateManager.GitHubUpdateManager("https://github.com/HendrikKoelbel/WinControlTool"); await updateManager.Result.UpdateApp(this.UpdateProgress); }
void CheckForUpdates() { // Remove this for store builds! UpdateManager.Register(this, HocKeyApp_ID); }
public void Dispose() { UpdateManager.Unsubscribe(OnUpdate); Player.OnExecuteOrder -= OnExecuteOrder; menu.OnAbuseChange -= OnAbuseChange; }
public static void AddLateUpdate(MonoBehaviour mb, int updateOrder, UpdateManager.OnUpdate func) { UpdateManager.AddLateUpdate(mb, updateOrder, func); }
public void Dispose() { menu.OnEnabledChange -= MenuOnEnabledChange; UpdateManager.Unsubscribe(OnUpdate); }
private void OnEnable() { UpdateManager.Add(CallbackType.UPDATE, UpdateMe); OnStart(); }
private void OnDisable() { UpdateManager.Remove(CallbackType.PERIODIC_UPDATE, PeriodicUpdate); }
/// <summary> /// Construct the camera /// </summary> /// <param name="updateManager"></param> public FirstPersonControlledCamera3D(UpdateManager updateManager) : this(updateManager, Vector3.Zero) { }
private void OnDisable() { UpdateManager.Remove(CallbackType.UPDATE, UpdateMe); }
/// <summary> /// Construct the camera /// </summary> /// <param name="updateManager"></param> /// <param name="startPosition"></param> /// <param name="zUp">If true, the Z-Axis is treated as the up/down axis, otherwise Y-Axis is treated as up/down</param> public FirstPersonControlledCamera3D(UpdateManager updateManager, Vector3 startPosition, bool zUp) : this(updateManager, startPosition, zUp, new Projection()) { }
private void StartMicrowave() { UpdateManager.Add(CallbackType.UPDATE, UpdateMe); SoundManager.PlayNetworkedAtPos("MicrowaveStart", WorldPosition, sourceObj: gameObject); playAudioLoop = true; }
/// <summary> /// Constructor /// </summary> /// <param name="updaterManager"></param> /// <param name="projection"></param> public ControlledCamera3D(UpdateManager updaterManager, Projection projection) : base(projection, Matrix.Identity) { if (updaterManager != null) updaterManager.Add(this); }
private void HaltMicrowave() { UpdateManager.Remove(CallbackType.UPDATE, UpdateMe); playAudioLoop = false; }