Exemplo n.º 1
0
        public Message()
        {
            InitializeComponent();

            pFontSize = 10;
            pFont     = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, pFontSize);
            pBoldFont = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadProBold, pFontSize);

            this.Paint  += new PaintEventHandler(Message_Paint);
            this.Resize += new EventHandler(Message_Resize);

            Diameter = 20.0f;
            Radius   = Diameter / 2.0f;

            GradientPen    = new Pen(Color.Black);
            GradientStart  = Color.FromArgb(252, 252, 252);
            GradientFinish = Color.FromArgb(223, 223, 223);
            GradientColors = Gradient.ComputeGradient(GradientStart, GradientFinish, this.Height);
            UpdateGradients();

            BorderColor = Color.FromArgb(152, 152, 152);
            BorderPen   = new Pen(BorderColor);

            pTextColor = Color.Black;
            TextBrush  = new SolidBrush(pTextColor);

            pHeight = 150;
            pWidth  = 450;

            TextLines     = null;
            TextSplitters = new string[1] {
                " "
            };
        }
Exemplo n.º 2
0
        public AlphaListRow()
        {
            InitializeComponent();

            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.UpdateStyles();

            memGraphics = new DBGraphics();
            CreateDoubleBuffer();

            this.Paint  += new PaintEventHandler(AlphaListRow_Paint);
            this.Resize += new EventHandler(AlphaListRow_Resize);

            GradientPen = new Pen(Color.Black);
            BorderPen   = new Pen(Color.FromArgb(180, 180, 180));

            GradientStart  = Color.FromArgb(252, 252, 252);
            GradientFinish = Color.FromArgb(160, 160, 160);

            pFontSize = 10;
            pFont     = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, pFontSize);
            TextBrush = new SolidBrush(Color.Black);

            UpdateGradients();
        }
        public SmoothGroupBox()
        {
            InitializeComponent();

            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.UpdateStyles();

            this.Paint  += new PaintEventHandler(SmoothGroupBox_Paint);
            this.Resize += new EventHandler(SmoothGroupBox_Resize);

            pFontSize       = 10;
            pFont           = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, pFontSize);
            MeasureLbl.Font = pFont;

            BorderColor = Color.FromArgb(200, 200, 200);
            BorderPen   = new Pen(BorderColor);

            Diameter = 10.0f;
            Radius   = 5.0f;

            GradientStart  = Color.FromArgb(251, 251, 251);
            GradientFinish = Color.FromArgb(251, 251, 251);

            GradientPen = new Pen(Color.Black);

            UpdateGradients();

            MeasureLbl.Text = "Shakespeare";

            TextColor = Color.Black;
            TextBrush = new SolidBrush(TextColor);
        }
Exemplo n.º 4
0
        public RectButton()
        {
            InitializeComponent();

            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.UpdateStyles();

            this.Paint     += new PaintEventHandler(SmoothToggle_Paint);
            this.Resize    += new EventHandler(SmoothToggle_Resize);
            this.MouseDown += new MouseEventHandler(RectButton_MouseDown);
            this.MouseUp   += new MouseEventHandler(RectButton_MouseUp);

            Diameter = 7.0f;
            Radius   = 3.5f;

            GradientStart         = Color.FromArgb(249, 249, 249);
            GradientFinish        = Color.FromArgb(188, 188, 188);
            PressedGradientFinish = Color.FromArgb(188, 188, 188);
            PressedGradientStart  = Color.FromArgb(100, 100, 100);
            GradientPen           = new Pen(Color.Black);

            ComputeGradients();

            BorderColor = Color.FromArgb(81, 81, 81);
            BorderPen   = new Pen(BorderColor);

            pIcon          = null;
            m_fntTextFont  = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, 10);
            m_bshTextBrush = new SolidBrush(Color.Black);

            memGraphics = new DBGraphics();
            CreateDoubleBuffer();
        }
Exemplo n.º 5
0
        public TextBox()
        {
            InitializeComponent();

            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.UpdateStyles();

            this.Paint            += new PaintEventHandler(TextBox_Paint);
            this.Resize           += new EventHandler(TextBox_Resize);
            this.GotFocus         += new EventHandler(TextBox_GotFocus);
            this.LostFocus        += new EventHandler(TextBox_LostFocus);
            TextField.GotFocus    += new EventHandler(TextField_GotFocus);
            TextField.LostFocus   += new EventHandler(TextField_LostFocus);
            TextField.TextChanged += new EventHandler(TextField_TextChanged);
            TextField.KeyPress    += new KeyPressEventHandler(TextField_KeyPress);

            pFontSize      = 10;
            pFont          = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, pFontSize);
            TextField.Font = pFont;

            StartColor   = Color.FromArgb(200, 200, 200);
            FinishColor  = Color.FromArgb(170, 170, 170);
            BorderColors = Gradient.ComputeGradient(StartColor, FinishColor, GRADIENT_DISTANCE);

            BorderPen    = new Pen(Color.Black);
            ColorCounter = 0;

            this.BackColor = Color.White;
            bShowBorder    = true;
        }
Exemplo n.º 6
0
        public RoundButton()
        {
            InitializeComponent();

            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.UpdateStyles();

            BorderColor  = Color.FromArgb(152, 152, 152);
            BorderPen    = new Pen(BorderColor);
            HighlightPen = new Pen(Color.FromArgb(100, 255, 255, 255));

            NPGradientStart  = Color.FromArgb(252, 252, 252);
            NPGradientFinish = Color.FromArgb(223, 223, 223);
            PGradientStart   = Color.FromArgb(194, 194, 194);
            PGradientFinish  = Color.FromArgb(239, 239, 239);
            UpdateGradients();
            GradientColors = NotPressedColors;

            GradientPen = new Pen(Color.Black);
            m_fRadius   = 0;
            m_fDiameter = 0;

            pFontSize         = 10;
            pFont             = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, pFontSize);
            SizeLbl.Font      = pFont;
            SizeLbl.Text      = "Round Button";
            SizeLbl.TextAlign = ContentAlignment.MiddleCenter;
            SizeLbl.ForeColor = Color.Black;
            TextBrush         = new SolidBrush(SizeLbl.ForeColor);

            this.Paint  += new PaintEventHandler(RoundButton_Paint);
            this.Resize += new EventHandler(RoundButton_Resize);
            ((System.Windows.Forms.UserControl)(this)).MouseDown += new MouseEventHandler(RoundButton_MouseDown);
            ((System.Windows.Forms.UserControl)(this)).MouseUp   += new MouseEventHandler(RoundButton_MouseUp);
            ((System.Windows.Forms.UserControl)(this)).Click     += new EventHandler(RoundButton_Click);
            this.KeyUp     += new KeyEventHandler(RoundButton_KeyUp);
            this.KeyDown   += new KeyEventHandler(RoundButton_KeyDown);
            this.GotFocus  += new EventHandler(RoundButton_GotFocus);
            this.LostFocus += new EventHandler(RoundButton_LostFocus);

            pState  = ButtonState.NotPressed;
            pSticky = false;

            //define form's region
            UpdateRegion();

            memGraphics = new DBGraphics();
            CreateDoubleBuffer();

            FocusDashedLine             = new Pen(Color.FromArgb(120, 120, 120), 1);
            FocusDashedLine.DashPattern = new float[2] {
                2, 2
            };

            m_bmpIcon = null;
        }
Exemplo n.º 7
0
        public ComboBox()
        {
            InitializeComponent();

            m_cpiLastSelected = null;

            m_clListControls = new List <ComboPopoutItem>();

            m_Panel  = new Panel();
            m_tsHost = new ToolStripControlHost(m_Panel);

            m_tsDropDown          = new ToolStripDropDown();
            m_tsDropDown.AutoSize = false;
            m_tsDropDown.Items.Add(m_tsHost);

            m_scItems              = new StringCollectionWithEvents();
            m_scItems.ItemAdded   += new StringCollectionWithEvents.ItemAddedEventHandler(m_scItems_ItemAdded);
            m_scItems.ItemRemoved += new StringCollectionWithEvents.ItemRemovedEventHandler(m_scItems_ItemRemoved);
            m_iSelectedIndex       = -1;

            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.UpdateStyles();

            BorderColor = Color.FromArgb(152, 152, 152);
            BorderPen   = new Pen(BorderColor);

            this.Paint  += new PaintEventHandler(ComboBox_Paint);
            this.Resize += new EventHandler(ComboBox_Resize);

            Radius   = 5.0f;
            Diameter = 10.0f;

            GradientPen = new Pen(Color.Black);

            GradientStart  = Color.FromArgb(252, 252, 252);
            GradientFinish = Color.FromArgb(223, 223, 223);
            UpdateGradients();

            UpdateRegion();

            pFontSize       = 10;
            pFont           = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, pFontSize);
            MeasureLbl.Font = pFont;

            TextColor = Color.Black;
            TextBrush = new SolidBrush(TextColor);

            this.MouseUp += new MouseEventHandler(ComboBox_MouseUp);

            UpdateRegion();
        }
Exemplo n.º 8
0
        public BulletedLabel()
        {
            InitializeComponent();

            m_iBulletSize   = C_DEFAULT_BULLET_SIZE;
            m_iDividerWidth = C_DEFAULT_DIVIDER_WIDTH;
            m_iMargin       = C_DEFAULT_MARGIN;
            m_iFontSize     = C_DEFAULT_FONT_SIZE;

            this.Paint      += new PaintEventHandler(BulletedLabel_Paint);
            m_fntDrawFont    = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, m_iFontSize);
            m_bshBulletBrush = new SolidBrush(Color.Black);
            m_bshTextBrush   = new SolidBrush(Color.Black);

            m_lsItems = new List <string>();
        }
Exemplo n.º 9
0
        public RibbonButton()
        {
            InitializeComponent();

            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.UpdateStyles();

            this.Paint  += new PaintEventHandler(RibbonButton_Paint);
            this.Resize += new EventHandler(RibbonButton_Resize);

            Diameter = 6.0f;
            Radius   = 3.0f;

            this.ButtonType = RibbonButtonType.Large;

            BorderColor = Color.Gray;
            BorderPen   = new Pen(BorderColor);

            UpdateRegion();

            IsMouseOver            = false;
            IsMouseDown            = false;
            this.MouseMove        += new MouseEventHandler(RibbonButton_MouseMove);
            this.MouseLeave       += new EventHandler(RibbonButton_MouseLeave);
            this.MouseDown        += new MouseEventHandler(RibbonButton_MouseDown);
            this.MouseUp          += new MouseEventHandler(RibbonButton_MouseUp);
            this.Click            += new EventHandler(RibbonButton_Click);
            CaptionLbl.MouseEnter += new EventHandler(CaptionLbl_MouseEnter);
            CaptionLbl.MouseMove  += new MouseEventHandler(CaptionLbl_MouseMove);
            CaptionLbl.MouseLeave += new EventHandler(CaptionLbl_MouseLeave);
            CaptionLbl.Click      += new EventHandler(RibbonButton_Click);
            CaptionLbl.MouseDown  += new MouseEventHandler(RibbonButton_MouseDown);
            CaptionLbl.MouseUp    += new MouseEventHandler(RibbonButton_MouseUp);

            BackgroundColor = Color.FromArgb(220, 220, 220);
            BackgroundBrush = new SolidBrush(BackgroundColor);

            pImage   = null;
            bEnabled = false;

            pFontSize = 10;
            pFont     = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, pFontSize);

            m_bshTextBrush = new SolidBrush(Color.Black);
        }
Exemplo n.º 10
0
        public SegmentChooser()
        {
            InitializeComponent();

            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.UpdateStyles();

            this.Paint     += new PaintEventHandler(SegmentChooser_Paint);
            this.Resize    += new EventHandler(SegmentChooser_Resize);
            this.MouseUp   += new MouseEventHandler(SegmentChooser_MouseUp);
            this.MouseDown += new MouseEventHandler(SegmentChooser_MouseDown);

            Diameter = 12.0f;
            Radius   = 6.0f;

            BorderColor = Color.FromArgb(200, 200, 200);
            BorderPen   = new Pen(BorderColor);

            NPGradientStart    = Color.FromArgb(252, 252, 252);
            NPGradientFinish   = Color.FromArgb(223, 223, 223);
            PGradientFinish    = Color.FromArgb(194, 194, 194);
            PGradientStart     = Color.FromArgb(239, 239, 239);
            HoldGradientStart  = Color.FromArgb(219, 219, 219);
            HoldGradientFinish = Color.FromArgb(174, 174, 174);

            GradientPen = new Pen(Color.Gray);

            UpdateGradients();
            GradientColors = PGradientColors;

            pFontSize       = 10;
            pFont           = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, pFontSize);
            MeasureLbl.Font = pFont;

            pItems = new StringCollection();

            TextColor = Color.Black;
            TextBrush = new SolidBrush(TextColor);

            SeparatorColor = Color.FromArgb(170, 170, 170);
            SeparatorPen   = new Pen(SeparatorColor);

            pSelectedIndex = -1;
        }
Exemplo n.º 11
0
        public OptionButton()
        {
            InitializeComponent();

            pFontSize = 10;
            pFont     = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, pFontSize);

            this.Paint  += new PaintEventHandler(OptionButton_Paint);
            this.Resize += new EventHandler(OptionButton_Resize);

            Diameter = 6.0f;
            Radius   = 3.0f;

            GradientPen      = new Pen(Color.Black);
            NPGradientStart  = Color.FromArgb(252, 252, 252);
            NPGradientFinish = Color.FromArgb(223, 223, 223);
            PGradientStart   = Color.FromArgb(194, 194, 194);
            PGradientFinish  = Color.FromArgb(239, 239, 239);
            UpdateGradients();

            GradientColors = NPGradientColors;

            BorderColor = Color.FromArgb(152, 152, 152);
            BorderPen   = new Pen(BorderColor);

            pTextColor = Color.Black;
            TextBrush  = new SolidBrush(pTextColor);

            CheckColor     = Color.FromArgb(70, 70, 70);
            CheckPen       = new Pen(CheckColor);
            CheckPen.Width = 2f;

            this.MouseDown += new MouseEventHandler(OptionButton_MouseDown);
            this.MouseUp   += new MouseEventHandler(OptionButton_MouseUp);
            this.Click     += new EventHandler(OptionButton_Click);

            UpdateRegion();

            memGraphics = new DBGraphics();
            CreateDoubleBuffer();

            Diameter = CIRCLEDIM;
            Radius   = Diameter / 2.0f;

            OptionIndex = 0;
        }
Exemplo n.º 12
0
        public TabPanel()
        {
            InitializeComponent();

            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.UpdateStyles();

            this.Paint   += new PaintEventHandler(TabPanel_Paint);
            this.MouseUp += new MouseEventHandler(TabPanel_MouseUp);
            this.Resize  += new EventHandler(TabPanel_Resize);

            pTabHeight = 25;
            pTabs      = new StringCollection();

            TabBorderColor = Color.FromArgb(200, 200, 200);
            TabBorderPen   = new Pen(TabBorderColor);

            BorderColor = Color.FromArgb(200, 200, 200);
            BorderPen   = new Pen(BorderColor);

            GradientColor = Color.Black;
            GradientPen   = new Pen(GradientColor);

            TextColor = Color.Black;
            TextBrush = new SolidBrush(TextColor);

            TabDiameter = 10.0f;
            TabRadius   = 5.0f;

            pFontSize       = 10;
            pFont           = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, pFontSize);
            MeasureLbl.Font = pFont;

            BodyFillColor = Color.White;
            BodyFillBrush = new SolidBrush(BodyFillColor);

            GradientStart  = Color.FromArgb(240, 240, 240);
            GradientFinish = BodyFillColor;

            UpdateGradients();

            pSelectedTab = 1;
        }
Exemplo n.º 13
0
        public SmoothLabel()
        {
            InitializeComponent();

            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.UpdateStyles();

            this.Paint += new PaintEventHandler(SmoothLabel_Paint);

            pTextColor = Color.Black;
            TextBrush  = new SolidBrush(pTextColor);

            pFontSize = 10;
            pFont     = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, pFontSize);

            pTextAlign = ContentAlignment.TopLeft;
        }
Exemplo n.º 14
0
        public ListView()
        {
            InitializeComponent();

            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.UpdateStyles();

            pListItems = new ListViewItemCollection();
            pListItems.EntriesCleared += new EventHandler(ListItems_EntriesCleared);
            pListItems.EntryAdded     += new EventHandler(ListItems_EntryAdded);
            pListItems.EntryRemoved   += new EventHandler(ListItems_EntryRemoved);
            pListItems.EntryChanged   += new ListViewItemCollection.EntryChangedHandler(pListItems_EntryChanged);

            pListItems.SubEntryAdded   += new ListViewItemCollection.EntryChangedHandler(pListItems_SubEntryAdded);
            pListItems.SubEntryRemoved += new ListViewItemCollection.EntryChangedHandler(pListItems_SubEntryRemoved);
            pListItems.SubItemsCleared += new ListViewItemCollection.EntryChangedHandler(pListItems_SubItemsCleared);

            this.Paint  += new PaintEventHandler(List_Paint);
            this.Resize += new EventHandler(List_Resize);

            HeaderBar.Changed += new ListHeader.ChangeHandler(HeaderBar_Changed);

            BorderColor = Color.FromArgb(152, 152, 152);
            BorderPen   = new Pen(BorderColor);

            pSelectedIndex   = -1;
            RowSelectedColor = Color.FromArgb(213, 218, 244);

            RowColor1 = Color.FromArgb(255, 255, 255);
            RowColor2 = Color.FromArgb(245, 245, 245);

            pFontSize = 9;
            pFont     = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, pFontSize);
            TextBrush = new SolidBrush(Color.Black);

            UpdateLayout();
            base.List_Resize(this, EventArgs.Empty);

            this.BackColor = Color.White;
        }
Exemplo n.º 15
0
        private void RedoFont()
        {
            FontStyle FinalStyle;

            if (bFontItalic && bFontBold)
            {
                FinalStyle = FontStyle.Bold & FontStyle.Italic;
            }
            else if (bFontItalic)
            {
                FinalStyle = FontStyle.Italic;
            }
            else
            {
                FinalStyle = FontStyle.Bold;
            }

            pFont = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, pFontSize);
            pFont = new Font(pFont.FontFamily, pFontSize, FinalStyle);
        }
Exemplo n.º 16
0
        public ListBox()
        {
            InitializeComponent();

            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.UpdateStyles();

            this.Paint          += new PaintEventHandler(List_Paint);
            this.Resize         += new EventHandler(List_Resize);
            ListScroller.Scroll += new ScrollEventHandler(ListScroller_Scroll);

            BorderColor = Color.FromArgb(152, 152, 152);
            BorderPen   = new Pen(BorderColor);

            pSelectedIndex   = -1;
            RowSelectedColor = Color.FromArgb(213, 218, 244);

            RowColor2 = Color.FromArgb(255, 255, 255);
            RowColor1 = Color.FromArgb(245, 245, 245);

            pFontSize = 9;
            pFont     = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, pFontSize);
            TextBrush = new SolidBrush(Color.Black);

            pListItems = new ListViewItemCollection();
            ListRows   = new DoubleQueue <ListRow>();

            pListItems.EntriesCleared += new EventHandler(ListItems_EntriesCleared);
            pListItems.EntryAdded     += new EventHandler(ListItems_EntryAdded);
            pListItems.EntryChanged   += new ListViewItemCollection.EntryChangedHandler(ListItems_EntryChanged);
            pListItems.EntryRemoved   += new EventHandler(ListItems_EntryRemoved);

            ListScroller.Visible = false;
            bLayoutUpdating      = false;

            this.BackColor = Color.White;

            UpdateLayout();
        }
Exemplo n.º 17
0
        public void Init()
        {
            InitializeComponent();

            pIcon = null;

            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.UpdateStyles();

            this.Resize += new EventHandler(IconListRow_Resize);
            this.Paint  += new PaintEventHandler(IconListRow_Paint);

            //figure out gradient stuff
            m_cBorderColor    = Color.Silver;
            m_cGradientStart  = Color.FromArgb(215, 215, 215);
            m_cGradientFinish = Color.FromArgb(183, 183, 183);
            m_pGradientPen    = new Pen(Color.Black); //black as placeholder
            UpdateGradients();

            //figure out font stuff
            pFontSize         = 10;
            pFont             = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, pFontSize);
            SizeLbl.Font      = pFont;
            SizeLbl.Text      = "FatListViewRow";
            SizeLbl.TextAlign = ContentAlignment.MiddleCenter;
            SizeLbl.ForeColor = Color.Black;
            m_sbTextBrush     = new SolidBrush(SizeLbl.ForeColor);

            m_dbgMemGraphics = new DBGraphics();
            CreateDoubleBuffer();

            BackBrush              = new SolidBrush(this.BackColor);
            this.BackColorChanged += new EventHandler(IconListRow_BackColorChanged);

            m_clrSeparatorColor = Color.FromArgb(220, 220, 220);
            m_pnSeparatorPen    = new Pen(m_clrSeparatorColor);

            m_iTextLeft = C_DEFAULT_TEXT_LEFT;
        }
        public CodeViewSwitcher()
        {
            InitializeComponent();

            m_cSelectedColor   = Color.FromArgb(85, 85, 85);
            m_cDeselectedColor = Color.FromArgb(163, 163, 163);
            m_bshFillBrush     = new SolidBrush(m_cSelectedColor);

            m_bshTextBrush = new SolidBrush(Color.White);

            m_svCurView    = SelectedView.Microcode;
            m_iRadius      = 11;
            m_iButtonWidth = 110;

            m_iFontSize = 11;
            m_fntFont   = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, m_iFontSize);

            this.Paint  += new PaintEventHandler(CodeViewSwitcher_Paint);
            this.Resize += new EventHandler(CodeViewSwitcher_Resize);
            this.Click  += new EventHandler(CodeViewSwitcher_Click);
        }
Exemplo n.º 19
0
        public MedusaViewSwitcher()
        {
            InitializeComponent();

            m_cOnStart   = Color.FromArgb(183, 183, 183);
            m_cOnFinish  = Color.FromArgb(137, 137, 137);
            m_cOffStart  = Color.FromArgb(221, 221, 221);
            m_cOffFinish = Color.FromArgb(187, 187, 187);

            CalculateGradients();

            m_iFontSize    = 10;
            m_fntFont      = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, m_iFontSize);
            m_bshTextBrush = new SolidBrush(Color.Black);
            m_lsButtons    = new List <string>();
            m_pDividerPen  = new Pen(Color.FromArgb(128, 128, 128));

            this.Paint  += new PaintEventHandler(MedusaViewSwitcher_Paint);
            this.Resize += new EventHandler(MedusaViewSwitcher_Resize);
            this.Click  += new EventHandler(MedusaViewSwitcher_Click);
        }
Exemplo n.º 20
0
        public SimpleListRow()
        {
            InitializeComponent();

            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.UpdateStyles();

            this.Resize += new EventHandler(SimpleListRow_Resize);
            this.Paint  += new PaintEventHandler(SimpleListRow_Paint);

            pFontSize         = 10;
            pFont             = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, pFontSize);
            SizeLbl.Font      = pFont;
            SizeLbl.Text      = "Round Button";
            SizeLbl.TextAlign = ContentAlignment.MiddleCenter;
            SizeLbl.ForeColor = Color.Black;
            TextBrush         = new SolidBrush(SizeLbl.ForeColor);

            memGraphics = new DBGraphics();
            CreateDoubleBuffer();
        }
Exemplo n.º 21
0
        public SmoothTable()
        {
            InitializeComponent();

            m_dRows          = new Dictionary <int, Dictionary <int, string> >();
            m_lsRowLabels    = new List <TableRowLabel>();
            m_lsColumnLabels = new List <TableColumnLabel>();

            m_pGridPen          = new Pen(Color.FromArgb(180, 180, 180));
            m_pLabelPen         = new Pen(Color.Black);
            m_bshLabelTextBrush = new SolidBrush(Color.Black);
            m_bshValueTextBrush = new SolidBrush(Color.Black);
            m_fntLabelFont      = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, C_DEFAULT_FONT_SIZE);
            m_fntValueFont      = FontVault.GetFontVault().GetFont(FontVault.AvailableFonts.MyriadPro, C_DEFAULT_FONT_SIZE);

            m_cGradientStart  = Color.FromArgb(230, 230, 230);
            m_cGradientFinish = Color.FromArgb(180, 180, 180);

            m_dbgGraphics = new DBGraphics();

            this.Paint  += new PaintEventHandler(SmoothTable_Paint);
            this.Resize += new EventHandler(SmoothTable_Resize);
        }