Exemple #1
0
        private void BuildTagTree()
        {
            var uniqueTags = (from one in dataSet select one.Tag).Distinct(); //.OrderBy(name => name);
            var roots      = (from hier in displayHier where hier.Tag == null select hier);
            var ents       = (from hier in displayHier where uniqueTags.Contains(hier.Tag) select hier).ToArray();

            List <TreeNode> nodes = new List <TreeNode>();

            foreach (var treeHier in roots)
            {
                treeHier hier1 = treeHier;
                TreeNode node  = new TreeNode(hier1.Label)
                {
                    Tag = hier1, Checked = true
                };
                var childs = (from hier in ents where hier.Tag != null && hier.Group == hier1.Group select hier);
                foreach (var child in childs)
                {
                    TreeNode cNode = new TreeNode(child.Label == "" ? child.Tag : child.Label)
                    {
                        Tag = child, Checked = true
                    };
                    node.Nodes.Add(cNode);
                }
                nodes.Add(node);
            }

            EventsPick.SuspendLayout();
            EventsPick.Nodes.Clear();
            EventsPick.Nodes.AddRange(nodes.ToArray());
            EventsPick.ResumeLayout();
        }
 public DataInterEvent(EventsPick.EventDateSpan span_, bool dateOnly_, object instrument_, DatedDataCollectionGen<double> data_, DataInterEventArgs args_)
 {
   EventSpan = span_;
   Instrument = instrument_;
   RawData = data_;
   Args = args_;
   DateOnly = dateOnly_;
   m_processedData = processToAroundAnchor(RawData);
 }