Exemple #1
0
    public void Finished(int rowindex, int rollupolder, ExtendedControls.ExtPanelDataGridViewScrollOutlining panel)
    {
        if (rowindex >= maingroup)
        {
            if (maingroupcount > 0)
            {
                bool maingroupvisible = rollupolder == 0 || maingroupcount < rollupolder;
                outlines.Add(new ExtendedControls.ExtPanelDataGridViewScrollOutlining.Outline() { start = maingroup, end = rowindex, expanded = maingroupvisible });
            }
        }

        panel.Add(outlines);

    }
    public bool Process(HistoryEntry he, int rowindex, bool scanrollup, int rollupolder)
    {
        bool fsstype = he.EntryType == JournalTypeEnum.CodexEntry || he.EntryType == JournalTypeEnum.Scan || he.EntryType == JournalTypeEnum.FSSDiscoveryScan ||
                       he.EntryType == JournalTypeEnum.FSSAllBodiesFound || he.EntryType == JournalTypeEnum.FSSSignalDiscovered ||
                       he.EntryType == JournalTypeEnum.SAAScanComplete || he.EntryType == JournalTypeEnum.FuelScoop;

        bool maingroupvisible = rollupolder == 0 || maingroupcount < rollupolder; // first calc if main group is rolled up

        bool linevisible = maingroupvisible && scanstartline == -1;               // visible if not rolled up and not in a scan

        if (he.EntryType == JournalTypeEnum.Fileheader)                           // main group boundary
        {
            panel.Add(maingroup, rowindex, maingroupvisible, true);               // add it in, no update
            //System.Diagnostics.Debug.WriteLine("Fileheader Roll up" + maingroup + "-" + rowindex + " rolled " + maingroupvisible);
            maingroup = rowindex + 1;
            maingroupcount++;
            maingroupvisible = linevisible = true; // override to show this line - maingroup as well in case co-indident with scan end
        }
        else if (fsstype)
        {
            if (scanstartline == -1 && scanrollup)
            {
                scanstartline = rowindex;
                linevisible   = false;      // first entry of scan is not visible
            }
        }

        if (scanrollup && scanstartline != -1 && !fsstype)        // scan roll up in operation but not scan
        {
            panel.Add(scanstartline, rowindex, false, true);      // scans are rolled up
            linevisible   = maingroupvisible;                     // visible if main group was visible
            scanstartline = -1;
        }

        return(linevisible);
    }