public IProject ReadProject(string path) { _log.Info("Try to load project {0}", path); string content = _fileSystem.ReadAllText(path); var project = _serializer.Deserialize(content); return(project); }
private void Hibernate() { SetNextHiberateToTomorrow(); log.Info(ZappHibernation, "Machine was hibernated automatically."); if (Debugger.IsAttached) { MessageBox.Show("Machine would hibernate.", "Zapp", MessageBoxButton.OK, MessageBoxImage.None, MessageBoxResult.OK, MessageBoxOptions.DefaultDesktopOnly); } else { Application.SetSuspendState(PowerState.Hibernate, false, false); } }
private async Task <bool> CheckForUpdate() { log.Info("Checking for update."); var updateInfo = await updateManager.CheckForUpdate(); return(updateInfo.FutureReleaseEntry != updateInfo.CurrentlyInstalledVersion); }
private IEnumerable <ProjectTreeElement> ScanProject(FullPath projectFullPath) { var treeState = new LoadTreeState(); Queue <ProjectTreeElement> queue = new Queue <ProjectTreeElement>(); var rootNode = AddProject(treeState, projectFullPath); queue.Enqueue(rootNode); while (queue.Count != 0) { var projectContainer = queue.Dequeue(); _log.Info("Parsing project {0}", projectContainer.Path.Value); var modules = projectContainer.Project.Operations().AllModules; foreach (IModule module in modules) { FullPath modulePath; if (_path.TryResolveModulePath(projectContainer.Path, module.Path, out modulePath)) { if (treeState.ScannedProjects.Any(item => item.Path.SameAs(modulePath))) { _log.Warning("Adding second instance of {0}", modulePath.Value); } else { var subProjectNode = AddProject(treeState, modulePath); queue.Enqueue(subProjectNode); } } else { _log.WriteMessage("Project: {0}, module is missing at {1}", projectContainer.Path, module.Path); } } } return(treeState.ScannedProjects); }
public void Snooze() { CloseWindow(); log.Info("User clicked 'Snooze' on hibernation warning modal."); hibernationService.Snooze(TimeSpan.FromHours(1)); }
private void FirstLoginReminder_Done() { log.Info(HeatingFirstLoginDone, "User clicked 'Done!' on first login reminder."); settings.MostRecentFirstLoginReminderDismissal = DateTime.Now; }