本文整理汇总了C#中TreeListNode类的典型用法代码示例。如果您正苦于以下问题:C# TreeListNode类的具体用法?C# TreeListNode怎么用?C# TreeListNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TreeListNode类属于命名空间,在下文中一共展示了TreeListNode类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: AddTreeListNode
public TreeListNode AddTreeListNode(TreeList treelist, TreeListNode node, Type type, string propertyName, string defaultFunction, string validationFunction)
{
TreeListNode newNode = treelist.AppendNode(new object[] { propertyName, defaultFunction, validationFunction }, node);
//newNode.ImageIndex = newNode.SelectImageIndex = (int)image;
newNode.Tag = type;
return newNode;
}
开发者ID:uQr,项目名称:Visual-NHibernate,代码行数:7,代码来源:ucUserOptions.cs
示例2: AddNodeDataToDataTable
public void AddNodeDataToDataTable(DataTable dt, TreeListNode node, List<string> listColID)
{
DataRow newRow = dt.NewRow();
foreach (string colID in listColID)
{
//���������ڶ��㼰�Ժ���ǰ��ӿո�
if (colID == "StuffName" && node.ParentNode != null)
{
newRow[colID] = "����" + node[colID];
}
else
{
newRow[colID] = node[colID];
}
}
//�����������ӿ���
if (node.ParentNode == null && dt.Rows.Count > 0)
{
dt.Rows.Add(new object[] { });
}
dt.Rows.Add(newRow);
foreach (TreeListNode nd in node.Nodes)
{
AddNodeDataToDataTable(dt, nd, listColID);
}
}
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:29,代码来源:FormClass.cs
示例3: DeleteNode
//删除元件
public void DeleteNode(TreeListNode tln)
{
if (tln.HasChildren)
{
for (int i = 0; i < tln.Nodes.Count; i++)
{
DeleteNode(tln.Nodes[i]);
}
DeleteNode(tln);
}
else
{
Ps_pdtypenode pf = new Ps_pdtypenode();
pf.ID = tln["ID"].ToString();
string nodestr = tln["AreaName"].ToString();
try
{
TreeListNode node = tln.TreeList.FindNodeByKeyID(pf.ID);
if (node != null)
tln.TreeList.DeleteNode(node);
RemoveDataTableRow(dt, pf.ID);
Services.BaseService.Delete<Ps_pdtypenode>(pf);
}
catch (Exception e)
{
MessageBox.Show(e.Message + "删除结点出错!");
}
}
}
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:33,代码来源:UcPdtypenode.cs
示例4: PopulateTreeFromMessageGroups
private void PopulateTreeFromMessageGroups(IEnumerable<IGrouping<string, MessageDto>> messageGroups)
{
foreach (var group in messageGroups)
{
var firstOrDefault = group.FirstOrDefault();
if (firstOrDefault == null) continue;
var parent = new TreeListNode(firstOrDefault.ApplicationName);
foreach (var message in group)
{
var child = new TreeListNode(message.ApplicationName);
child.SubItems.Add(message.MachineName);
child.SubItems.Add(message.InsertDate.ToString());
child.SubItems.Add(message.ExceptionType);
child.SubItems.Add(message.ExceptionMessage);
child.SubItems.Add(message.HelpText);
child.SubItems.Add(message.CommandLineArgs);
child.SubItems.Add(message.StackTrace);
child.SubItems.Add(message.Id.ToString());
parent.Nodes.Add(child);
TotalMessages++;
}
tlvMessages.Nodes.Add(parent);
}
}
开发者ID:adback03,项目名称:MessageRoutingSystem,代码行数:26,代码来源:MainLayout.cs
示例5: InitFolder
private void InitFolder(TreeListNode treeListNode)
{
fileTree.BeginDataUpdate();
InitFolders(treeListNode);
InitFiles(treeListNode);
fileTree.EndDataUpdate();
}
开发者ID:StarOrigin,项目名称:dam,代码行数:7,代码来源:DMWindow.xaml.cs
示例6: FindChildNode
public override IEnumerable<TreeListNode> FindChildNode(TreeListNode mine, Guid id)
{
var result = new List<TreeListNode>();
if (Id == id) result.Add(mine);
return result;
}
开发者ID:yetanothervan,项目名称:conspector,代码行数:7,代码来源:CommentDto.cs
示例7: ApplyChangeForApiExtensions
private static void ApplyChangeForApiExtensions(TreeListNode node)
{
var tagName = (string)node.GetValue(0);
object theirValue = node.GetValue(1);
switch (tagName)
{
case "Category":
((UserOption)node.ParentNode.Tag).Category = (string)theirValue;
break;
case "DefaultValue":
((UserOption)node.ParentNode.Tag).DefaultValueFunctionBody = (string)theirValue;
break;
case "Description":
((UserOption)node.ParentNode.Tag).Description = (string)theirValue;
break;
case "IteratorType":
((UserOption)node.ParentNode.Tag).IteratorType = (Type)theirValue;
break;
case "ResetPerSession":
((UserOption)node.ParentNode.Tag).ResetPerSession = (bool)theirValue;
break;
case "Text":
((UserOption)node.ParentNode.Tag).Text = (string)theirValue;
break;
case "VariableName":
((UserOption)node.ParentNode.Tag).VariableName = (string)theirValue;
break;
case "VarType":
((UserOption)node.ParentNode.Tag).VarType = (Type)theirValue;
break;
default:
throw new NotImplementedException("Node not hendled yet: " + tagName);
}
}
开发者ID:uQr,项目名称:Visual-NHibernate,代码行数:35,代码来源:ScreenProjectDetails.cs
示例8: DeleteNode
//删除结点
public void DeleteNode(TreeListNode tln)
{
if (tln.HasChildren) {
for (int i = 0; i < tln.Nodes.Count; i++) {
DeleteNode(tln.Nodes[i]);
}
DeleteNode(tln);
} else {
Ps_pdreltype pf = new Ps_pdreltype();
pf.ID = tln["ID"].ToString();
string nodestr = tln["Title"].ToString();
try {
TreeListNode node = tln.TreeList.FindNodeByKeyID(pf.ID);
if (node != null)
tln.TreeList.DeleteNode(node);
RemoveDataTableRow(dataTable, pf.ID);
Ps_pdtypenode pn = new Ps_pdtypenode();
pn.pdreltypeid = pf.ID;
Itop.Client.Common.Services.BaseService.Update("DeletePs_pdtypepdreltypeid", pn);
Itop.Client.Common.Services.BaseService.Delete<Ps_pdreltype>(pf);
} catch (Exception e) {
MessageBox.Show(e.Message + "删除结点出错!");
}
}
}
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:29,代码来源:UcPdreltype.cs
示例9: Execute
public void Execute(TreeListNode node)
{
if (node == null)
{
throw new ArgumentNullException("node");
}
if (node.Nodes.Count > 0)
{
return;
}
ChoiceActionItem choiceActionItem = node.Tag as ChoiceActionItem;
if (choiceActionItem == null)
{
return;
}
if (!this.IsConfirmed(choiceActionItem))
{
return;
}
// workaround for xpand master-detail
// master-detail подписывается на событие Executing ВСЕХ action главного фрейма и отменяет их, когда в интерфейсе выбран detail
// убираем эту подписку с нашего action
Aurum.Menu.Utils.EventHelper.RemoveEventHandler(this.action, "Executing", d => d.Method != null && d.Method.Name != null && d.Method.Name.Contains("PushExecutionToNestedFrame"));
this.action.DoExecute(choiceActionItem);
}
开发者ID:LSTANCZYK,项目名称:devexpress_xaf_aurum,代码行数:27,代码来源:TreeListMenusControl.cs
示例10: InitFolders
private void InitFolders(TreeListNode treeListNode)
{
Directory item = treeListNode.Content as Directory;
if (item == null) return;
try
{
string[] root = Helper.GetDirectories(item.Path);
foreach (string s in root)
{
TreeListNode node = new TreeListNode()
{
Content = new Directory() { Name = Helper.GetDirectoryName(s), Parent = item },
Image = FileSystemImages.ClosedFolderImage
};
treeListNode.Nodes.Add(node);
node.IsExpandButtonVisible = HasFiles(s) ?
DefaultBoolean.True : DefaultBoolean.False;
}
}
catch
{
treeListNode.IsExpandButtonVisible = DefaultBoolean.False;
}
}
开发者ID:StarOrigin,项目名称:dam,代码行数:25,代码来源:DMWindow.xaml.cs
示例11: BuildTree
private void BuildTree(TreeListNode aNode,int ParentId)
{
try
{
treeList1.BeginUnboundLoad();
TreeListNode node;
TreeListNode devicenode;
TreeListNode camnode;
foreach (KeyValuePair<int, GroupInfo> item in listGroup)
{
if (item.Value.ParentId == ParentId)
{
node = treeList1.AppendNode(new object[] { item.Value.Name }, aNode);
node.Tag = item.Key.ToString() + ";G";
foreach (KeyValuePair<int, DeviceInfo> device in item.Value.ListDevice)
{
devicenode = treeList1.AppendNode(new object[] { device.Value.Name }, node);
devicenode.Tag = device.Key.ToString() + ";D";
foreach (KeyValuePair<int, CameraInfo> cam in device.Value.ListCamera)
{
camnode = treeList1.AppendNode(new object[] { cam.Value.Name }, devicenode);
camnode.Tag = cam.Key.ToString() + ";C";
}
}
BuildTree(node, item.Key);
}
}
}
catch (Exception ex)
{
}
}
开发者ID:dalinhuang,项目名称:intvideosurv,代码行数:35,代码来源:DeviceMaintain.cs
示例12: AddNodeTheirs
private TreeListNode AddNodeTheirs(string name, object theirValue, object myValue, TreeListNode parentNode, object tag)
{
TreeListNode node = treeListTheirs.AppendNode(new object[] { name, theirValue, "", myValue }, parentNode);
node.Tag = tag;
node.StateImageIndex = (int)TreeNodeImages.Unchecked;
return node;
}
开发者ID:uQr,项目名称:Visual-NHibernate,代码行数:7,代码来源:ScreenUserOptions.cs
示例13: SetForChildren
private void SetForChildren(TreeListNode node, bool value)
{
foreach (TreeListNode childNode in node.Nodes)
{
((ReconTrade)childNode.Content).Visible = value;
SetForChildren(childNode, value);
}
}
开发者ID:shukla2009,项目名称:Personal,代码行数:8,代码来源:ReconView.xaml.cs
示例14: GetSelection
private void GetSelection(List<AuthorizationCommand> list, TreeListNode node)
{
foreach (TreeListNode child in node.Nodes) {
if (child.CheckState == CheckState.Checked && child.Tag != null)
list.Add(child.Tag as AuthorizationCommand);
if (child.Nodes.Count > 0)
GetSelection(list, child);
}
}
开发者ID:wuyingyou,项目名称:uniframework,代码行数:9,代码来源:frmSelectCommand.cs
示例15: AppendNode
public override TreeListNode AppendNode(object nodeData, TreeListNode parentNode)
{
TreeListNode node = base.AppendNode(nodeData, parentNode);
if (this.OnNewNode != null)
{
this.OnNewNode(node);
}
return node;
}
开发者ID:micheljung,项目名称:gpgnetfix,代码行数:9,代码来源:GPGTreeList.cs
示例16: ParentsNodesGetIds
/// <summary>
/// Получить Id всех предков для данной ветки
/// </summary>
/// <param name="node">Текущая ветка</param>
/// <param name="idFieldName">Имя столбца с id</param>
/// <returns>Cписок всех Id</returns>
public static IEnumerable<int> ParentsNodesGetIds(TreeListNode node, string idFieldName)
{
var result = new List<int>();
while (node != null)
{
result.Add(Convert.ToInt32(node.GetValue(idFieldName)));
node = node.ParentNode;
}
return result;
}
开发者ID:Demotron,项目名称:AdminTools,代码行数:16,代码来源:TreeListScrollHelper.cs
示例17: NodeFromItem
public static TreeListNode NodeFromItem(TreeItemDto item)
{
var node = new TreeListNode()
{
Content = item,
IsExpandButtonVisible = item.IsContainChildren() ? DefaultBoolean.True : DefaultBoolean.False,
Image = item.GetMyImage()
};
return node;
}
开发者ID:yetanothervan,项目名称:conspector,代码行数:10,代码来源:TagTreeHelper.cs
示例18: Execute
public override void Execute(TreeListNode node)
{
var fn = node.GetValue(0);
if( fn is ReturnObj)
{
var ret = (ReturnObj) fn;
if (ret.Id == _returnObj.Id)
nodeCore = node;
}
}
开发者ID:pvx,项目名称:ShopOrder,代码行数:10,代码来源:GoodsReturnStateForm.cs
示例19: OnBeforeChangeExpanded
protected override bool OnBeforeChangeExpanded(
TreeListNode node,
bool newVal)
{
if (newVal)
{
CheckExpandDynamicNodes(node);
}
return base.OnBeforeChangeExpanded(node, newVal);
}
开发者ID:iraychen,项目名称:ZetaResourceEditor,代码行数:11,代码来源:ZetaResourceEditorTreeListControl.cs
示例20: GetDataBoundsLocation
protected override Point GetDataBoundsLocation(TreeListNode node, int top)
{
var result = base.GetDataBoundsLocation(node, top);
if (!((EmptyImageTreeList)TreeList).CanCheckNode(node))
result.X -= RC.CheckBoxSize.Width;
if (Size.Empty != RC.SelectImageSize && -1 == node.SelectImageIndex)
result.X -= RC.SelectImageSize.Width;
if (Size.Empty != RC.StateImageSize && -1 == node.StateImageIndex)
result.X -= RC.StateImageSize.Width;
return result;
}
开发者ID:w01f,项目名称:VolgaTeam.SalesLibrary,代码行数:11,代码来源:EmptyImageTreeListInfo.cs
注:本文中的TreeListNode类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论