ToString() public method

public ToString ( ) : string
return string
Exemplo n.º 1
0
        private void SetMovieRefreshProperties(DBMovieInfo movie, int progress, int total, bool cancelled)
        {
            if (cancelled)
            {
                GUIUtils.SetProperty("#IMDb.Movie.Refresh.Active", "false");
                GUIUtils.SetProperty("#IMDb.Movie.Refresh.Movie", string.Empty);
                GUIUtils.SetProperty("#IMDb.Movie.Refresh.ProgressPercent", string.Empty);
                GUIUtils.SetProperty("#IMDb.Movie.Refresh.CurrentItem", string.Empty);
                GUIUtils.SetProperty("#IMDb.Movie.Refresh.MovieCount", string.Empty);
                return;
            }

            int percent = (int)(((decimal)progress / total) * 100);

            Logger.Info("Refreshing movie information [{0}/{1}] '{2}'", progress, total, movie.ToString());

            GUIUtils.SetProperty("#IMDb.Movie.Refresh.Status", string.Format(Translation.RefreshMovieStatus, progress, total, percent));
            GUIUtils.SetProperty("#IMDb.Movie.Refresh.Active", "true");
            GUIUtils.SetProperty("#IMDb.Movie.Refresh.Movie", movie.ToString());
            GUIUtils.SetProperty("#IMDb.Movie.Refresh.ProgressPercent", percent.ToString());
            GUIUtils.SetProperty("#IMDb.Movie.Refresh.CurrentItem", progress.ToString());
            GUIUtils.SetProperty("#IMDb.Movie.Refresh.MovieCount", total.ToString());
        }