Пример #1
0
        /// <summary>
        /// Generate a LinkLabel to the right of a control which will open the corresponding Wiki help page for that control.
        /// </summary>
        public static void createHelpLinkLabel(Control control, string helpKey)
        {
            try
            { 
                LinkLabel lnk = new LinkLabel();
                lnk.Text = "?";
                lnk.Location = new System.Drawing.Point(control.Left + control.Width + 1, control.Top);
                lnk.Tag = helpKey;
                lnk.Width = 16;
                lnk.Height = 16;
                lnk.Font = new System.Drawing.Font("Courier New", 10);
                control.Parent.Controls.Add(lnk);
                lnk.BringToFront();

                lnk.LinkClicked += new LinkLabelLinkClickedEventHandler(lnk_LinkClicked);  
            }
            catch (Exception ex)
            {
                Eh.GlobalErrorHandler(ex);
            }
        }
Пример #2
0
        private void streamingToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frec.pictureBoxFrameGrabber = this.picBox_Original;
            frec.StartStreaming();
            this.panel_mainPanel.Enabled = false;
            LinkLabel llablStopStreaming = new LinkLabel();
            llablStopStreaming.Text = "Stop Streaming";
            llablStopStreaming.Location = new Point(137, 480);
            this.Controls.Add(llablStopStreaming);
            llablStopStreaming.BringToFront();
            llablStopStreaming.BackColor = Color.Black;
            llablStopStreaming.Font = linkLabel1.Font;
            llablStopStreaming.Click += new EventHandler(llablStopStreaming_Click);
            llablStopStreaming.AutoSize = true;

        }
Пример #3
0
        private void InitBookmarks(DataTable dt)
        {
            var letters = dt.AsEnumerable()
                .Select(c => c["FullName"].ToString().Substring(0, 1))
                .GroupBy(r => r)
                .Select(x => x.Key).ToList();
            Point prevlocation = new Point(12, 27);

            foreach (var letter in letters)
            {
                LinkLabel newLink = new LinkLabel();
                newLink.Location = new Point(
                    prevlocation.X, prevlocation.Y + 15);
                prevlocation = newLink.Location;
                newLink.Text = letter;
                newLink.Width = 15;
                newLink.Height = 13;
                this.Controls.Add(newLink);
                newLink.BringToFront();
                newLink.Click += new System.EventHandler(this.filterDGView);
            }
            this.ResumeLayout(false);
            this.PerformLayout();
        }