91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 21KB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-06-04
  • 語(yǔ)言: C#
  • 標(biāo)簽: RichTextBox??

資源簡(jiǎn)介

c# winform RichTextBox Autocomplete 自動(dòng)完成 智能輸入

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;

namespace?Intellisense
{
????public?partial?class?MainForm?:?Form
????{
????????public?int?CurrentTagStart?=?0;
????????public?string?intellisenseBuffer?=?““;
????????public?bool?PassInputToTextbox?=?true;

????????public?MainForm()
????????{
????????????InitializeComponent();
????????}

????????private?void?rtbInput_PreviewKeyDown(object?sender?PreviewKeyDownEventArgs?e)
????????{
????????????if?(e.KeyCode?==?Keys.OemPeriod?&&?e.Shift?==?false)
????????????{
????????????????CurrentTagStart?=?rtbInput.Selectionstart;
????????????????Point?p?=?rtbInput.GetPositionFromCharIndex(rtbInput.Selectionstart);
????????????????p.Y?+=?(int)rtbInput.Font.GetHeight()*2;
????????????????Console.WriteLine((int)rtbInput.Font.GetHeight());
????????????????lbIntelli.Location?=?p;
????????????????lbIntelli.Show();
????????????????ActiveControl?=?lbIntelli;
????????????}
????????}

????????private?void?lbIntelli_KeyUp(object?sender?KeyEventArgs?e)
????????{
????????????object?ObjToSelect?=?new?object();
????????????if?(e.KeyCode?!=?Keys.OemPeriod)
????????????????if?(e.KeyCode?!=?Keys.Back)
????????????????{
????????????????????bool?startswith?=?false;
????????????????????intellisenseBuffer?+=?e.KeyCode;
????????????????????foreach?(object?obj?in?lbIntelli.Items)
????????????????????{
????????????????????????string?str?=?obj.ToString();
????????????????????????if?(str?!=?““)
????????????????????????{
????????????????????????????startswith?=?str.StartsWith(intellisenseBuffer?true?null);
????????????????????????????if?(startswith?==?true)
????????????????????????????{
????????????????????????????????ObjToSelect?=?obj;
????????????????????????????????break;
????????????????????????????}
????????????????????????}
????????????????????}
????????????????????if?(startswith?==?false)
????????????????????{
????????????????????????intellisenseBuffer?=?““;
????????????????????????lbIntelli.Hide();
????????????????????}
????????????????????lbIntelli.SelectedItem?=?ObjToSelect;
????????????????}
????????????????if?(e.KeyCode?==?Keys.Back)?{?rtbInput.Text.Remove(rtbInput.Selectionstart-11);?}
????????????????if?(e.KeyCode?==?Keys.Return)
????????????????{
????????????????????rtbInput.Select(CurrentTagStart+1?rtbInput.Selectionstart);
????????????????????rtbInput.SelectedText?=?lbIntelli.SelectedItem.ToString();
????????????????}

????????}

????????private?void?lbIntelli_KeyPress(object?sender?KeyPressEventArgs?e)
????????{
????????????rtbInput.SelectedText?=?e.KeyChar.ToString();
????????}
????}
}

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件?????????929??2006-02-24?11:45??Intellisense\Intellisense.sln
?????文件???????15360??2006-02-24?11:45??Intellisense\Intellisense.suo
?????目錄???????????0??2006-02-24?11:44??Intellisense\Intellisense\
?????目錄???????????0??2006-02-24?11:44??Intellisense\Intellisense\bin\
?????目錄???????????0??2006-02-24?11:44??Intellisense\Intellisense\bin\Debug\
?????文件???????24576??2006-02-24?11:42??Intellisense\Intellisense\bin\Debug\Intellisense.exe
?????文件????????5632??2005-09-23?06:56??Intellisense\Intellisense\bin\Debug\Intellisense.vshost.exe
?????目錄???????????0??2006-02-24?11:44??Intellisense\Intellisense\bin\Release\
?????文件????????2758??2006-02-24?11:44??Intellisense\Intellisense\Form1.cs
?????文件????????4890??2006-02-24?10:50??Intellisense\Intellisense\Form1.Designer.cs
?????文件????????5814??2006-02-24?10:50??Intellisense\Intellisense\Form1.resx
?????文件????????3231??2006-02-24?11:45??Intellisense\Intellisense\Intellisense.csproj
?????文件?????????482??2006-02-24?10:19??Intellisense\Intellisense\Program.cs
?????目錄???????????0??2006-02-24?11:44??Intellisense\Intellisense\Properties\
?????文件????????1272??2006-02-24?10:17??Intellisense\Intellisense\Properties\AssemblyInfo.cs
?????文件????????2851??2006-02-24?10:18??Intellisense\Intellisense\Properties\Resources.Designer.cs
?????文件????????5612??2006-02-24?10:17??Intellisense\Intellisense\Properties\Resources.resx
?????文件????????1095??2006-02-24?10:18??Intellisense\Intellisense\Properties\Settings.Designer.cs
?????文件?????????249??2006-02-24?10:17??Intellisense\Intellisense\Properties\Settings.settings

評(píng)論

共有 條評(píng)論