本文整理汇总了C#中Aga类的典型用法代码示例。如果您正苦于以下问题:C# Aga类的具体用法?C# Aga怎么用?C# Aga使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Aga类属于命名空间,在下文中一共展示了Aga类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetValue
public override object GetValue(Aga.Controls.Tree.TreeNodeAdv node)
{
ValueEntry ent = node.Tag as ValueEntry;
if (ent == null)
return "";//if this is not a value entry, value is not relevant
Entry linked = FormattedReader.ParseRef(ent, ent.Link);
return ent.Value + (ent.Link != null && linked != null ? " (" + FormattedReader.ParseValueRefs(linked, linked.FriendlyName) + ")" : "");
}
示例2: GetToolTip
public string GetToolTip(TreeNodeAdv node, Aga.Controls.Tree.NodeControls.NodeControl nodeControl)
{
var pNode = _tree.FindNode(node);
if (pNode != null)
return pNode.GetTooltipText(this);
else
return "";
}
示例3: GetToolTip
public string GetToolTip(TreeNodeAdv node, Aga.Controls.Tree.NodeControls.NodeControl nodeControl)
{
NodeBase dataNode = node.Tag as NodeBase;
GameObjectNode objNode = dataNode as GameObjectNode;
if (dataNode.LinkState == NodeBase.PrefabLinkState.None) return null;
if (objNode == null) return null;
if (objNode.Obj.PrefabLink == null) return null;
return String.Format(PluginRes.EditorBaseRes.SceneView_PrefabLink, objNode.Obj.PrefabLink.Prefab.Path);
}
示例4: btx_DrawText
/// <summary>
/// Funkcja obsługująca zdarzenie DrawText na NodeControlle. Bierze status Tasku i zmienia kolor
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void btx_DrawText(object sender, Aga.Controls.Tree.NodeControls.DrawEventArgs e)
{
Task t = e.Node.Tag as Task;
Task.TaskStatus status = Task.TaskStatus.ERROR;
Color c = Color.Violet;
if (t != null)
{
status = t.Status;
}
e.TextColor = getColorByTaskStatus(status);
}
示例5: MouseDoubleClick
public override void MouseDoubleClick(Aga.Controls.Tree.TreeNodeAdvMouseEventArgs args)
{
base.MouseDoubleClick(args);
if (args.Node.Tag != null && !(args.Node.Tag is ValueEntry))
return;//if this is not a value entry, value is not relevant
ValueEntry ent = (ValueEntry)args.Node.Tag;
if (ent == null)
{//this is the "add new entry" button
this.BeginEdit();
}
else
{
FileEditorGUI egui = (FileEditorGUI)this.Parent.Model;
egui.GotoLink(ent.Link, args.Node);
}
}
示例6: nodeTextBoxName_DrawText
private void nodeTextBoxName_DrawText(object sender, Aga.Controls.Tree.NodeControls.DrawTextEventArgs e)
{
if (e.Context.Bounds.IsEmpty) return;
NodeBase node = e.Node.Tag as NodeBase;
ComponentNode cmpNode = node as ComponentNode;
GameObjectNode objNode = (cmpNode != null ? cmpNode.Parent : node) as GameObjectNode;
DesignTimeObjectData data = objNode != null ? DesignTimeObjectData.Get(objNode.Obj) : null;
bool lockedOrHidden = data != null ? data.IsLocked || data.IsHidden : false;
// Prefab-linked entities
if (lockedOrHidden)
e.TextColor = Color.FromArgb(96, 96, 96);
else if (node.LinkState == NodeBase.PrefabLinkState.Active)
e.TextColor = Color.Blue;
else if (node.LinkState == NodeBase.PrefabLinkState.Broken)
e.TextColor = Color.DarkRed;
else
e.TextColor = Color.Black;
// Flashing
if (node == this.flashNode)
{
float intLower = this.flashIntensity;
Color hlBase = Color.FromArgb(224, 64, 32);
Color hlLower = Color.FromArgb(
(int)(this.objectView.BackColor.R * (1.0f - intLower) + hlBase.R * intLower),
(int)(this.objectView.BackColor.G * (1.0f - intLower) + hlBase.G * intLower),
(int)(this.objectView.BackColor.B * (1.0f - intLower) + hlBase.B * intLower));
e.BackgroundBrush = new SolidBrush(hlLower);
}
}
示例7: nodeTextBox1_DrawText
void nodeTextBox1_DrawText(object sender, Aga.Controls.Tree.NodeControls.DrawEventArgs e)
{
DebugNode node = e.Node.Tag as DebugNode;
if (node.Changed)
{
e.TextColor = Color.Red;
}
}
示例8: nodeStateIcon_DrawIcon
private void nodeStateIcon_DrawIcon(object sender, Aga.Controls.Tree.NodeControls.DrawIconEventArgs e)
{
if (e.Context.Bounds.IsEmpty) return;
NodeBase node = e.Node.Tag as NodeBase;
ComponentNode cmpNode = node as ComponentNode;
GameObjectNode objNode = (cmpNode != null ? cmpNode.Parent : node) as GameObjectNode;
DesignTimeObjectData data = objNode != null ? DesignTimeObjectData.Get(objNode.Obj) : null;
bool lockedOrHidden = data != null ? data.IsLocked || data.IsHidden : false;
if (lockedOrHidden) e.IconColorMatrix = this.inactiveIconMatrix;
}
示例9: OnFragmentTreeItemDoubleClick
private void OnFragmentTreeItemDoubleClick(object sender, Aga.Controls.Tree.TreeNodeAdvMouseEventArgs e)
{
if (e.Node != null && e.Node.Tag is TreeViewArchiveModel.ParameterStructItem)
{
ShaderParameterUtil.EditParameter(graphControl, ((TreeViewArchiveModel.ParameterStructItem)e.Node.Tag).ArchiveName);
}
}
示例10: nodeCheckBox1_IsVisibleValueNeeded
private void nodeCheckBox1_IsVisibleValueNeeded(object sender, Aga.Controls.Tree.NodeControls.NodeControlValueEventArgs e)
{
e.Value = e.Node.Tag is MyDebugTaskNode;
}
示例11: nodeTextBoxObjId_DrawText
private void nodeTextBoxObjId_DrawText(object sender, Aga.Controls.Tree.NodeControls.DrawTextEventArgs e)
{
DataTreeNode node = e.Node.Tag as DataTreeNode;
ObjectRefTreeNode objRefNode = node as ObjectRefTreeNode;
if (e.Text == "0")
e.TextColor = SystemColors.GrayText;
else if (objRefNode != null)
{
if (this.IsObjectIdExisting(objRefNode.ObjId))
e.TextColor = Color.Blue;
else
e.TextColor = Color.Red;
}
else
e.TextColor = Color.Black;
}
示例12: treeViewAdv1_NodeMouseDoubleClick
private void treeViewAdv1_NodeMouseDoubleClick(object sender, Aga.Controls.Tree.TreeNodeAdvMouseEventArgs e)
{
Console.WriteLine("DblClick {0}", e.Node);
}
示例13: nodeTextBoxValue_DrawText
private void nodeTextBoxValue_DrawText(object sender, Aga.Controls.Tree.NodeControls.DrawTextEventArgs e)
{
e.TextColor = Color.Black;
}
示例14:
string IToolTipProvider.GetToolTip(TreeNodeAdv viewNode, Aga.Controls.Tree.NodeControls.NodeControl nodeControl)
{
IEditorAction action = this.GetResourceOpenAction(viewNode, false);
if (action != null) return string.Format(
Duality.Editor.Plugins.ProjectView.Properties.ProjectViewRes.ProjectFolderView_Help_Doubleclick,
action.Description);
else return null;
}
示例15: OnNodeDrawText
void OnNodeDrawText(object sender, Aga.Controls.Tree.NodeControls.DrawEventArgs e)
{
if (e.Node.Tag == null)
return;
var ocolor = PropertyService.Get(ConfigProperties.OpenColor, Color.LightGreen);
var dcolor = PropertyService.Get(ConfigProperties.DirtyColor, Color.Pink);
var item = (RepositoryItem)e.Node.Tag;
var ctx = e.Context;
if (item.ClipboardState != RepositoryItem.ClipboardAction.None)
{
var oldFont = e.Font;
e.Font = new Font(oldFont.FontFamily, oldFont.Size, oldFont.Style | FontStyle.Italic);
}
if (item.IsDirty)
e.BackgroundBrush = new SolidBrush(dcolor);
else if (item.IsOpen)
e.BackgroundBrush = new SolidBrush(ocolor);
}