コード例 #1
0
ファイル: StatusPanel.cs プロジェクト: carlhuth/GenXSource
        protected override void OnPaint(PaintEventArgs pe)
        {
            //          base.OnPaint(pe);
            Graphics g = pe.Graphics;

            g.DrawString(ResourceService.GetString("SharpDevelop.Gui.Dialogs.WizardDialog.StepsLabel"),
                         smallFont,
                         SystemBrushes.WindowText,
                         10,
                         24 - smallFont.Height);

            g.DrawLine(SystemPens.WindowText, 10, 24, Width - 10, 24);

            int curNumber = 0;

            for (int i = 0; i < wizard.WizardPanels.Count; i = wizard.GetSuccessorNumber(i))
            {
                Font curFont = wizard.ActivePanelNumber == i ? boldFont : normalFont;
                IDialogPanelDescriptor descriptor = ((IDialogPanelDescriptor)wizard.WizardPanels[i]);
                g.DrawString((1 + curNumber) + ". " + descriptor.Label, curFont, SystemBrushes.WindowText, 10, 40 + curNumber * curFont.Height);
                ++curNumber;
            }
        }