• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Forms.TextBoxBase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Windows.Forms.TextBoxBase的典型用法代码示例。如果您正苦于以下问题:C# TextBoxBase类的具体用法?C# TextBoxBase怎么用?C# TextBoxBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TextBoxBase类属于System.Windows.Forms命名空间,在下文中一共展示了TextBoxBase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: LogWriter

 public LogWriter(TextBoxBase textBox, string path, bool writeTimestamp, bool append, params TextWriter[] otherOutputs)
     : base(path, writeTimestamp, append, otherOutputs)
 {
     _textBox = textBox;
     _scrollTextBox = true;
     _textBox.MouseWheel += new MouseEventHandler(textBox_MouseWheel);
 }
开发者ID:ilMagnifico,项目名称:asymmetric-threat-tracker,代码行数:7,代码来源:LogWriter.cs


示例2: TextNormalizer

		public TextNormalizer (TextBoxBase textboxbase) 
		{
			this.textboxbase = textboxbase;
			
			start_point = 0;
			end_point = Text.Length;
		}
开发者ID:mono,项目名称:uia2atk,代码行数:7,代码来源:TextNormalizer.cs


示例3: SpellChecker

        public SpellChecker(TextBoxBase textbox, string localeId)
        {
            this.textbox = textbox;
            this.localeId = localeId;

            baseDir = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
        }
开发者ID:ADTC,项目名称:VietOCR,代码行数:7,代码来源:SpellChecker.cs


示例4: AppendText

 public static void AppendText(TextBoxBase control, string text)
 {
     if (control.InvokeRequired)
         control.Invoke(new AppendTextDelegate(AppendText), control, text);
     else
         control.AppendText(text);
 }
开发者ID:greeduomacro,项目名称:phoenix,代码行数:7,代码来源:Safe.cs


示例5: CharFromPos

        /// <summary>
        ///   Returns the index of the character under the specified 
        ///   point in the control, or the nearest character if there
        ///   is no character under the point.
        /// </summary>
        /// <param name = "textBox">The text box control to check.</param>
        /// <param name = "point">The point to find the character for, 
        ///   specified relative to the client area of the text box.</param>
        /// <returns></returns>
        internal static int CharFromPos(TextBoxBase textBox, Point point)
        {
            unchecked
            {
                // Convert the point into a DWord with horizontal position
                // in the loword and vertical position in the hiword:
                var xy = (point.X & 0xFFFF) + ((point.Y & 0xFFFF) << 16);
                // Get the position from the text box.
                var res =
                    NativeMethods.SendMessageInt(
                        textBox.Handle,
                        NativeMethods.EM_CHARFROMPOS,
                        IntPtr.Zero,
                        new IntPtr(xy)).ToInt32();

                // the Platform SDK appears to be incorrect on this matter.
                // the hiword is the line number and the loword is the index
                // of the character on this line
                var lineNumber = ((res & 0xFFFF) >> 16);
                var charIndex = (res & 0xFFFF);

                // Find the index of the first character on the line within
                // the control:
                var lineStartIndex =
                    NativeMethods.SendMessageInt(
                        textBox.Handle,
                        NativeMethods.EM_LINEINDEX,
                        new IntPtr(lineNumber),
                        IntPtr.Zero).ToInt32();
                // Return the combined index:
                return lineStartIndex + charIndex;
            }
        }
开发者ID:jystic,项目名称:gitextensions,代码行数:42,代码来源:TextBoxHelper.cs


示例6: HotSpot

		public HotSpot(TextBoxBase control, int offset, int length)
		{
			if(control == null)
			{
				throw  new ArgumentNullException("control");
			}
			if(offset < 0)
			{
				throw  new ArgumentOutOfRangeException("offset", offset, "offset cannot be less than zero");
			}
			if (offset >= control.Text.Length)
			{
				throw new ArgumentOutOfRangeException("offset", offset, "offset must be shorter than text.");
			}
			if(length <= 0)
			{
				throw new ArgumentOutOfRangeException("length", offset, "length must be greater than zero");
			}
			if (offset + length > control.Text.Length)
			{
				throw new ArgumentOutOfRangeException("length", length, "length plus offset must be shorter than text.");
			}
			_control = control;
			_offset = offset;
			_text = _control.Text.Substring(_offset, length);
		}
开发者ID:jwickberg,项目名称:libpalaso,代码行数:26,代码来源:HotSpot.cs


示例7: TextBoxWriter

        /// <summary>
        /// Creates a new instance of the <see cref="TextBoxWriter"/> class.
        /// </summary>
        /// <param name="b">The <see cref="TextBoxBase"/> that will be written to.</param>
        /// <exception cref="NullReferenceException">Thrown if the supplied TextBoxBase is null.</exception>
        public TextBoxWriter( TextBoxBase b )
        {
            if ( b == null )
                throw new NullReferenceException();

            textBox = b;
        }
开发者ID:modernist,项目名称:CrawlWave,代码行数:12,代码来源:TextBoxWriter.cs


示例8: ShouldSelectToken

 private static bool ShouldSelectToken(Match match, TextBoxBase label)
 {
     var start = match.Index;
     var end = start + match.Length;
     var caret = label.SelectionStart;
     return caret >= start && caret <= end;
 }
开发者ID:JGTM2016,项目名称:bdhero,代码行数:7,代码来源:TextBoxExtensions.cs


示例9: CustomPaintTextBox

        public CustomPaintTextBox(TextBoxBase clientTextBox, SpellChecker checker)
        {
            //Set up the CustomPaintTextBox
            this.clientTextBox = clientTextBox;
            this.mySpellChecker = checker;

            //Create a bitmap with the same dimensions as the textbox
            myBitmap = new Bitmap(clientTextBox.Width, clientTextBox.Height);

            //Create the graphics object from this bitmpa...this is where we will draw the lines to start with
            bufferGraphics = Graphics.FromImage(this.myBitmap);
            bufferGraphics.Clip = new Region(clientTextBox.ClientRectangle);

            //Get the graphics object for the textbox.  We use this to draw the bufferGraphics
            textBoxGraphics = Graphics.FromHwnd(clientTextBox.Handle);

            //Assign a handle for this class and set it to the handle for the textbox
            this.AssignHandle(clientTextBox.Handle);

            //We also need to make sure we update the handle if the handle for the textbox changes
            //This occurs if wordWrap is turned off for a RichTextBox
            clientTextBox.HandleCreated += TextBoxBase_HandleCreated;

            //We need to add a handler to change the clip rectangle if the textBox is resized
            clientTextBox.ClientSizeChanged += TextBoxBase_ClientSizeChanged;

            //this.disposedValue = false;
        }
开发者ID:ADTC,项目名称:VietOCR,代码行数:28,代码来源:CustomPaintTextBox.cs


示例10: GetSpellCheck

        public bool GetSpellCheck(TextBoxBase extendee)
        {
            if(this.textBoxes.Contains(extendee))
                return (bool)this.textBoxes[extendee];

            return false;
        }
开发者ID:madhon,项目名称:NetSpell,代码行数:7,代码来源:TextBoxExtender.cs


示例11: AddControl

 public void AddControl(TextBoxBase control)
 {
     control.KeyUp += new KeyEventHandler(control_KeyUp);
     control.MouseClick += new MouseEventHandler(control_MouseClick);
     control.GotFocus += new EventHandler(control_GotFocus);
     control.KeyDown += new KeyEventHandler(control_KeyDown);
 }
开发者ID:dmarijanovic,项目名称:uber-tools,代码行数:7,代码来源:AutoComplete_OLD.cs


示例12: Editor

 public Editor(TextBoxBase tbb)
 {
     _TextBoxBase = tbb;
     _TextBoxBase.KeyDown += new KeyEventHandler(KeyDown);
     _TextBoxBase.KeyUp += new KeyEventHandler(KeyUp);
     _TextBoxBase.KeyPress += new KeyPressEventHandler(KeyPress);
 }
开发者ID:ashish-antil,项目名称:Products,代码行数:7,代码来源:Editor.cs


示例13: AppendText

 public static void AppendText(TextBoxBase tb, string text)
 {
     if (tb == null) return;
     tb.SuspendLayout();
     tb.SelectionStart = tb.TextLength;
     tb.SelectedText = text;
     tb.ResumeLayout();
 }
开发者ID:manojdjoshi,项目名称:simple-assembly-exploror,代码行数:8,代码来源:SimpleTextbox.cs


示例14: TextBoxTracer

 public TextBoxTracer(TextBoxBase t, StringCollection data)
 {
     this.txtLog = t;
     this.logData = data;
     writeAction = s => t.Invoke(new Action(() =>
     {
         t.Text += s;
     }));
 }
开发者ID:HungryBear,项目名称:rayden,代码行数:9,代码来源:LogController.cs


示例15: Add

        public static void Add(TextBoxBase textBox, string message)
        {
            if (textBox.Text == "Log")
              {
            textBox.Text = string.Empty;
              }

              textBox.Text += DateTime.Now + OneSpace + Dash + OneSpace + message + Crlf;
        }
开发者ID:fredatgithub,项目名称:GitAutoUpdate,代码行数:9,代码来源:Logger.cs


示例16: ChangeDisplay

        /// <summary>
        /// Changes the output display control.
        /// </summary>
        /// <param name="output">The new output.</param>
        public void ChangeDisplay(TextBoxBase output)
        {
            if (output != null)
            {
                _output = output;

                Flush();
            }
        }
开发者ID:tuvoksg1,项目名称:Coding-Challenge,代码行数:13,代码来源:TestOutputListener.cs


示例17: TextBoxBinding

 public TextBoxBinding(TextBoxBase textBox, bool readOnly = false, bool nullable = true, bool longText = false)
 {
     this.TextBox = textBox;
     this.TextBox.Multiline = longText;
     this.TextBox.ReadOnly = readOnly;
       if (this.TextBox is TextBox && longText)
     (this.TextBox as TextBox).ScrollBars = ScrollBars.Vertical;
     this.Nullable = nullable;
 }
开发者ID:CyberBotX,项目名称:sda-donation-tracker,代码行数:9,代码来源:TextBoxBinding.cs


示例18: BindText

        /// <summary>
        /// Binds the specified text box
        /// </summary>
        /// <param name="txt"></param>
        /// <param name="dataSource"></param>
        /// <param name="dataMember"></param>
        /// <returns></returns>
        public static Binding BindText(TextBoxBase txt, object dataSource, string dataMember)
        {
            var binding = txt.DataBindings.Add("Text", dataSource, dataMember); //NOXLATE
            txt.TextChanged += (sender, e) =>
            {
                binding.WriteValue();
            };

            return binding;
        }
开发者ID:kanbang,项目名称:Colt,代码行数:17,代码来源:TextBoxBinder.cs


示例19: RetrieveHotSpotsEventArgs

		public RetrieveHotSpotsEventArgs(TextBoxBase control)
		{
			if (control == null)
			{
				throw new ArgumentNullException();
			}
			_color = Color.Red;
			_control = control;
			_hotSpots = new List<HotSpot>();
		}
开发者ID:JohnThomson,项目名称:libpalaso,代码行数:10,代码来源:RetrieveHotSpotsEventArgs.cs


示例20: ParseInputH

 public static bool ParseInputH(TextBoxBase control, out ulong value)
 {
     if (!ulong.TryParse(control.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out value))
     {
         control.Focus();
         control.SelectAll();
         return false;
     }
     return true;
 }
开发者ID:Slashmolder,项目名称:RNGReporter,代码行数:10,代码来源:FormsFunctions.cs



注:本文中的System.Windows.Forms.TextBoxBase类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Forms.Timer类代码示例发布时间:2022-05-26
下一篇:
C# Forms.TextBox类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap