Inheritance: System.Windows.Forms.Button, IMetroControl
Example #1
0
        void LoadMessages()
        {
            for ( int i = 0; i <= 10; i++ )
            {
                Panel pn = new Panel();
                MetroLink mlk = new MetroLink();
                MetroLabel mlblDate = new MetroLabel();
                MetroLabel mlblDesc = new MetroLabel();
                //
                // panel Interno
                //
                pn.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
                pn.Controls.Add( mlblDesc );
                pn.Controls.Add( mlblDate );
                pn.Controls.Add( mlk );
                this.flpanel_Mensajes.SetFlowBreak( pn, true );
                pn.Location = new System.Drawing.Point( 3, 3 );
                pn.Name = "panel_" + ( ( i < 10 ) ? "0" : "" ) + i;
                pn.Size = new System.Drawing.Size( 223, 95 );
                pn.TabIndex = i + 1;
                //
                // Descripción
                //
                mlblDesc.FontSize = MetroFramework.MetroLabelSize.Small;
                mlblDesc.Location = new System.Drawing.Point( 3, 40 );
                mlblDesc.Name = "metroLabel_" + ( ( i < 10 ) ? "0" : "" ) + i;
                mlblDesc.Size = new System.Drawing.Size( 215, 45 );
                mlblDesc.TabIndex = 1;
                mlblDesc.Text = "Lorem Ipsum dolor sit amet siempre y cuando estemos todos unidos";
                mlblDesc.WrapToLine = true;
                //
                // Nombre de la Persona
                //
                mlk.Location = new System.Drawing.Point( 3, 6 );
                mlk.Name = "metroLink_" + ( ( i < 10 ) ? "0" : "" ) + i;
                mlk.Size = new System.Drawing.Size( 215, 14 );
                mlk.TabIndex = 0;
                mlk.Text = "José Alejandro Vilchez M._" + i;
                mlk.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
                mlk.UseSelectable = true;
                mlk.Click += LinkDinamic_Click;
                //
                // Fecha de enviado
                //
                mlblDate.FontSize = MetroFramework.MetroLabelSize.Small;
                mlblDate.FontWeight = MetroFramework.MetroLabelWeight.Regular;
                mlblDate.Location = new System.Drawing.Point( 3, 23 );
                mlblDate.Name = "metroLabel_" + ( ( i < 10 ) ? "0" : "" ) + i;
                mlblDate.Size = new System.Drawing.Size( 215, 15 );
                mlblDate.TabIndex = i;
                mlblDate.Text = DateTime.Now.ToString();

                this.flpanel_Mensajes.Controls.Add( pn );
            }
        }
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MetroTextBox));
     this.lnkClear     = new MetroFramework.Controls.MetroLink();
     this.lblSidelabel = new MetroFramework.Controls.MetroLabel();
     this.SuspendLayout();
     //
     // lnkClear
     //
     this.lnkClear.FontSize      = MetroFramework.MetroLinkSize.Medium;
     this.lnkClear.FontWeight    = MetroFramework.MetroLinkWeight.Regular;
     this.lnkClear.Image         = ((System.Drawing.Image)(resources.GetObject("lnkClear.Image")));
     this.lnkClear.ImageSize     = 10;
     this.lnkClear.Location      = new System.Drawing.Point(654, 96);
     this.lnkClear.Name          = "lnkClear";
     this.lnkClear.NoFocusImage  = ((System.Drawing.Image)(resources.GetObject("lnkClear.NoFocusImage")));
     this.lnkClear.Size          = new System.Drawing.Size(12, 12);
     this.lnkClear.TabIndex      = 2;
     this.lnkClear.UseSelectable = true;
     this.lnkClear.Click        += new System.EventHandler(this.lnkClear_Click);
     //
     // lblSidelabel
     //
     this.lblSidelabel.BackColor          = System.Drawing.Color.DarkSlateGray;
     this.lblSidelabel.FontSize           = MetroFramework.MetroLabelSize.Small;
     this.lblSidelabel.FontWeight         = MetroFramework.MetroLabelWeight.Bold;
     this.lblSidelabel.ForeColor          = System.Drawing.Color.White;
     this.lblSidelabel.Location           = new System.Drawing.Point(0, 0);
     this.lblSidelabel.Name               = "lblSidelabel";
     this.lblSidelabel.Size               = new System.Drawing.Size(35, 24);
     this.lblSidelabel.TabIndex           = 0;
     this.lblSidelabel.Text               = "USD";
     this.lblSidelabel.TextAlign          = System.Drawing.ContentAlignment.MiddleCenter;
     this.lblSidelabel.UseCustomBackColor = true;
     this.lblSidelabel.UseCustomForeColor = true;
     //
     // MetroTextBox
     //
     this.Controls.Add(this.lblSidelabel);
     this.Controls.Add(this.lnkClear);
     this.ResumeLayout(false);
 }
Example #3
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MetroTextBox));
     this.lnkClear = new MetroFramework.Controls.MetroLink();
     this.SuspendLayout();
     //
     // lnkClear
     //
     this.lnkClear.FontSize      = MetroFramework.MetroLinkSize.Medium;
     this.lnkClear.FontWeight    = MetroFramework.MetroLinkWeight.Regular;
     this.lnkClear.Image         = ((System.Drawing.Image)(resources.GetObject("lnkClear.Image")));
     this.lnkClear.ImageSize     = 10;
     this.lnkClear.Location      = new System.Drawing.Point(654, 96);
     this.lnkClear.Name          = "lnkClear";
     this.lnkClear.NoFocusImage  = ((System.Drawing.Image)(resources.GetObject("lnkClear.NoFocusImage")));
     this.lnkClear.Size          = new System.Drawing.Size(12, 12);
     this.lnkClear.TabIndex      = 2;
     this.lnkClear.UseSelectable = true;
     this.lnkClear.Click        += new EventHandler(lnkClear_Click);
     this.ResumeLayout(false);
     this.Controls.Add(lnkClear);
 }
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MetroTextBox));
     this.lnkClear = new MetroFramework.Controls.MetroLink();
     this.SuspendLayout();
     // 
     // lnkClear
     // 
     this.lnkClear.FontSize = MetroFramework.MetroLinkSize.Medium;
     this.lnkClear.FontWeight = MetroFramework.MetroLinkWeight.Regular;
     this.lnkClear.Image = ((System.Drawing.Image)(resources.GetObject("lnkClear.Image")));
     this.lnkClear.ImageSize = 10;
     this.lnkClear.Location = new System.Drawing.Point(654, 96);
     this.lnkClear.Name = "lnkClear";
     this.lnkClear.NoFocusImage = ((System.Drawing.Image)(resources.GetObject("lnkClear.NoFocusImage")));
     this.lnkClear.Size = new System.Drawing.Size(12, 12);
     this.lnkClear.TabIndex = 2;
     this.lnkClear.UseSelectable = true;
     this.lnkClear.Click += new EventHandler(lnkClear_Click);
     this.ResumeLayout(false);
     this.Controls.Add(lnkClear);
 }
 private MetroLink GetLink(string text)
 {
     MetroLink name_label = new MetroLink();
     name_label.Text = text;
     name_label.Width = 100;
     name_label.TextAlign = ContentAlignment.MiddleLeft;
     name_label.UseStyleColors = true;
     name_label.Click += Link_label_Click;
     return name_label;
 }
 private void Link_label_Click(object sender, EventArgs e)
 {
     MetroLink temp = (MetroLink)sender;
     NumberTextBox.Text = temp.Text;
     BlogTextBox.Text = blogs_dict[temp.Text];
     last_click = temp;
     //System.Diagnostics.Process.Start(blogs_dict[temp.Text]);
 }