private void SetupTreeGrid()
        {
            var blank = new IndicatorDescription(string.Empty, string.Empty, false);

            gridView.Columns.Add(new FastColumn(blank.Property(p => p.IsFavorite), "*")
            {
                ColumnWidth            = 25,
                ImageList              = imageListGrid,
                SortOrder              = FastColumnSort.Descending,
                IsHyperlinkStyleColumn = true,
                HyperlinkActiveCursor  = Cursors.Hand
            });
            gridView.Columns.Add(new FastColumn(blank.Property(p => p.Name), Localizer.GetString("TitleName"))
            {
                SortOrder      = FastColumnSort.Ascending,
                ColumnMinWidth = 120
            });
            gridView.Columns.Add(new FastColumn(blank.Property(p => p.Category), Localizer.GetString("TitleCategory"))
            {
                ColumnMinWidth = 100
            });

            gridView.CalcSetTableMinWidth();
            gridView.UserHitCell += GridViewOnUserHitCell;
        }
Example #2
0
        public IndicatorsGridForm()
        {
            InitializeComponent();

            Localizer.LocalizeControl(this);
            dependencyError = Localizer.GetString("TitleError") + ": ";
            var blank = new IndicatorDescription(string.Empty, string.Empty, false);

            fastGrid.Columns.Add(new FastColumn(blank.Property(p => p.Number), "#")
            {
                SortOrder      = FastColumnSort.Ascending,
                ColumnMinWidth = 50,
                ColumnWidth    = 50
            });
            fastGrid.Columns.Add(new FastColumn(blank.Property(p => p.IsFavorite), "*")
            {
                IsHyperlinkStyleColumn = true,
                HyperlinkActiveCursor  = Cursors.Hand,
                ImageList      = imageList,
                ColumnMinWidth = 25,
                ColumnWidth    = 25
            });
            fastGrid.Columns.Add(new FastColumn(blank.Property(p => p.Name), Localizer.GetString("TitleName"))
            {
                ColumnMinWidth = 50
            });
            fastGrid.Columns.Add(new FastColumn(blank.Property(p => p.DisplayTypeName), Localizer.GetString("TitleType"))
            {
                ColumnMinWidth = 50
            });
            fastGrid.Columns.Add(new FastColumn(blank.Property(p => p.Depends), Localizer.GetString("TitleReferences"))
            {
                colorColumnFormatter = delegate(object depends, out Color? bc, out Color? fc)
                {
                    bc = null;
                    fc = ((string)depends).StartsWith(dependencyError) ? Color.Red : (Color?)null;
                },
                ColumnMinWidth = 50
            });
            fastGrid.Columns.Add(new FastColumn(blank.Property(p => p.Close), "-")
            {
                IsHyperlinkStyleColumn = true,
                HyperlinkActiveCursor  = Cursors.Hand,
                ImageList      = imageList,
                ColumnMinWidth = 25,
                ColumnWidth    = 25
            });
        }
        private void SetupTreeGrid()
        {
            var blank = new IndicatorDescription(string.Empty, string.Empty, false);
            gridView.Columns.Add(new FastColumn(blank.Property(p => p.IsFavorite), "*")
                {
                    ColumnWidth = 25,
                    ImageList = imageListGrid,
                    SortOrder = FastColumnSort.Descending,
                    IsHyperlinkStyleColumn = true,
                    HyperlinkActiveCursor = Cursors.Hand
                });
            gridView.Columns.Add(new FastColumn(blank.Property(p => p.Name), Localizer.GetString("TitleName"))
                {
                    SortOrder = FastColumnSort.Ascending,
                    ColumnMinWidth = 120
                });
            gridView.Columns.Add(new FastColumn(blank.Property(p => p.Category), Localizer.GetString("TitleCategory"))
                {
                    ColumnMinWidth = 100
                });

            gridView.CalcSetTableMinWidth();
            gridView.UserHitCell += GridViewOnUserHitCell;
        }
        public IndicatorsGridForm()
        {
            InitializeComponent();

            Localizer.LocalizeControl(this);
            dependencyError = Localizer.GetString("TitleError") + ": ";
            var blank = new IndicatorDescription(string.Empty, string.Empty, false);
            fastGrid.Columns.Add(new FastColumn(blank.Property(p => p.Number), "#")
                {
                    SortOrder = FastColumnSort.Ascending,
                    ColumnMinWidth = 50,
                    ColumnWidth = 50
                });
            fastGrid.Columns.Add(new FastColumn(blank.Property(p => p.IsFavorite), "*")
                {
                    IsHyperlinkStyleColumn = true,
                    HyperlinkActiveCursor = Cursors.Hand,
                    ImageList = imageList,
                    ColumnMinWidth = 25,
                    ColumnWidth = 25
                });
            fastGrid.Columns.Add(new FastColumn(blank.Property(p => p.Name), Localizer.GetString("TitleName"))
                {
                    ColumnMinWidth = 50
                });
            fastGrid.Columns.Add(new FastColumn(blank.Property(p => p.DisplayTypeName), Localizer.GetString("TitleType"))
                {
                    ColumnMinWidth = 50
                });
            fastGrid.Columns.Add(new FastColumn(blank.Property(p => p.Depends), Localizer.GetString("TitleReferences"))
                {
                    colorColumnFormatter = delegate(object depends, out Color? bc, out Color? fc)
                        {
                            bc = null;
                            fc = ((string) depends).StartsWith(dependencyError) ? Color.Red : (Color?) null;
                        },
                    ColumnMinWidth = 50
                });
            fastGrid.Columns.Add(new FastColumn(blank.Property(p => p.Close), "-")
                {
                    IsHyperlinkStyleColumn = true,
                    HyperlinkActiveCursor = Cursors.Hand,
                    ImageList = imageList,
                    ColumnMinWidth = 25,
                    ColumnWidth = 25
                });
        }