コード例 #1
0
 private void InitializeCustomComponent()
 {
     //throw new NotImplementedException();
     component = new CustomComponent();
     component.Input = logDataTransformer.GetDataCube();
     component.ColorMap = colorMap;
     this.component.SelectionChanged += new CustomComponent.SelectionUpdatedEventHandler(customComponent_SelectionUpdatedEvent);
     this.component.DataLabels = this.excelDataProvider.ColumnHeaders;
     this.component.SelectedIndexColor = Color.Yellow;
     List<int> selected = new List<int>();
     selected.Add(this.dataSelectedIndex);
     this.component.SetSelectedIndexes(selected);
     this.component.UserMenu = this.userMenu;
     this.component.DataLineThicknessScale = 4.0f;
 }
コード例 #2
0
        private void customComponent_SelectionUpdatedEvent(object sender, CustomComponent.SelectionUpdatedEventArgs e)
        {
            foreach (int i in e.SelectedItems)
            {
                int mappedIndex;
                stringIndexMapper.TryBackwardMapIndex(i, out mappedIndex);
                if (mappedIndex != -1)
                {
                    this.dataSelectedIndex = i;
                    this.mapSelectedIndex = mappedIndex;
                }
            }

            mapPolygonLayer.SelectedPolygonColor = Color.Yellow;
            List<int> selected = new List<int>() { this.mapSelectedIndex };
            mapPolygonLayer.SetSelectedIndexes(selected);

            //this.mapPolygonLayer.Invalidate();
            this.choroplethMap.Invalidate();
        }