Example #1
0
        private void GetVnData()
        {
            try
            {
                Globals.StatusBar.ProgressText = "Processing";
                LanguageCollection.Clear();
                PlatformCollection.Clear();
                OriginalLanguagesCollection.Clear();
                VnInfoRelation.Clear();
                VnInfoTagCollection.Clear();
                VnInfoAnimeCollection.Clear();
                TagDescription = String.Empty;

                using (var context = new DatabaseContext())
                {
                    Globals.VnId = context.VnInfo.Where(t => t.Title == (_selectedVn)).Select(v => v.VnId).FirstOrDefault();
                }

                if (Globals.VnId > 0)
                {
                    UpdateViews();
                }
            }
            catch (Exception ex)
            {
                Globals.Logger.Error(ex);
                Globals.StatusBar.ProgressText = String.Empty;
                throw;
            }
        }
Example #2
0
 private void ClearVnData()
 {
     TreeVnCategories.Clear();
     LanguageCollection.Clear();
     OriginalLanguagesCollection.Clear();
     VnInfoRelation.Clear();
     VnInfoTagCollection.Clear();
     VnInfoAnimeCollection.Clear();
     PlatformCollection.Clear();
     VnMainModel.Name        = String.Empty;
     VnMainModel.Original    = String.Empty;
     VnMainModel.PlayTime    = String.Empty;
     VnMainModel.LastPlayed  = String.Empty;
     VnMainModel.Image       = null;
     VnMainModel.Aliases     = String.Empty;
     VnMainModel.Description = String.Empty;
     VnMainModel.Released    = String.Empty;
     VnMainModel.Length      = String.Empty;
     VnMainModel.VnIcon      = null;
     VnMainModel.Popularity  = 0;
     VnMainModel.Rating      = 0;
     VnMainModel.Links       = string.Empty;
 }