コード例 #1
0
        private void PlaceControl(Rectangle bounds, CurrencyManager source, int rowNum)
        {
            if (DataGridTableStyle.DataGrid.IsSelected(rowNum))
            {
                ctrl.BackColor = this.DataGridTableStyle.SelectionBackColor;
                ctrl.LinkColor = Color.White;
            }
            else
            {
                ctrl.BackColor = ((rowNum & 1) == 1) ? this.DataGridTableStyle.BackColor : this.DataGridTableStyle.AlternatingBackColor;
                ctrl.LinkColor = Color.Blue;
            }
            ctrl.Text = GetCellText(rowNum, source);

            System.Windows.Forms.LinkLabel.Link lnk = ctrl.Links[0];
            lnk.LinkData = source.List[rowNum];
            lnk.Length   = ctrl.Text.Length;

            ctrl.Bounds  = bounds;
            ctrl.Visible = true;
        }
コード例 #2
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.panel1 = new System.Windows.Forms.Panel();
            this.label2 = new System.Windows.Forms.Label();
            this.label1 = new System.Windows.Forms.Label();
            this.link = new System.Windows.Forms.LinkLabel();
            this.panel1.SuspendLayout();
            this.SuspendLayout();
            // 
            // panel1
            // 
            this.panel1.Controls.Add(this.link);
            this.panel1.Controls.Add(this.label2);
            this.panel1.Controls.Add(this.label1);
            this.panel1.Location = new System.Drawing.Point(12, 12);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(175, 74);
            this.panel1.TabIndex = 3;
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(47, 27);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(66, 13);
            this.label2.TabIndex = 2;
            this.label2.Text = "Version 1.5"; 
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(3, 0);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(160, 13);
            this.label1.TabIndex = 1;
            this.label1.Text = "Perfect-Privacy TunnelManager ";
            // 
            // link
            // 
            this.link.AutoSize = true;
            this.link.Location = new System.Drawing.Point(3, 56);
            this.link.Name = "test";
            this.link.Size = new System.Drawing.Size(163, 13);
            this.link.TabIndex = 0;
            this.link.TabStop = true;
            this.link.Text = "https://www.perfect-privacy.com";
            this.link.TextAlign = System.Drawing.ContentAlignment.TopCenter;
            this.link.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.test_LinkClicked);

            System.Windows.Forms.LinkLabel.Link link = new System.Windows.Forms.LinkLabel.Link();
            link.LinkData = "https://www.perfect-privacy.com";
            this.link.Links.Add(link);

            // 
            // AboutForm
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(199, 98);
            this.Controls.Add(this.panel1);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.Name = "AboutForm";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "About";
            this.panel1.ResumeLayout(false);
            this.panel1.PerformLayout();
            this.ResumeLayout(false);

        }
コード例 #3
0
 public LinkLabelLinkClickedEventArgs(System.Windows.Forms.LinkLabel.Link link, MouseButtons button) : this(link)
 {
     this.button = button;
 }
コード例 #4
0
 public LinkLabelLinkClickedEventArgs(System.Windows.Forms.LinkLabel.Link link)
 {
     this.link   = link;
     this.button = MouseButtons.Left;
 }