Ejemplo n.º 1
0
 public TooltipUserControl(RichTextBoxCustom rtb)
 {
     InitializeComponent();
     _rtb                      = rtb;
     _rtb.MouseMove           += RichTextBox_MouseMove;
     _rtb.MouseLeave          += RichTextBox_MouseLeave;
     timerShowToolTip.Interval = 300;
     timerShowToolTip.Tick    += timer_tick;
     this.Parent               = _rtb;
     this.BringToFront();
 }
Ejemplo n.º 2
0
        public IntellisenseUserControl(RichTextBoxCustom rtb)
        {
            InitializeComponent();

            _richTextBoxCustom = rtb;

            // HelpDGV - помощник по автодополнению (IntelliSense)
            dgvHelp.AllowUserToAddRows       = false;
            dgvHelp.AllowUserToDeleteRows    = false;
            dgvHelp.AllowUserToOrderColumns  = true;
            dgvHelp.AllowUserToResizeColumns = false;
            dgvHelp.AllowUserToResizeRows    = false;
            dgvHelp.BackgroundColor          = System.Drawing.Color.White;
            dgvHelp.BorderStyle          = System.Windows.Forms.BorderStyle.Fixed3D;
            dgvHelp.GridColor            = System.Drawing.Color.White;
            dgvHelp.MultiSelect          = false;
            dgvHelp.ReadOnly             = true;
            dgvHelp.RowHeadersVisible    = false;
            dgvHelp.ColumnHeadersVisible = false;
            dgvHelp.SelectionMode        = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
            dgvHelp.Size       = new System.Drawing.Size(300, 202);
            dgvHelp.KeyDown   += new System.Windows.Forms.KeyEventHandler(dgvHelp_KeyDown);
            dgvHelp.KeyPress  += new System.Windows.Forms.KeyPressEventHandler(dgvHelp_KeyPress);
            dgvHelp.MouseMove += new System.Windows.Forms.MouseEventHandler(dgvHelp_MouseMove);
            dgvHelp.Leave     += new System.EventHandler(dgvHelp_Leave);

            // Основные (общие) операторы SQL
            dgvHelp.DataSource = TooltipDictionary.HelpDT;
            HelpTT.ToolTipIcon = ToolTipIcon.Info;
            HelpTT.ShowAlways  = true;

            dgvHelp.Columns[TooltipDictionary.ID_CONTENT].Width            = 0;
            dgvHelp.Columns[TooltipDictionary.ID_CONTENT].Visible          = false;
            dgvHelp.Columns[TooltipDictionary.COMMENT_COLUMN_NAME].Visible = false;
            dgvHelp.Columns[TooltipDictionary.FORE_COLOR].Visible          = false;
            dgvHelp.Columns[TooltipDictionary.URL_ADR_COLUMN_NAME].Visible = false;
            dgvHelp.Columns[TooltipDictionary.WORD].AutoSizeMode           = DataGridViewAutoSizeColumnMode.Fill;
            dgvHelp.Columns[TooltipDictionary.WORD].FillWeight             = 100;

            this.Hide();
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Quick down and dirty search form. This was made
 /// from an empty code file, so this form has no
 /// .designer file.
 /// </summary>
 /// <param name="RtbToSearch">RichTextBox to search.</param>
 public FindForm(ref RichTextBoxCustom richTextBox)
 {
     rtb = richTextBox;
     InitializeComponent();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Prints either the selected rich text, or all
 /// the text from a RichTextBox.
 /// </summary>
 /// <param name="rtbToPrint">ref The RichTextbox to print from.</param>
 /// <param name="pageSet">A Printing PageSettings object, or null.
 /// If null is used, then the rich text will be printed using the
 /// default page settings. (Portrait, 8.5 x 11, 1 in. margins).
 /// </param>
 internal PrintRichText(ref RichTextBoxCustom rtbToPrint, PageSettings pageSet)
 {
     rtb          = rtbToPrint;
     pageSettings = pageSet;
 }