Exemple #1
0
        void PrintProfileShort(Rectangle bounds, PrintPageEventArgs args)

        {
            this._printingProfile = false;
            var solidBrush = new SolidBrush(Color.Black);
            var format     = new StringFormat(StringFormatFlags.NoClip)
            {
                Alignment     = StringAlignment.Near,
                LineAlignment = StringAlignment.Near
            };
            int  vPos  = Print.PpInfo(bounds, args) + 6;
            Font font1 = new Font("Arial", 12f, FontStyle.Bold | FontStyle.Underline, GraphicsUnit.Pixel);

            args.Graphics.DrawString(MidsContext.Character.Alignment.ToString() + " Profile", font1, solidBrush, new RectangleF(bounds.Left + 15, vPos, bounds.Width, 15f), format);
            vPos += 15;
            Font font2 = new Font("Arial", 12f, FontStyle.Bold, GraphicsUnit.Pixel);

            Print.BuildPowerListShort(ref vPos, bounds, 12, true, false, false, args);
            string s2 = "------------";

            args.Graphics.DrawString(s2, font2, solidBrush, new RectangleF((bounds.Left + 15), vPos, bounds.Width, 15f), format);
            vPos += 15;
            Print.BuildPowerListShort(ref vPos, bounds, 12, false, true, false, args);
            if (!MidsContext.Character.Archetype.Epic)
            {
                return;
            }
            string s3 = "------------";

            args.Graphics.DrawString(s3, font2, solidBrush, new RectangleF((bounds.Left + 15), vPos, bounds.Width, 15f), format);
            vPos += 15;
            Print.BuildPowerListShort(ref vPos, bounds, 12, false, true, true, args);
        }
        void PrintProfileShort(Rectangle bounds, PrintPageEventArgs args)
        {
            this._printingProfile = false;
            SolidBrush   solidBrush = new SolidBrush(Color.Black);
            StringFormat format     = new StringFormat(StringFormatFlags.NoClip);

            format.Alignment     = StringAlignment.Near;
            format.LineAlignment = StringAlignment.Near;
            int vPos3 = Print.PpInfo(bounds, args);

            vPos3 += 6;
            string     s3 = MidsContext.Character.Alignment.ToString() + " Profile";
            RectangleF layoutRectangle = new RectangleF((float)(bounds.Left + 15), (float)vPos3, (float)bounds.Width, 15f);
            Font       font2           = new Font("Arial", 12f, FontStyle.Bold | FontStyle.Underline, GraphicsUnit.Pixel);

            args.Graphics.DrawString(s3, font2, solidBrush, layoutRectangle, format);
            vPos3 += 15;
            font2  = new Font("Arial", 12f, FontStyle.Bold, GraphicsUnit.Pixel);
            Print.BuildPowerListShort(ref vPos3, bounds, 12, true, false, false, args);
            s3 = "------------";
            layoutRectangle = new RectangleF((float)(bounds.Left + 15), (float)vPos3, (float)bounds.Width, 15f);
            args.Graphics.DrawString(s3, font2, solidBrush, layoutRectangle, format);
            vPos3 += 15;
            Print.BuildPowerListShort(ref vPos3, bounds, 12, false, true, false, args);
            if (MidsContext.Character.Archetype.Epic)
            {
                s3 = "------------";
                layoutRectangle = new RectangleF((float)(bounds.Left + 15), (float)vPos3, (float)bounds.Width, 15f);
                args.Graphics.DrawString(s3, font2, solidBrush, layoutRectangle, format);
                vPos3 += 15;
                Print.BuildPowerListShort(ref vPos3, bounds, 12, false, true, true, args);
            }
        }
Exemple #3
0
        void PrintProfileLong(Rectangle bounds, PrintPageEventArgs args)
        {
            SolidBrush   solidBrush = new SolidBrush(Color.Black);
            int          vPos       = bounds.Top;
            StringFormat format     = new StringFormat(StringFormatFlags.NoClip)
            {
                Alignment     = StringAlignment.Near,
                LineAlignment = StringAlignment.Near
            };

            if (this._pageNumber == 1)
            {
                int  num  = Print.PpInfo(bounds, args) + 6;
                Font font = new Font("Arial", 12f, FontStyle.Bold | FontStyle.Underline, GraphicsUnit.Pixel);
                args.Graphics.DrawString("Extended " + MidsContext.Character.Alignment.ToString() + " Profile", font, solidBrush, new RectangleF(bounds.Left + 15, num, bounds.Width, 15f), format);
                vPos = num + 15;
            }
            Font font1 = new Font("Arial", 12f, FontStyle.Bold, GraphicsUnit.Pixel);

            if (this._sectionCompleted == Print.PrintWhat.None)
            {
                this._endOfPage = false;
                // mutates vPos
                int num = this.BuildPowerListLong(ref vPos, bounds, 12, Print.PrintWhat.Powers, args);
                if (this._endOfPage)
                {
                    return;
                }
                string s = "------------";
                args.Graphics.DrawString(s, font1, solidBrush, new RectangleF(bounds.Left + 15, num, bounds.Width, 15f), format);
                vPos = num + 15;
                this._sectionCompleted = Print.PrintWhat.Powers;
            }
            if (this._sectionCompleted == Print.PrintWhat.Powers)
            {
                this._endOfPage = false;
                vPos            = this.BuildPowerListLong(ref vPos, bounds, 12, Print.PrintWhat.Inherent, args);
                if (this._endOfPage)
                {
                    return;
                }
                this._sectionCompleted = Print.PrintWhat.Inherent;
                if (MidsContext.Character.Archetype.Epic)
                {
                    string s = "------------";
                    args.Graphics.DrawString(s, font1, solidBrush, new RectangleF((bounds.Left + 15), vPos, bounds.Width, 15f), format);
                    vPos += 15;
                }
            }
            if (this._sectionCompleted == Print.PrintWhat.Inherent && MidsContext.Character.Archetype.Epic)
            {
                this._endOfPage = false;
                this.BuildPowerListLong(ref vPos, bounds, 12, Print.PrintWhat.EpicInherent, args);
                if (this._endOfPage)
                {
                    return;
                }
            }
            this._printingProfile = false;
        }