Ejemplo n.º 1
0
 private void WantPane()
 {
     if (m_actpane == null)
     {
         m_actpane = new OutlinePane(m_options);
         Result.Add(m_actpane);
     }
 }
Ejemplo n.º 2
0
        public void Run()
        {
            int actcol = 0;
            float acty = 0;
            foreach (SongData song in m_songs)
            {
                float hi = MeasureWrappedTextHeight(m_options.InfoContext, song.Title, m_options.ColumnWidthForText, m_options.TitleFont);
                if (acty + hi > m_options.PageHeight)
                {
                    actcol++;
                    acty = 0;
                    if (actcol >= m_options.Columns)
                    {
                        actcol = 0;
                        m_actpane = null;
                    }
                }
                WantPane();

                float x0 = actcol * m_options.ColumnWidth;
                WrapText(
                    m_options.InfoContext,
                    delegate(string txt, PointF pt) { m_actpane.DrawText(txt, new PointF(pt.X + x0, pt.Y + acty)); },
                    song.Title,
                    m_options.ColumnWidthForText,
                    m_options.TitleFont);
                m_actpane.DrawNumber(song.LocalID, new PointF(m_options.NumberLeft + x0, acty + hi - m_options.NumberHeight));
                acty += hi;
            }
        }