Exemplo n.º 1
0
        public frmSelectColumns(ChipDefinitions chipDef, List <string> originalColumns)
        {
            if (_chipDef == null)
            {
                _chipDef = chipDef;
                HashSet <string> existingColumns = new HashSet <string>();
                _nodeNames = new List <SelectTreeNode>();

                ChipDefinitions chipDefinitions = new ChipDefinitions();

                foreach (KeyValuePair <string, int> kvp in chipDefinitions.NodeNumberByName)
                {
                    string nodename = kvp.Key;
                    _nodeNames.Add(new SelectTreeNode(nodename));
                    existingColumns.Add(nodename);
                    string withoutNumber = Regex.Replace(nodename, "[_0-9]+$", "");
                    if (withoutNumber != nodename && !existingColumns.Contains(withoutNumber))
                    {
                        _nodeNames.Add(new SelectTreeNode(withoutNumber));
                        existingColumns.Add(withoutNumber);
                    }
                }
                _nodeNames.Add(new SelectTreeNode("cycle"));
            }

            InitializeComponent();
            _selectedColumns = new HashSet <string>(originalColumns);
            RefreshList();
        }
Exemplo n.º 2
0
        public void SetChipDefinitions(ChipDefinitions chipDef)
        {
            bool designMode = (LicenseManager.UsageMode == LicenseUsageMode.Designtime);

            if (!designMode)
            {
                _chipDef = chipDef;
                RenderChip();
                tmrDrawChip.Enabled = true;
            }
        }