本文整理汇总了C#中MediaPortal.Video.Database.IMDBActor.SetProperties方法的典型用法代码示例。如果您正苦于以下问题:C# IMDBActor.SetProperties方法的具体用法?C# IMDBActor.SetProperties怎么用?C# IMDBActor.SetProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MediaPortal.Video.Database.IMDBActor
的用法示例。
在下文中一共展示了IMDBActor.SetProperties方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnItemSelected
private void OnItemSelected(GUIListItem item, GUIControl parent)
{
GUIPropertyManager.SetProperty("#groupmovielist", string.Empty);
string strView = string.Empty;
int currentViewlvl = 0;
if (handler != null)
{
strView = handler.CurrentLevelWhere.ToLowerInvariant();
currentViewlvl = handler.CurrentLevel;
if (handler.CurrentLevel > 0)
{
FilterDefinition defCurrent = (FilterDefinition) handler.View.Filters[handler.CurrentLevel - 1];
string selectedValue = defCurrent.SelectedValue;
Int32 iSelectedValue;
if (Int32.TryParse(selectedValue, out iSelectedValue))
{
if (strView == "actor" || strView == "director")
{
selectedValue = VideoDatabase.GetActorNameById(iSelectedValue);
}
if (strView == "genre")
{
selectedValue = VideoDatabase.GetGenreById(iSelectedValue);
}
if (strView == "user groups")
{
selectedValue = VideoDatabase.GetUserGroupById(iSelectedValue);
}
}
GUIPropertyManager.SetProperty("#currentmodule",
String.Format("{0}/{1} - {2}", GUILocalizeStrings.Get(100006),
handler.LocalizedCurrentView, selectedValue));
}
}
if (item.Label == "..")
{
IMDBMovie notMovie = new IMDBMovie();
notMovie.IsEmpty = true;
notMovie.SetProperties(true, string.Empty);
IMDBActor notActor = new IMDBActor();
notActor.SetProperties();
return;
}
// Set current item if thumb thread is working (thread can still update thumbs while user changed
// item) thus preventing sudden jump to initial selected item before thread start
if (_setThumbs != null && _setThumbs.IsAlive)
{
currentSelectedItem = facadeLayout.SelectedListItemIndex;
}
IMDBMovie movie = item.AlbumInfoTag as IMDBMovie;
if (movie == null)
{
movie = new IMDBMovie();
}
if (!string.IsNullOrEmpty(movie.VideoFileName))
{
movie.SetProperties(false, movie.VideoFileName);
}
else
{
switch (strView)
{
case "actorindex":
case "directorindex":
case "titleindex":
movie.IsEmpty = true;
movie.SetProperties(false, string.Empty);
break;
default:
movie.SetProperties(false, string.Empty);
break;
}
// Set title properties for other views (year, genres..)
if (!string.IsNullOrEmpty(item.Label))
{
GUIPropertyManager.SetProperty("#title", item.Label);
if (item.MusicTag != null)
{
GUIPropertyManager.SetProperty("#groupmovielist", item.MusicTag.ToString());
}
}
}
IMDBActor actor = VideoDatabase.GetActorInfo(movie.ActorID);
if (actor != null)
//.........这里部分代码省略.........
示例2: OnPageDestroy
protected override void OnPageDestroy(int newWindowId)
{
if ((_scanThread != null) && (_scanThread.IsAlive))
{
_scanThread.Abort();
_scanThread = null;
}
// Refresh actor info
_currentActor = VideoDatabase.GetActorInfo(_currentActor.ID);
SaveState();
//Clean properties
IMDBActor actor = new IMDBActor();
actor.SetProperties();
base.OnPageDestroy(newWindowId);
}
示例3: OnItemSelected
private void OnItemSelected(GUIListItem item, GUIControl parent)
{
if (item.Label == "..")
{
IMDBMovie notMovie = new IMDBMovie();
notMovie.SetProperties(true, string.Empty);
IMDBActor notActor = new IMDBActor();
notActor.SetProperties();
return;
}
IMDBMovie movie = item.AlbumInfoTag as IMDBMovie;
if (movie == null)
{
movie = new IMDBMovie();
}
ArrayList files = new ArrayList();
VideoDatabase.GetFilesForMovie(movie.ID, ref files);
if (files.Count > 0)
{
movie.SetProperties(false, (string)files[0]);
}
else
{
movie.SetProperties(false, string.Empty);
}
if (movie.ID >= 0)
{
string titleExt = movie.Title + "{" + movie.ID + "}";
string coverArtImage = Util.Utils.GetLargeCoverArtName(Thumbs.MovieTitle, titleExt);
if (Util.Utils.FileExistsInCache(coverArtImage))
{
facadeLayout.FilmstripLayout.InfoImageFileName = coverArtImage;
}
}
}
示例4: OnItemSelected
private void OnItemSelected(GUIListItem item, GUIControl parent)
{
GUIPropertyManager.SetProperty("#groupmovielist", string.Empty);
if (handler.CurrentLevel > 0)
{
FilterDefinition defCurrent = (FilterDefinition)handler.View.Filters[handler.CurrentLevel - 1];
string selectedValue = defCurrent.SelectedValue;
if (Regex.Match(selectedValue, @"[\d]*").Success)
{
if (defCurrent.Where == "actor" || defCurrent.Where == "director")
{
selectedValue = VideoDatabase.GetActorNameById(Convert.ToInt32(defCurrent.SelectedValue));
}
if (defCurrent.Where == "genre")
{
selectedValue = VideoDatabase.GetGenreById(Convert.ToInt32(defCurrent.SelectedValue));
}
if (defCurrent.Where == "user groups")
{
selectedValue = VideoDatabase.GetUserGroupById(Convert.ToInt32(defCurrent.SelectedValue));
}
}
GUIPropertyManager.SetProperty("#currentmodule",
String.Format("{0}/{1} - {2}", GUILocalizeStrings.Get(100006),
handler.LocalizedCurrentView, selectedValue));
}
if (item.Label == "..")
{
IMDBMovie notMovie = new IMDBMovie();
notMovie.SetProperties(true, string.Empty);
IMDBActor notActor = new IMDBActor();
notActor.SetProperties();
return;
}
// Set current item if thumb thread is working (thread can still update thumbs while user changed
// item) thus preventing sudden jump to initial selected item before thread start
if (_setThumbs != null && _setThumbs.IsAlive)
{
currentSelectedItem = facadeLayout.SelectedListItemIndex;
}
IMDBMovie movie = item.AlbumInfoTag as IMDBMovie;
if (movie == null)
{
movie = new IMDBMovie();
}
ArrayList files = new ArrayList();
VideoDatabase.GetFilesForMovie(movie.ID, ref files);
if (files.Count > 0)
{
movie.SetProperties(false, (string)files[0]);
}
else
{
movie.SetProperties(false, string.Empty);
// Set title properties for other views (year, genres..)
if (!string.IsNullOrEmpty(item.Label))
{
GUIPropertyManager.SetProperty("#title", item.Label);
GUIPropertyManager.SetProperty("#groupmovielist", SetMovieListGroupedBy(item));
}
}
IMDBActor actor = VideoDatabase.GetActorInfo(movie.ActorID);
if (actor != null)
{
actor.SetProperties();
}
else
{
actor = new IMDBActor();
actor.SetProperties();
}
if (movie.ID >= 0)
{
string titleExt = movie.Title + "{" + movie.ID + "}";
string coverArtImage = Util.Utils.GetLargeCoverArtName(Thumbs.MovieTitle, titleExt);
if (Util.Utils.FileExistsInCache(coverArtImage))
{
facadeLayout.FilmstripLayout.InfoImageFileName = coverArtImage;
}
}
if (movie.Actor != string.Empty)
{
GUIPropertyManager.SetProperty("#title", movie.Actor);
string coverArtImage = Util.Utils.GetLargeCoverArtName(Thumbs.MovieActors, movie.ActorID.ToString());
//.........这里部分代码省略.........