public MainViewModel(ICommand ChangeToSettingsView, Configuration Config, string currentVersion) { Task.Run(async() => await CheckForUpdates.InformLatestRelease(currentVersion)); this.ChangeToSettingsView = ChangeToSettingsView; StartRunCommand = new RelayCommand(() => StartStopTimer(true)); CheckGameRunningCommand = new RelayCommand(CheckGameRunningButton); this.Config = Config; ShowVersionNumber = true; VersionNumber = "Version " + currentVersion; ScreenshotImage = ScreenCapture.ImageSourceFromBitmap(Properties.Resources.background); TimerText = "00:00:00"; StartStopButtonText = "Start"; CheckGameRunning(); }
public void Parse_CurrentVersionIsNewer() { var results = CheckForUpdates.Parse(new List <ReleaseModel> { new ReleaseModel { Draft = false, PreRelease = false, TagName = "v0.1" } }, "0.2"); Assert.AreEqual(UpdateStatus.CurrentVersionIsLatest, results.Key); Assert.AreEqual("0.1.0", results.Value); }
public void Parse_CurrentVersionIsOlder() { var results = CheckForUpdates.Parse(new List <ReleaseModel> { new ReleaseModel { Draft = false, PreRelease = false, TagName = "v0.9" } }, "0.8"); Assert.AreEqual(UpdateStatus.NeedToUpdate, results.Key); Assert.AreEqual("0.9.0", results.Value); }
public DeploymentCommand Get(string applicationName) { var fileName = GetFileName(applicationName); DeploymentCommand deploymentCommand; if (File.Exists(fileName)) { var text = File.ReadAllText(fileName, Encoding.UTF8); deploymentCommand = _serializer.Deserialize <DeploymentCommand>(text); } else { var now = UniversalTime.Default.Now; deploymentCommand = new CheckForUpdates(now); } return(deploymentCommand); }
public Task Update() { var entryAssembly = Assembly.GetEntryAssembly(); var title = GetTitle(entryAssembly); var applicationName = title; var repository = new DeploymentCommandRepository(_serializer); DeploymentCommand command; try { command = repository.Get(applicationName); } catch { var now = UniversalTime.Default.Now; command = new CheckForUpdates(now); } return(Handle((dynamic)command)); }
public override IEnumerator Leave(Oui next) { Everest.Loader.AutoLoadNewMods = true; Audio.Play(SFX.ui_main_whoosh_large_out); menu.Focused = false; menuOnScreen = false; for (float p = 0f; p < 1f; p += Engine.DeltaTime * 4f) { menu.X = onScreenX + 1920f * Ease.CubeIn(p); alpha = 1f - Ease.CubeIn(p); yield return(null); } menu.Visible = Visible = false; menu.RemoveSelf(); menu = null; currentCheckForUpdates = null; updatableMods = new List <ModUpdateHolder>(); task = null; }
public static void OpenMigrate() { EditorLayout .GetWindow <MigrationWindow>("Entitas Migration - " + CheckForUpdates.GetLocalVersion(), new Vector2(415f, 564)) .Show(); }
public static void OpenMigrate() { EntitasEditorLayout.ShowWindow <MigrationWindow>("Entitas Migration - " + CheckForUpdates.GetLocalVersion()); }
protected void OnCheckForUpdates() => CheckForUpdates?.Invoke(this, null);
private static void Start(string[] args) { Initialize(args); CheckForUpdates.Update(Version); MainMenu.Menu(Version); }
/// <summary> /// The <see cref="Control.Click"/> event handler /// for the <see cref="ToolStripMenuItem"/> <see cref="mnuHelpCheckForUpdates"/> /// Checks the web for updates by parsing the version.txt file /// from ogamas web site, comparing it with assembly version /// of installed file. /// </summary> /// <param name="sender">Source of the event</param> /// <param name="e">An empty <see cref="EventArgs"/></param> private void mnuHelpCheckForUpdates_Click(object sender, EventArgs e) { CheckForUpdates updateDlg = new CheckForUpdates(); updateDlg.ShowDialog(); }