Beispiel #1
0
        private void ListViewConfig(ObjectListView olv)
        {
            olv.View               = View.Details;
            olv.FullRowSelect      = false;
            olv.GridLines          = false;
            olv.AllowColumnReorder = false;
            olv.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
            olv.HideSelection = false;
            //olv.UseFiltering = true;
            olv.HeaderStyle           = ColumnHeaderStyle.Nonclickable;
            olv.ShowItemToolTips      = true;
            olv.HeaderWordWrap        = true;
            olv.UseHotItem            = true;
            olv.UseTranslucentHotItem = true;
            olv.HeaderMaximumHeight   = 80;
            olv.HeaderMinimumHeight   = 0;
            HeaderFormatStyle HeaderStyle = new HeaderFormatStyle();

            HeaderStyle.SetFont(new Font(olv.Font.FontFamily, olv.Font.Size, FontStyle.Bold));
            olv.HeaderFormatStyle = HeaderStyle;
            //olv.AlwaysGroupByColumn = GetGroupColumn();
            olv.CellEditActivation       = ObjectListView.CellEditActivateMode.SingleClickAlways;
            olv.ShowGroups               = false;
            olv.CellEditUseWholeCell     = true;
            olv.CellEditEnterChangesRows = true;
        }
Beispiel #2
0
        private void InitializeModListView()
        {
            headerStyle.SetFont(fontBold);
            headerStyle.Hot.Font = fontUnderline;

            headerStyleEmoji.SetFont(fontEmoji);

            modListView.EmptyListMsg = "Nothing for now";

            // This is changed in form but I keep track of what has changed from default.
            modListView.GridLines     = true;
            modListView.ShowGroups    = false;
            modListView.FullRowSelect = true;
            modListView.UseHyperlinks = true;

            // No context menu filter on column right click.
            modListView.SelectColumnsOnRightClick          = false;
            modListView.SelectColumnsOnRightClickBehaviour = BrightIdeasSoftware.ObjectListView.ColumnSelectBehaviour.None;

            modListView.TintSortColumn = true;

            // Textbox search filter.
            modListView.UseFiltering = true;

            // Cell format events, so we can apply different colors and wonts
            modListView.UseCellFormatEvents = true;

            // Drag and drop support
            modListView.DragSource = dragSource;
            modListView.DropSink   = dropSink;

            // Apply header style to exch column
            foreach (OLVColumn item in modListView.Columns)
            {
                item.HeaderFormatStyle = headerStyle;

                if (item.AspectName.Equals("Enabled"))
                {
                    item.HeaderFormatStyle = headerStyleEmoji;
                }
            }

            // Set objects source.
            modListView.SetObjects(modList);

            // Load mods
            LoadMods();

            ApplyProfileData();

            // Build final listview.
            modListView.BuildList();

            // Check achievements and mod conflicts in background.
            BackgroundWorker.RunWorkerAsync();

            modLoadComplete = true;
        }
Beispiel #3
0
        public Form1()
        {
            InitializeComponent();
            HeaderFormatStyle hs = new HeaderFormatStyle();

            hs.SetBackColor(Color.FromArgb(241, 199, 22));
            hs.SetFont(new Font(FontFamily.GenericMonospace, 10, FontStyle.Bold));
            listView.HeaderFormatStyle = hs;
        }
Beispiel #4
0
        private void SetColumnHeaderStyles()
        {
            ObjectListGpus.HeaderUsesThemes = false;

            HeaderFormatStyle headerStyle = new HeaderFormatStyle();

            headerStyle.SetBackColor(ThemeColors.ListHeaderNormalBackground);
            headerStyle.SetForeColor(ThemeColors.ListHeaderNormalForeground);
            headerStyle.SetFont(this.Font);
            ObjectListGpus.HeaderWordWrap    = true;
            ObjectListGpus.HeaderFormatStyle = headerStyle;
        }
Beispiel #5
0
        private void InitializeListView()
        {
            headerStyle.SetFont(fontBold);
            headerStyle.Hot.Font = fontUnderline;

            headerStyleEmoji.SetFont(fontEmoji);
            olvLootList.EmptyListMsg = "Nothing for now";

            // This is changed in form but I keep track of what has changed from default.
            olvLootList.GridLines     = true;
            olvLootList.ShowGroups    = false;
            olvLootList.FullRowSelect = true;
            olvLootList.UseHyperlinks = false;

            // No context menu filter on column right click.
            olvLootList.SelectColumnsOnRightClick          = false;
            olvLootList.SelectColumnsOnRightClickBehaviour = BrightIdeasSoftware.ObjectListView.ColumnSelectBehaviour.None;

            olvLootList.TintSortColumn = false;

            // Textbox search filter.
            olvLootList.UseFiltering = true;

            // Cell format events, so we can apply different colors and wonts
            olvLootList.UseCellFormatEvents = true;

            olvLootList.ShowSortIndicators = true;

            olvLootList.MultiSelect = true;
            olvLootList.UseCustomSelectionColors = true;

            olvLootList.HasCollapsibleGroups = true;

            olvLootList.Font = new Font(FontFamily.GenericSansSerif, 8, FontStyle.Bold);

            // Declare what columns are searchable
            columnName.Searchable    = true;
            columnEnabled.Searchable = true;

            // Get Lootables list.
            olvLootList.SetObjects(LootListView.GetLootLists());

            // Use always on every change like drawing stuff etc.
            Olv_ParseEntries();
            olvLootList.Sort(olvLootList.GetColumn(0), SortOrder.Ascending);
        }
Beispiel #6
0
        public static OLVColumn CreateColumn(string name, string text, string aspect, int width)
        {
            HeaderFormatStyle style = new HeaderFormatStyle();

            //style.SetBackColor(Color.FromArgb(240, 240, 240));

            style.SetForeColor(Color.FromArgb(63, 130, 242));
            style.SetFont(new Font("Comic Sans MS", 10, FontStyle.Bold));

            OLVColumn column = new OLVColumn()
            {
                Name              = name,
                Text              = text,
                AspectName        = aspect,
                Width             = width,
                HeaderFormatStyle = style,
            };

            if (name.Equals("Detected"))
            {
                column.AspectGetter = delegate(object obj)
                {
                    if (obj is Detection detection)
                    {
                        if (detection.Detected)
                        {
                            return("Detected");
                        }
                        else
                        {
                            return("Undetected");
                        }
                    }
                    else
                    {
                        return(null);
                    }
                };
            }

            return(column);
        }
Beispiel #7
0
        private void ListViewConfig(TreeListView olv)
        {
            olv.View               = View.Details;
            olv.FullRowSelect      = true;
            olv.GridLines          = true;
            olv.AllowColumnReorder = false;
            olv.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
            olv.HideSelection         = false;
            olv.UseFiltering          = true;
            olv.HeaderStyle           = ColumnHeaderStyle.Clickable;
            olv.ShowItemToolTips      = true;
            olv.HeaderWordWrap        = true;
            olv.UseHotItem            = true;
            olv.UseTranslucentHotItem = true;
            olv.HeaderMaximumHeight   = 80;
            olv.HeaderMinimumHeight   = 50;
            HeaderFormatStyle HeaderStyle = new HeaderFormatStyle();

            HeaderStyle.SetFont(new Font(olv.Font.FontFamily, olv.Font.Size, FontStyle.Bold));
            olv.HeaderFormatStyle = HeaderStyle;
        }