本文整理汇总了C#中NodeAttributes类的典型用法代码示例。如果您正苦于以下问题:C# NodeAttributes类的具体用法?C# NodeAttributes怎么用?C# NodeAttributes使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NodeAttributes类属于命名空间,在下文中一共展示了NodeAttributes类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetNodeAttributes
public override void GetNodeAttributes (ITreeNavigator parentNode, object dataObject, ref NodeAttributes attributes)
{
Project p = parentNode.DataItem as Project;
if (p is CProject)
attributes |= NodeAttributes.Hidden;
}
示例2: GetNodeAttributes
/// <summary>
/// Gets the attributes of the given node. In this case, sets the hidden attribute if the node matches the Connected Services folder in the project root
/// </summary>
public override void GetNodeAttributes (ITreeNavigator parentNode, object dataObject, ref NodeAttributes attributes)
{
var folder = (ProjectFolder)dataObject;
if (parentNode != null && parentNode.DataItem is DotNetProject && folder.Path.FileName == ConnectedServices.ProjectStateFolderName)
{
attributes |= NodeAttributes.Hidden;
}
}
示例3: GetNodeAttributes
public override void GetNodeAttributes (ITreeNavigator parentNode, object dataObject, ref NodeAttributes attributes)
{
Solution sol = (Solution) dataObject;
foreach (DotNetProject p in sol.GetAllSolutionItems<DotNetProject> ()) {
if (p.GetAddinData () != null)
return;
}
attributes |= NodeAttributes.Hidden;
}
示例4: GetNodeAttributes
public override void GetNodeAttributes (ITreeNavigator treeNavigator, object dataObject, ref NodeAttributes attributes)
{
ProjectFile file = (ProjectFile) dataObject;
attributes |= NodeAttributes.AllowRename;
if (!file.Visible && !treeNavigator.Options ["ShowAllFiles"])
attributes |= NodeAttributes.Hidden;
}
示例5: GetNodeAttributes
public override void GetNodeAttributes (ITreeNavigator parentNode, object dataObject, ref NodeAttributes attributes)
{
var fromPackagesFolderNode = parentNode.DataItem as ProjectReferencesFromPackagesFolderNode;
if (fromPackagesFolderNode != null)
return;
var projectReference = (ProjectReference)dataObject;
if (projectReference.IsReferenceFromPackage ()) {
attributes |= NodeAttributes.Hidden;
}
}
示例6: GetNodeAttributes
public override void GetNodeAttributes (ITreeNavigator treeNavigator, object dataObject, ref NodeAttributes attributes)
{
ProjectFile file = (ProjectFile) dataObject;
if (file.DependsOnFile != null) {
attributes = NodeAttributes.None;
} else {
attributes |= NodeAttributes.AllowRename;
}
if (!file.Visible && !treeNavigator.Options ["ShowAllFiles"])
attributes |= NodeAttributes.Hidden;
}
示例7: GetNodeAttributes
public override void GetNodeAttributes (ITreeNavigator treeNavigator, object dataObject, ref NodeAttributes attributes)
{
if (treeNavigator.Options ["ShowAllFiles"])
return;
ProjectFolder folder = dataObject as ProjectFolder;
if (folder != null && folder.Project is DotNetProject) {
GtkDesignInfo info = GtkDesignInfo.FromProject (folder.Project);
if (info.GtkGuiFolder == folder.Path)
attributes |= NodeAttributes.Hidden;
}
}
示例8: GetNodeAttributes
public override void GetNodeAttributes(ITreeNavigator treeNavigator, object dataObject, ref NodeAttributes attributes)
{
if (treeNavigator.Options ["ShowAllFiles"])
return;
ProjectFolder folder = dataObject as ProjectFolder;
if (folder != null && folder.Project is DotNetProject && folder.Project.ExtendedProperties["QyotoDesignInfo"] != null) {
QyotoDesignInfo info = QyotoDesignInfo.FromProject(folder.Project);
if (info.QtGuiFolder == folder.Path)
attributes |= NodeAttributes.Hidden;
}
}
示例9: GetNodeAttributes
public override void GetNodeAttributes (ITreeNavigator treeNavigator, object dataObject, ref NodeAttributes attributes)
{
if (dataObject is GuiProjectFolder)
return;
ProjectFolder folder = dataObject as ProjectFolder;
if (folder != null && folder.Project is DotNetProject) {
GtkDesignInfo info = GtkDesignInfo.FromProject (folder.Project);
if (info.SteticFolder == folder.Path)
attributes |= NodeAttributes.Hidden;
}
}
示例10: GetNodeAttributes
public override void GetNodeAttributes (ITreeNavigator treeNavigator, object dataObject, ref NodeAttributes attributes)
{
if (treeNavigator.Options ["ShowAllFiles"])
return;
ProjectFile pf = (ProjectFile) dataObject;
GtkDesignInfo info = GtkDesignInfo.FromProject (pf.Project);
//Designer files in the designer folder like IconFactory.gtkx should be always visible
if (info.HideGtkxFiles &&
pf.FilePath.Extension == ".gtkx" &&
!pf.FilePath.IsChildPathOf (info.SteticFolder))
attributes |= NodeAttributes.Hidden;
}
示例11: GetNodeAttributes
public override void GetNodeAttributes (ITreeNavigator parentNode, object dataObject, ref NodeAttributes attributes)
{
var file = (ProjectFile) dataObject;
if ((file.Flags & ProjectItemFlags.Hidden) != 0) {
attributes |= NodeAttributes.Hidden;
return;
}
attributes |= NodeAttributes.AllowRename;
if (!file.Visible && !parentNode.Options ["ShowAllFiles"])
attributes |= NodeAttributes.Hidden;
}
示例12: GetNodeAttributes
public override void GetNodeAttributes (ITreeNavigator parentNode, object dataObject, ref NodeAttributes attributes)
{
base.GetNodeAttributes (parentNode, dataObject, ref attributes);
if (dataObject is ProjectFile) {
string fname = ((ProjectFile)dataObject).Name;
if (fname.EndsWith (".addin.xml", StringComparison.Ordinal) || fname.EndsWith (".addin", StringComparison.Ordinal)) {
if (!(parentNode.DataItem is AddinData)) {
DotNetProject dp = (DotNetProject) parentNode.GetParentDataItem (typeof(DotNetProject), true);
if (dp != null && dp.GetAddinData () != null) {
// Hide the manifest
attributes |= NodeAttributes.Hidden;
}
}
}
}
}
示例13: GetNodeAttributes
public override void GetNodeAttributes (ITreeNavigator parentNode, object dataObject, ref NodeAttributes attributes)
{
if (dataObject is AddinProjectReference) {
attributes |= NodeAttributes.Hidden;
return;
}
ProjectReference pr = (ProjectReference) dataObject;
DotNetProject parent = pr.OwnerProject as DotNetProject;
if (AddinAuthoringService.IsProjectIncludedByAddin (parent, pr)) {
attributes |= NodeAttributes.Hidden;
}
else if (parent.GetAddinData () != null && pr.ReferenceType == ReferenceType.Project) {
DotNetProject tp = parent.ParentSolution.FindProjectByName (pr.Reference) as DotNetProject;
if (tp != null && tp.GetAddinData () != null)
attributes |= NodeAttributes.Hidden;
}
}
示例14: GetNodeAttributes
/// <summary>Get the attributes for the current node.</summary>
/// <param name="treeNavigator">ITreeNavigator containing the tree navigator.</param>
/// <param name="dataObject">An object containing the value of the current node.</param>
/// <param name="attributes">A NodeAttributes reference containing all the attribute for the current node.</param>
public override void GetNodeAttributes (ITreeNavigator treeNavigator, object dataObject, ref NodeAttributes attributes)
{
if (treeNavigator.Options ["ShowAllFiles"])
return;
ProjectFolder folder = dataObject as ProjectFolder;
DotNetProject project = folder.Project as DotNetProject;
if (project == null)
return;
foreach (var item in WebReferencesService.GetWebReferenceItems (project)) {
if (folder.Path == item.BasePath.ParentDirectory.CanonicalPath) {
attributes |= NodeAttributes.Hidden;
break;
}
}
}
示例15: UpdateNode
void UpdateNode (NodeBuilder[] chain, NodeAttributes ats, object dataObject)
{
bool isNew = false;
var ni = (NodeInfo)store.GetValue (currentIter, ExtensibleTreeView.NodeInfoColumn);
if (ni == null || ni.IsShared) {
ni = new NodeInfo ();
isNew = true;
}
else
ni.Reset ();
GetNodeInfo (ni, pad, this, chain, dataObject);
if (isNew)
store.SetValue (currentIter, ExtensibleTreeView.NodeInfoColumn, ni);
else
store.EmitRowChanged (store.GetPath (currentIter), currentIter);
}