Пример #1
0
        private FrmPopoutClusterSheet(Size size, List <Visualisable> items, IPreviewProvider previewProvider)
            : this()
        {
            this._imageSize       = size;
            this._items           = items;
            this._previewProvider = previewProvider;

            this.imageList1.ImageSize      = this._imageSize;
            this.listView1.TileSize        = this._imageSize;
            this.listView1.VirtualListSize = items.Count;

            this.imageList1.Images.Add(ChartHelperForClusters.CreatePlaceholderBitmap(null, this._imageSize));
        }
Пример #2
0
        private Image GeneratePreviewImage(object item)
        {
            if (!this.EnablePreviews)
            {
                return(UiControls.GetImage(item));
            }

            Image img = this._previewProvider.ProvidePreview(this._imageList.ImageList.ImageSize, item);

            if (img == null)
            {
                return(ChartHelperForClusters.CreatePlaceholderBitmap(item, this._imageList.ImageList.ImageSize));
            }

            return(img);
        }
Пример #3
0
        internal FrmActEvaluate(Core core, ArgsClusterer config)
            : this()
        {
            this._core           = core;
            this._templateConfig = config;

            this._lvhClusters           = new CtlAutoList(this._lstClusters, core, null);
            this._lvhConfigs            = new CtlAutoList(this._lstParams, core, null);
            this._lvhStatistics         = new CtlAutoList(this._lstStatistics, core, null);
            this._lvhStatistics.Visible = false;
            this._chcClusters           = new ChartHelperForClusters(null, core, this.panel6);

            this._lvhConfigs.Activate    += this._lstParams_SelectedIndexChanged;
            this._lvhClusters.Activate   += this._lstClusters_SelectedIndexChanged;
            this._lvhStatistics.Activate += this._lstStats_SelectedIndexChanged;

            // UiControls.CompensateForVisualStyles(this);
        }
Пример #4
0
        private int GeneratePreviewImage(Visualisable item)
        {
            int index;

            if (item.Hidden)
            {
                return(0);
            }

            if (!this._imgListPreviewIndexes.TryGetValue(item, out index))
            {
                Image img = this._previewProvider.ProvidePreview(this._imageSize, item) ??
                            ChartHelperForClusters.CreatePlaceholderBitmap(item, this._imageSize);

                index = this.imageList1.Images.Count;

                this.imageList1.Images.Add(item.DisplayName, img);
                this._imgListPreviewIndexes.Add(item, index);
            }

            return(index);
        }