当前位置: 首页>>代码示例>>C#>>正文


C# TreeListColumn类代码示例

本文整理汇总了C#中TreeListColumn的典型用法代码示例。如果您正苦于以下问题:C# TreeListColumn类的具体用法?C# TreeListColumn怎么用?C# TreeListColumn使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TreeListColumn类属于命名空间,在下文中一共展示了TreeListColumn类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CotCalcEdit

 public static RepositoryItemCalcEdit CotCalcEdit(TreeListColumn Column , string ColumnField , int SoThapPhan)
 {
     SetHorzAlignment(Column, HorzAlignment.Far);
     Column.ColumnEdit = HelpRepository.GetCalcEdit(SoThapPhan);
     if (ColumnField != null) Column.FieldName = ColumnField;
     return (RepositoryItemCalcEdit)Column.ColumnEdit;
 }
开发者ID:khanhdtn,项目名称:my-fw-win,代码行数:7,代码来源:HelpTreeColumn.cs

示例2: AddColumn

        //添加年份后,新增一列
        private void AddColumn(int year)
        {
            TreeListColumn column = new TreeListColumn();
            column.OptionsColumn.AllowEdit = false;
            column.FieldName = "y" + year;
            column.Tag = year;
            column.Caption = year + "年";
            column.Name = year.ToString();
            column.Width = 100;
            //column.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
            column.VisibleIndex = year;//有两列隐藏列

            //
            // repositoryItemTextEdit1
            //
            RepositoryItemTextEdit repositoryItemTextEdit1 = new RepositoryItemTextEdit();
            repositoryItemTextEdit1.AutoHeight = false;
            repositoryItemTextEdit1.DisplayFormat.FormatString = "n2";
            repositoryItemTextEdit1.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
            repositoryItemTextEdit1.Mask.EditMask = "n2";
            repositoryItemTextEdit1.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;

            column.ColumnEdit = repositoryItemTextEdit1;
            //column.DisplayFormat.FormatString = "#####################0.##";
            //column.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;

            this.treeList2.Columns.AddRange(new TreeListColumn[] {
            column});
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:30,代码来源:FormForecastMaxOrBad_SH.cs

示例3: CotCheckEdit

 public static RepositoryItemCheckEdit CotCheckEdit(TreeListColumn Column , string ColumnField)
 {
     SetHorzAlignment(Column, HorzAlignment.Center);
     Column.ColumnEdit = HelpRepository.GetCheckEdit(false);
     if (ColumnField != null) Column.FieldName = ColumnField;
     return (RepositoryItemCheckEdit)Column.ColumnEdit;
 }
开发者ID:khanhdtn,项目名称:my-fw-win,代码行数:7,代码来源:HelpTreeColumn.cs

示例4: chkNode_CheckedChanged

 private void chkNode_CheckedChanged(object sender, EventArgs e, TreeListColumn column)
 {
     trlPermission.PostEditor();
     TreeListNode node = trlPermission.FocusedNode;
     TreeListChangeChildNodesOperation operation = new TreeListChangeChildNodesOperation(column, node, (sender as CheckEdit).Checked);
     trlPermission.NodesIterator.DoOperation(operation);
 }
开发者ID:penguinsoft,项目名称:iPOS,代码行数:7,代码来源:uc_UserPermission.cs

示例5: PaintCell

        public virtual void PaintCell(Graphics dc, 
            Rectangle cellRect,
            Node node,
            TreeListColumn column,
            TreeList.TextFormatting format,
            object data)
        {
            if (format.BackColor != Color.Transparent)
            {
                Rectangle r = cellRect;
                r.X = column.CalculatedRect.X;
                r.Width = column.CalculatedRect.Width;
                SolidBrush brush = new SolidBrush(format.BackColor);
                dc.FillRectangle(brush, r);
                brush.Dispose();
            }
            if (data != null)
            {
                cellRect = CommonTools.Util.AdjustRectangle(cellRect, format.Padding);
                //dc.DrawRectangle(Pens.Black, cellRect);

                Color color = format.ForeColor;
                if (m_owner.FocusedNode == node && Application.RenderWithVisualStyles  == false)
                    color = SystemColors.HighlightText;
                TextFormatFlags flags= TextFormatFlags.EndEllipsis | format.GetFormattingFlags();
                TextRenderer.DrawText(dc, data.ToString(), m_owner.Font, cellRect, color, flags);
            }
        }
开发者ID:Diullei,项目名称:Storm,代码行数:28,代码来源:TreeListPainter.cs

示例6: CotComboboxFind

 public static RepositoryComboboxAuto CotComboboxFind(TreeList treeList , TreeListColumn column , string ColumnField , string ValueField, string DisplayField , string TableName , bool StartWith)
 {
     column.AppearanceHeader.Options.UseTextOptions = true;
     column.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
     column.FieldName = ColumnField+DisplayField;
     RepositoryComboboxAuto comboFind = new RepositoryComboboxAuto(treeList ,ColumnField, TableName , ValueField , DisplayField , StartWith);
     column.ColumnEdit = comboFind;
     return comboFind;
 }
开发者ID:khanhdtn,项目名称:my-fw-win,代码行数:9,代码来源:HelpTreeColumn.cs

示例7: CotComboboxAdd

 public static RepositoryComboboxAdd CotComboboxAdd(TreeList treeList , TreeListColumn column , string ColumnField , string ValueField, string DisplayField , string TableName)
 {
     column.AppearanceHeader.Options.UseTextOptions = true;
     column.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
     column.FieldName = ColumnField+DisplayField;
     RepositoryComboboxAdd comboAdd = new RepositoryComboboxAdd(TableName, ColumnField, ValueField, DisplayField, HelpGen.G_FW_DM_ID, treeList);
     comboAdd._init();
     column.ColumnEdit = comboAdd;
     return comboAdd;
 }
开发者ID:khanhdtn,项目名称:my-fw-win,代码行数:10,代码来源:HelpTreeColumn.cs

示例8: SetColumnType

        public static void SetColumnType(TreeListColumn column, object type)
        {
            if (type.Equals(TreeListColumnType.CheckEdit))
                HelpTreeColumn.CotCheckEdit(column, column.FieldName);

            else if (type.Equals(TreeListColumnType.CalcEdit))
                column.ColumnEdit = CalcEdit();
            else if (type.Equals(TreeListColumnType.DateEdit))
                column.ColumnEdit = DateEdit();
            else if (type.Equals(TreeListColumnType.SpinEdit))
                column.ColumnEdit = SpinEdit();
        }
开发者ID:khanhdtn,项目名称:my-fw-win,代码行数:12,代码来源:TreeListSupport.cs

示例9: InitDeviceType

        public void InitDeviceType(params string[] type)
        {
            if (type.Length == 0)
            {
                InitDeviceType();
                return;
            }
            ArrayList list = new ArrayList();
            list.AddRange(type);
            UCType = type[0];
            Stream fs = Assembly.Load("Itop.TLPSP.DEVICE").GetManifestResourceStream("Itop.TLPSP.DEVICE.devicetypes.xml");
            //Stream fs = Assembly.GetExecutingAssembly().GetManifestResourceStream("Itop.TLPSP.DEVICE.devicetypes.xml");
            //Assembly.GetExecutingAssembly().GetManifestResourceStream
            XmlDocument xml = new XmlDocument();
            xml.Load(fs);
            XmlNodeList nodes = xml.GetElementsByTagName("device");
            DataTable table = new DataTable();
            table.Columns.Add("id", typeof(string));
            table.Columns.Add("name", typeof(string));
            table.Columns.Add("class", typeof(string));
            TreeListColumn column = new TreeListColumn();
            column.Caption = "�豸����";
            column.FieldName = "name";
            column.VisibleIndex = 0;
            column.Width = 180;
            column.OptionsColumn.AllowEdit = false;
            column.OptionsColumn.AllowSort = false;
            this.treeList1.Columns.AddRange(new TreeListColumn[] {
            column});
            foreach (XmlNode node in nodes)
            {

                string stype = node.Attributes["id"].Value;
                if (!list.Contains(stype)) continue;
                DataRow row = table.NewRow();
                row["id"] = node.Attributes["id"].Value;
                row["name"] = node.Attributes["name"].Value;
                row["class"] = node.Attributes["class"].Value;
                table.Rows.Add(row);
                if (stype == "05")
                {
                    //DataRow row2 = table.NewRow();
                    //row2["id"] = "01";
                    //row2["name"] = "ĸ��";
                    //row2["class"] = "Itop.TLPSP.DEVICE.UCDeviceMX";
                    //table.Rows.Add(row2);
                }
            }
            treeList1.DataSource = table;
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:50,代码来源:frmRelationDevice.cs

示例10: InitDeviceTypes

 public static void InitDeviceTypes(DevExpress.XtraTreeList.TreeList treeList1) {
     TreeListColumn column = new TreeListColumn();
     column.Caption = "É豸ÖÖÀà";
     column.FieldName = "TypeName";
     column.VisibleIndex = 0;
     column.Width = 180;
     column.OptionsColumn.AllowEdit = false;
     column.OptionsColumn.AllowSort = false;
     treeList1.Columns.AddRange(new TreeListColumn[] {
     column});
     treeList1.KeyFieldName = "Id";
     treeList1.ParentFieldName = "ParentId";
     treeList1.DataSource = GetDeviceTypes();
 }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:14,代码来源:DeviceType.cs

示例11: CotCombobox

        public static RepositoryItemImageComboBox CotCombobox(TreeListColumn column, string LookupTable, string IDField, string DisplayField, string ColumnField)
        {
            column.AppearanceHeader.Options.UseTextOptions = true;
            column.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            column.AppearanceCell.Options.UseTextOptions = true;
            column.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;

            DatabaseFB db = DABase.getDatabase();
            DataSet ds = new DataSet();
            ds = db.LoadTable(LookupTable);

            RepositoryItemImageComboBox rCBB = new RepositoryItemImageComboBox();
            //rCBB.Name = "repositoryItemImageComboBoxCode" + LookupTable;
            foreach (DataRow row in ds.Tables[0].Rows)
                rCBB.Items.Add(new ImageComboBoxItem("" + row[DisplayField].ToString(), row[IDField]));

            column.ColumnEdit = rCBB;
            if (ColumnField != null) column.FieldName = ColumnField;
            return rCBB;
        }
开发者ID:khanhdtn,项目名称:my-fw-win,代码行数:20,代码来源:HelpTreeColumn.cs

示例12: DrawHeaderText

 public void DrawHeaderText(Graphics dc, Rectangle cellRect, TreeListColumn column, TreeList.TextFormatting format)
 {
     Color color = format.ForeColor;
     TextFormatFlags flags = TextFormatFlags.EndEllipsis | format.GetFormattingFlags();
     TextRenderer.DrawText(dc, column.Caption, column.Font, cellRect, color, flags);
 }
开发者ID:lanphon,项目名称:renderdoc,代码行数:6,代码来源:TreeListPainter.cs

示例13: DrawHeader

        public virtual void DrawHeader(Graphics dc, Rectangle cellRect, TreeListColumn column, TreeList.TextFormatting format, bool isHot, bool highlight)
        {
            Rectangle textRect = AdjustRectangle(cellRect, format.Padding);
            if (!Application.RenderWithVisualStyles)
            {
                ControlPaint.DrawButton(dc, cellRect,
                        m_owner.ViewOptions.UserRearrangeableColumns && highlight ? ButtonState.Pushed : ButtonState.Flat);
                DrawHeaderText(dc, textRect, column, format);
                return;
            }
            VisualStyleElement element = VisualStyleElement.Header.Item.Normal;
            if (isHot || highlight)
                element = VisualStyleElement.Header.Item.Hot;
            if (VisualStyleRenderer.IsElementDefined(element))
            {
                VisualStyleRenderer renderer = new VisualStyleRenderer(element);
                renderer.DrawBackground(dc, cellRect);

                if (format.BackColor != Color.Transparent)
                {
                    SolidBrush brush = new SolidBrush(format.BackColor);
                    dc.FillRectangle(brush, cellRect);
                    brush.Dispose();
                }
                //dc.DrawRectangle(Pens.Black, cellRect);

                DrawHeaderText(dc, textRect, column, format);
            }
        }
开发者ID:lanphon,项目名称:renderdoc,代码行数:29,代码来源:TreeListPainter.cs

示例14: InitCot

 public static RepositoryItemImageComboBox InitCot(TreeListColumn column, string fieldName, bool ReadOnly)
 {
     RepositoryItemImageComboBox r = HelpTreeColumn.CotCombobox(column, TABLE_MAP, "ID", "NAME", fieldName);
     if (ReadOnly) r.NullText = "";
     return r;
 }
开发者ID:khanhdtn,项目名称:did-vlib-2011,代码行数:6,代码来源:DMLoaiBang.cs

示例15: IsNodeMatchFilter

 private static bool IsNodeMatchFilter(TreeListNode node, TreeListColumn column)
 {
     var filterValue = column.FilterInfo.AutoFilterRowValue.ToString();
     if (node.GetDisplayText(column)
         .ToLower()
         .Contains(filterValue.ToLower()))
     {
         return true;
     }
     foreach (TreeListNode n in node.Nodes)
     {
         if (IsNodeMatchFilter(n, column))
         {
             return true;
         }
     }
     return false;
 }
开发者ID:Demotron,项目名称:AdminTools,代码行数:18,代码来源:TreeListScrollHelper.cs


注:本文中的TreeListColumn类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。