• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# TreeListColumn类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Save

        private void Save(TreeListNode node, TreeListColumn column)
        {
            Cursor = Cursors.WaitCursor;
            //List<PSP_ForecastValues> listValues = new List<PSP_ForecastValues>();
            string str = "";
            str = "set " + column.FieldName + "=" + node.GetValue(column.FieldName) + " where ID='" + node.GetValue("ID") + "'";

                        try
            {
                Common.Services.BaseService.Update("UpdatePs_Forecast_MathbyIDAndYear", str);
                //MsgBox.Show("���ݱ���ɹ���");
            }
            catch (Exception ex)
            {
                MsgBox.Show(ex.Message);
            }

            Cursor = Cursors.Default;
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:19,代码来源:FormForecastD.cs


示例17: CalculateSum2

        //���ӷ������ݸı�ʱ�������丸�����ֵ
        private void CalculateSum2(TreeListNode node, TreeListColumn column)
        {
            TreeListNode parentNode = node.ParentNode;

            if (parentNode == null)
            {
                return;
            }

            double sum = 0;
             bool TSL_falg = false;
            double Tsl_double = 0;
            foreach (TreeListNode nd in parentNode.Nodes)
            {
                if (nd["Title"].ToString().Contains("ͬʱ��"))
                {
                    //��¼ͬʱ��
                    if (Convert.ToDouble(nd[column].ToString()) != 0)
                    {
                        TSL_falg = true;
                        Tsl_double = Convert.ToDouble(nd[column].ToString());
                    }
                    continue;
                }
                object value = nd.GetValue(column.FieldName);
                if (value != null && value != DBNull.Value)
                {
                    sum += Convert.ToDouble(value);
                }
            }
            if (TSL_falg)
            {
                sum = sum * Tsl_double;
            }
            parentNode.SetValue(column.FieldName, sum);
            Save(node, column);
            CalculateSum2(parentNode, column);
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:39,代码来源:FormForecastD.cs


示例18: CalculateSum

 private void CalculateSum(TreeListNode node, TreeListColumn column)
 {
     DataRow row = (node.TreeList.GetDataRecordByNode(node) as DataRowView).Row;
     Ps_Forecast_Math v = DataConverter.RowToObject<Ps_Forecast_Math>(row);
     Common.Services.BaseService.Update<Ps_Forecast_Math>(v);
     TreeListNode parentNode = node.ParentNode;
     if (parentNode == null)
     {
         return;
     }
     double sum = 0;
     bool TSL_falg = false;
     double Tsl_double = 0;
     foreach (TreeListNode nd in parentNode.Nodes)
     {
         if (nd["Title"].ToString().Contains("ͬʱ��"))
         {
             //��¼ͬʱ��
             if (Convert.ToDouble(nd[column].ToString()) != 0)
             {
                 TSL_falg = true;
                 Tsl_double = Convert.ToDouble(nd[column].ToString());
             }
             continue;
         }
         object value = nd.GetValue(column.FieldName);
         if (value != null && value != DBNull.Value)
         {
             sum += Convert.ToDouble(value);
         }
     }
     if (sum != 0)
     {
         if (TSL_falg)
         {
             sum = sum * Tsl_double;
         }
         parentNode.SetValue(column.FieldName, sum);
     }
     else
     {
         parentNode.SetValue(column.FieldName, null);
     }
     CalculateSum(parentNode, column);
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:45,代码来源:FormForecastD.cs


示例19: PaintCellText

        public virtual void PaintCellText(Graphics dc, 
            Rectangle cellRect,
            Node node,
            TreeListColumn column,
            TreeList.TextFormatting format,
            object data)
        {
            if (data != null)
            {
                cellRect = AdjustRectangle(cellRect, format.Padding);
                //dc.DrawRectangle(Pens.Black, cellRect);

                Color color = format.ForeColor;
                if (node.ForeColor != Color.Transparent)
                    color = node.ForeColor;
                if (m_owner.FocusedNode == node && Application.RenderWithVisualStyles == false && m_owner.Focused)
                    color = SystemColors.HighlightText;
                TextFormatFlags flags= TextFormatFlags.EndEllipsis | format.GetFormattingFlags();

                Font f = m_owner.Font;
                Font disposefont = null;

                if(node.Bold && node.Italic)
                    disposefont = f = new Font(f, FontStyle.Bold|FontStyle.Italic);
                else if (node.Bold)
                    disposefont = f = new Font(f, FontStyle.Bold);
                else if (node.Italic)
                    disposefont = f = new Font(f, FontStyle.Italic);

                string datastring = "";

                if(m_converter != null)
                    datastring = m_converter(column, data);
                else
                    datastring = data.ToString();

                TextRenderer.DrawText(dc, datastring, f, cellRect, color, flags);

                Size sz = TextRenderer.MeasureText(dc, datastring, f, new Size(1000000, 10000), flags);

                int treecolumn = node.TreeColumn;
                if (treecolumn < 0)
                    treecolumn = node.OwnerView.TreeColumn;

                if (column.Index == treecolumn)
                    node.ClippedText = (sz.Width > cellRect.Width || sz.Height > cellRect.Height);

                if (disposefont != null) disposefont.Dispose();
            }
        }
开发者ID:kvark,项目名称:renderdoc,代码行数:50,代码来源:TreeListPainter.cs


示例20: AddFixColumn

        //��ӹ̶���
        private void AddFixColumn()
        {
            TreeListColumn column = new TreeListColumn();
            column.FieldName = "Title";
            column.Caption = "������";
            column.VisibleIndex = 0;
            column.Width = 180;
            column.OptionsColumn.AllowEdit = false;
            this.treeList1.Columns.AddRange(new TreeListColumn[] {
            column});
            column = new TreeListColumn();
            column.FieldName = "Sort";
            column.VisibleIndex = -1;
            this.treeList1.Columns.AddRange(new TreeListColumn[] {
            column});
            column = new TreeListColumn();
            column.FieldName = "ForecastID";
            column.VisibleIndex = -1;
            this.treeList1.Columns.AddRange(new TreeListColumn[] {
            column});

            column = new TreeListColumn();
            column.FieldName = "Forecast";
            column.VisibleIndex = -1;
            this.treeList1.Columns.AddRange(new TreeListColumn[] {
            column});

            column = new TreeListColumn();
            column.FieldName = "ID";
            column.VisibleIndex = -1;
            this.treeList1.Columns.AddRange(new TreeListColumn[] {
            column});
            column = new TreeListColumn();
            column.FieldName = "ParentID";
            column.VisibleIndex = -1;

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# TreeListNode类代码示例发布时间:2022-05-24
下一篇:
C# TreeList类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap