Exemplo n.º 1
0
 public Task UpdateMovieWatchStatus(string directory, bool isWatched)
 {
     return(_engine.GetMovie(directory)
            .ContinueWith(t => {
         var movie = t.Result;
         if (movie != null)
         {
             movie.IsWatched = isWatched;
             _engine.UpdateEntity(movie);
         }
     }));
 }
        private async void ScriptServicesDataGrid_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (SelectedScriptService == null)
            {
                return;
            }

            var window = new ScriptServiceWindow(_dialogService, SelectedScriptService);
            var result = window.ShowDialog();

            if (result.HasValue && result.Value)
            {
                SelectedScriptService.Name = window.ScriptName;
                SelectedScriptService.Code = window.Code;

                await _engine.UpdateEntity(SelectedScriptService);

                IsModified = true;
            }
        }
Exemplo n.º 3
0
 private async Task MarkMovieWatched(Movie movie)
 {
     movie.IsWatched = true;
     await _engine.UpdateEntity(movie);
 }