本文整理汇总了C#中MediaPortal.Util.VirtualDirectory.IsRemote方法的典型用法代码示例。如果您正苦于以下问题:C# VirtualDirectory.IsRemote方法的具体用法?C# VirtualDirectory.IsRemote怎么用?C# VirtualDirectory.IsRemote使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MediaPortal.Util.VirtualDirectory
的用法示例。
在下文中一共展示了VirtualDirectory.IsRemote方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadSettings
protected override void LoadSettings()
{
base.LoadSettings();
using (Profile.Settings xmlreader = new Profile.MPSettings())
{
currentLayout = (Layout)xmlreader.GetValueAsInt(SerializeName, "layout", (int)Layout.List);
m_bSortAscending = xmlreader.GetValueAsBool(SerializeName, "sortasc", true);
VideoState.StartWindow = xmlreader.GetValueAsInt("movies", "startWindow", GetID);
VideoState.View = xmlreader.GetValueAsString("movies", "startview", "369");
// Prevent unaccesible My Videos from corrupted config
if (!IsVideoWindow(VideoState.StartWindow))
{
VideoState.StartWindow = GetID;
VideoState.View = "369";
}
_isFuzzyMatching = xmlreader.GetValueAsBool("movies", "fuzzyMatching", false);
_scanSkipExisting = xmlreader.GetValueAsBool("moviedatabase", "scanskipexisting", false);
_getActors = xmlreader.GetValueAsBool("moviedatabase", "getactors", true);
_markWatchedFiles = xmlreader.GetValueAsBool("movies", "markwatched", true);
_eachFolderIsMovie = xmlreader.GetValueAsBool("movies", "eachFolderIsMovie", false);
_fileMenuEnabled = xmlreader.GetValueAsBool("filemenu", "enabled", true);
_fileMenuPinCode = Util.Utils.DecryptPin(xmlreader.GetValueAsString("filemenu", "pincode", string.Empty));
_howToPlayAll = xmlreader.GetValueAsInt("movies", "playallinfolder", 3);
_virtualDirectory = VirtualDirectories.Instance.Movies;
if (_virtualStartDirectory == string.Empty)
{
if (_virtualDirectory.DefaultShare != null)
{
if (_virtualDirectory.DefaultShare.IsFtpShare)
{
//remote:hostname?port?login?password?folder
_currentFolder = _virtualDirectory.GetShareRemoteURL(_virtualDirectory.DefaultShare);
_virtualStartDirectory = _currentFolder;
}
else
{
_currentFolder = _virtualDirectory.DefaultShare.Path;
_virtualStartDirectory = _virtualDirectory.DefaultShare.Path;
}
}
}
_askBeforePlayingDVDImage = xmlreader.GetValueAsBool("daemon", "askbeforeplaying", false);
if (xmlreader.GetValueAsBool("movies", "rememberlastfolder", false))
{
string lastFolder = xmlreader.GetValueAsString("movies", "lastfolder", _currentFolder);
if (VirtualDirectory.IsImageFile(Path.GetExtension(lastFolder)))
{
lastFolder = "root";
}
if (lastFolder != "root")
{
_currentFolder = lastFolder;
}
}
_switchRemovableDrives = xmlreader.GetValueAsBool("movies", "SwitchRemovableDrives", true);
}
if (_currentFolder.Length > 0 && _currentFolder == _virtualStartDirectory)
{
VirtualDirectory vDir = new VirtualDirectory();
vDir.LoadSettings("movies");
int pincode = 0;
bool FolderPinProtected = vDir.IsProtectedShare(_currentFolder, out pincode);
if (FolderPinProtected)
{
_currentFolder = string.Empty;
}
}
if (_currentFolder.Length > 0 && !_virtualDirectory.IsRemote(_currentFolder))
{
DirectoryInfo dirInfo = new DirectoryInfo(_currentFolder);
while (dirInfo.Parent != null)
{
string dirName = dirInfo.Name;
dirInfo = dirInfo.Parent;
string currentParentFolder = @dirInfo.FullName;
_history.Set(dirName, currentParentFolder);
}
}
}