예제 #1
0
        public NTreeListUC()
        {
            InitializeComponent();

            Dock = DockStyle.Fill;

            m_List        = new NTreeList();
            m_List.Dock   = DockStyle.Fill;
            m_List.Parent = containerPanel;
        }
예제 #2
0
        public NTreeListOutlookReportUC()
        {
            InitializeComponent();

            Dock = DockStyle.Fill;

            m_List                = new NTreeList();
            m_List.Dock           = DockStyle.Fill;
            m_List.ShowGroupByBox = true;
            m_List.Parent         = containerPanel;
        }
예제 #3
0
        public NTreeListDataBindingUC()
        {
            InitializeComponent();

            Dock = DockStyle.Fill;

            m_List      = new NTreeList();
            m_List.Dock = DockStyle.Fill;
            m_List.GroupNodeDefaultState.Font = new Font("Trebuchet MS", 9, FontStyle.Bold);
            m_List.Parent          = containerPanel;
            m_List.AutoSizeColumns = false;
            m_List.ShowGroupByBox  = true;
        }
        public NTreeListFormattingUC()
        {
            InitializeComponent();

            Dock = DockStyle.Fill;

            m_List                 = new NTreeList();
            m_List.Dock            = DockStyle.Fill;
            m_List.AutoSizeColumns = false;
            //m_List.EnableGroupBy = false;

            m_List.Parent = this;
        }
예제 #5
0
        public override void Initialize()
        {
            base.Initialize();

            Dock = DockStyle.Fill;

            m_List            = new NTreeList();
            m_List.Dock       = DockStyle.Fill;
            m_List.NotesStyle = TreeListNodeNotesStyle.Show;

            InitColumns();
            InitNodes();

            m_List.BestFitAllNodes();

            m_List.Parent = this;
        }
예제 #6
0
        internal static void InitDefaultNodes(NTreeList list, int nodeCount)
        {
            NTreeListNode node;

            long ticks = DateTime.Now.Ticks;

            for (int i = 1; i < nodeCount; i++)
            {
                node = new NTreeListNode();

                //text sub-item
                NTreeListNodeStringSubItem stringItem = new NTreeListNodeStringSubItem();
                stringItem.Text   = "String SubItem " + i;
                stringItem.Column = list.Columns[0];
                node.SubItems.Add(stringItem);

                //image sub-item
                NTreeListNodeImageSubItem imageItem = new NTreeListNodeImageSubItem();
                imageItem.Image  = NSystemImages.Information;
                imageItem.Column = list.Columns[1];
                node.SubItems.Add(imageItem);

                //numeric sub-item
                NTreeListNodeNumericSubItem numItem = new NTreeListNodeNumericSubItem();
                numItem.Value        = i * 10;
                numItem.FormatString = "$#,###0.00";
                numItem.Column       = list.Columns[2];
                node.SubItems.Add(numItem);

                //date sub-item
                NTreeListNodeDateTimeSubItem dateItem = new NTreeListNodeDateTimeSubItem();
                dateItem.Value        = new DateTime(ticks + i * 10000000);
                dateItem.FormatString = "F";
                dateItem.Column       = list.Columns[3];
                node.SubItems.Add(dateItem);

                //bool sub-item
                NTreeListNodeBooleanSubItem boolItem = new NTreeListNodeBooleanSubItem();
                boolItem.Value  = (i % 2) == 0;
                boolItem.Column = list.Columns[4];
                node.SubItems.Add(boolItem);

                list.Nodes.Add(node);
            }
        }
예제 #7
0
        internal void Populate(NTreeList list)
        {
            m_List = list;
            m_List.Suspend();

            InitData();

            m_List.GroupBy(m_List.Columns["Received"]);
            m_List.SortColumn(m_List.Columns["Received"], TreeListSortMode.Descending);
            m_List.SortColumn(m_List.Columns["From"], TreeListSortMode.Ascending);

            m_List.ExpandAll();
            m_List.BestFitAllColumns();
            m_List.BestFitAllNodes();


            m_List.Resume(true);
        }
예제 #8
0
        internal static void InitDefaultColumns(NTreeList list)
        {
            NTreeListColumn column;

            //text column
            column              = new NTreeListColumn();
            column.Name         = "StringColumn";
            column.Header.Text  = "String Column";
            column.ContentAlign = ContentAlignment.MiddleCenter;
            column.Width        = 150;
            list.Columns.Add(column);

            //image column
            column              = new NTreeListColumn();
            column.Name         = "ImageColumn";
            column.Header.Text  = "Image Column";
            column.ContentAlign = ContentAlignment.MiddleCenter;
            column.Width        = 100;
            list.Columns.Add(column);

            //numeric column
            column              = new NTreeListColumn();
            column.Name         = "NumColumn";
            column.Header.Text  = "Numeric Column";
            column.ContentAlign = ContentAlignment.MiddleCenter;
            column.Width        = 100;
            list.Columns.Add(column);

            //date-time column
            column              = new NTreeListColumn();
            column.Name         = "DateColumn";
            column.Header.Text  = "Date Column";
            column.ContentAlign = ContentAlignment.MiddleCenter;
            column.Width        = 200;
            list.Columns.Add(column);

            //boolean column
            column              = new NTreeListColumn();
            column.Name         = "BoolColumn";
            column.Header.Text  = "Boolean Column";
            column.ContentAlign = ContentAlignment.MiddleCenter;
            column.Width        = 100;
            list.Columns.Add(column);
        }
        public NTreeListCustomRenderingUC()
        {
            m_List = new NTreeList();
            InitializeComponent();

            Dock = DockStyle.Fill;

            m_List.Dock = DockStyle.Fill;
            //m_List.AutoSizeColumns = false;
            m_List.EnableGroupBy = false;

            m_HeaderRenderer  = new NTreeListCustomHeaderRenderer();
            m_SubItemRenderer = new NTreeListCustomSubItemRenderer();

            m_List.HeaderRenderer  = m_HeaderRenderer;
            m_List.SubItemRenderer = m_SubItemRenderer;

            m_List.Parent = containerPanel;
        }
예제 #10
0
 internal static void InitDefaultList(NTreeList list, int nodeCount)
 {
     InitDefaultColumns(list);
     InitDefaultNodes(list, nodeCount);
 }