private bool save(Settings settings)
        {
            using (Performance.Measure("saving global shortcuts"))
            {
                this.saveShortCuts();
            }

            Toggl.SetDefaultProject(settings.DefaultProject.ProjectID, settings.DefaultProject.TaskID);
            Toggl.SetKeepEndTimeFixed(settings.KeepEndTimeFixed);

            return(Toggl.SetSettings(settings.TogglSettings));
        }
示例#2
0
        private async Task <bool> save(Settings settings)
        {
            using (Performance.Measure("saving global shortcuts"))
            {
                this.saveShortCuts();
            }

            Toggl.SetDefaultProject(settings.DefaultProject.ProjectID, settings.DefaultProject.TaskID);
            Toggl.SetKeepEndTimeFixed(settings.KeepEndTimeFixed);
#if MS_STORE
            await RunOnStartup.TrySetRunOnStartup(settings.LaunchOnStartup);
#else
            Utils.SaveLaunchOnStartupRegistry(settings.LaunchOnStartup);
#endif
            return(Toggl.SetSettings(settings.TogglSettings));
        }