本文整理汇总了C#中Workspace.GetDataDirectory方法的典型用法代码示例。如果您正苦于以下问题:C# Workspace.GetDataDirectory方法的具体用法?C# Workspace.GetDataDirectory怎么用?C# Workspace.GetDataDirectory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Workspace
的用法示例。
在下文中一共展示了Workspace.GetDataDirectory方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AppliesTo
public bool AppliesTo(Workspace workspaceCompare)
{
if (!ReferenceEquals(_workspace, workspaceCompare))
{
return false;
}
if (_workspace == null)
{
return true;
}
return _dataDirectory == workspaceCompare.GetDataDirectory()
&& _dataFileNames.SetEquals(GetDataFileNames(workspaceCompare));
}
示例2: EnsureDataDirectory
public void EnsureDataDirectory(Workspace workspace)
{
if (!workspace.IsLoaded)
{
return;
}
if (workspace.MsDataFiles.Count == 0)
{
return;
}
var dataDirectory = workspace.GetDataDirectory();
if (dataDirectory == "")
{
return;
}
if (dataDirectory != null && Directory.Exists(dataDirectory))
{
return;
}
var message = dataDirectory == null ? "" : "The data directory '" + dataDirectory + "' does not exist.";
message += "Do you want to browse for the directory containing the MS data files in this workspace?";
if (MessageBox.Show(message, Program.AppName, MessageBoxButtons.OKCancel) == DialogResult.Cancel)
{
workspace.SetDataDirectory("");
return;
}
BrowseForDataDirectory();
}
示例3: DataDirectoryValidator
public DataDirectoryValidator(RawFilesStep rawFilesStep)
{
_rawFilesStep = rawFilesStep;
_workspace = _rawFilesStep.Workspace;
if (_workspace != null)
{
_dataDirectory = _workspace.GetDataDirectory();
_dataFileNames = new HashSet<string>(GetDataFileNames(_workspace));
}
}