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();
        }
示例#2
0
        public SmoothToggle()
        {
            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);

            Diameter = 7.0f;
            Radius   = 3.5f;

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

            ComputeGradients();

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

            pIcon = null;

            memGraphics = new DBGraphics();
            CreateDoubleBuffer();

            UpdateRegion();
        }
示例#3
0
        public SmoothToggleSwitch()
        {
            InitializeComponent();

            this.Resize      += new EventHandler(SmoothToggleSwitch_Resize);
            this.Paint       += new PaintEventHandler(SmoothToggleSwitch_Paint);
            Handle.MouseMove += new MouseEventHandler(Handle_MouseMove);
            Handle.MouseDown += new MouseEventHandler(Handle_MouseDown);
            Handle.MouseUp   += new MouseEventHandler(Handle_MouseUp);

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

            UpperGradientStart  = Color.FromArgb(111, 111, 111);
            UpperGradientFinish = Color.FromArgb(142, 142, 142);
            LowerGradientStart  = Color.FromArgb(142, 142, 142);
            LowerGradientFinish = Color.FromArgb(162, 162, 162);
            GradientPen         = new Pen(Color.Black);

            Diameter = 7.0f;
            Radius   = 3.5f;

            ComputeGradients();

            memGraphics = new DBGraphics();
            CreateDoubleBuffer();

            m_bIsOn = false;
        }
示例#4
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();
        }
示例#5
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;
        }
        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;
        }
        public SliderHandle()
        {
            InitializeComponent();
            this.Paint  += new PaintEventHandler(SliderHandle_Paint);
            this.Resize += new EventHandler(SliderHandle_Resize);

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

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

            GradientPen = new Pen(Color.Black);
            UpdateGradients();
            UpdateRegion();

            memGraphics = new DBGraphics();
            CreateDoubleBuffer();
        }
示例#8
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;
        }
示例#9
0
        public Corrida(String com, String rato_1, String rato_2)
        {
            InitializeComponent();
            serialPort.PortName = com;
            serialPort.BaudRate = 9600;
            serialPort.Open();

            memGraphics = new DBGraphics();

            arcoiris[0] = Properties.Resources.arcoiris_1;
            arcoiris[1] = Properties.Resources.arcoiris_2;

            this.nome_rato_1 = rato_1;
            this.nome_rato_2 = rato_2;

            lb_nome_rato_1_distancia.Text  = rato_1;
            lb_nome_rato_1_velocidade.Text = rato_1;
            lb_nome_rato_2_distancia.Text  = rato_2;
            lb_nome_rato_2_velocidade.Text = rato_2;

            iniciarContagem();
        }
        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();
        }
示例#11
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);
        }
        public VerticalScrollHandle()
        {
            InitializeComponent();

            GradientPen    = new Pen(Color.Black);
            GradientStart  = Color.FromArgb(220, 220, 220);
            GradientFinish = Color.FromArgb(180, 180, 180);

            BackgroundGradientStart  = Color.FromArgb(244, 244, 244);
            BackgroundGradientFinish = Color.FromArgb(225, 225, 225);
            UpdateGradients();

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

            memGraphics = new DBGraphics();
            CreateDoubleBuffer();

            this.Paint   += new PaintEventHandler(VerticalScrollHandle_Paint);
            this.Resize  += new EventHandler(VerticalScrollHandle_Resize);
            this.MouseUp += new MouseEventHandler(VerticalScrollHandle_MouseUp);

            UpdateBG();
        }
示例#13
0
        public Form1()
        {
            InitializeComponent();

            memGraphics = new DBGraphics();
        }
示例#14
0
        //private double y2MinScale = 0;

        // Constructors & Finalizers -------------------------------------------
        public ChartPanel()
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();
            memGraphics = new  DBGraphics();
        }