当前位置: 首页>>代码示例>>C#>>正文


C# TextBox.setRows方法代码示例

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


在下文中一共展示了TextBox.setRows方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: actionPerformed

	public virtual void  actionPerformed(System.Object event_sender, System.EventArgs event_Renamed)
	{
		if (event_sender.Equals(openMenu))
		{
			chooser.ShowDialog(this);
			if (new System.IO.FileInfo(chooser.FileName) == null)
				return ;
			try
			{
				sourceImage = ImageIO.read(new System.IO.FileInfo(chooser.FileName));
			}
			catch (System.Exception e)
			{
				SupportClass.WriteStackTrace(e, Console.Error);
			}
		}
		else if (SupportClass.CommandManager.GetCommand(event_sender).Equals("Open from URL"))
		{
			try
			{
				//UPGRADE_TODO: Class 'java.net.URL' was converted to a 'System.Uri' which does not throw an exception if a URL specifies an unknown protocol. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1132'"
				sourceImage = ImageIO.read(new System.Uri(url.Text));
			}
			catch (System.Exception e)
			{
				SupportClass.WriteStackTrace(e, Console.Error);
			}
		}
		else
			return ;
		
		if (sourceImageLabel != null)
		{
			//UPGRADE_TODO: Method 'javax.swing.JFrame.getContentPane' was converted to 'System.Windows.Forms.Form' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJFramegetContentPane'"
			((System.Windows.Forms.ContainerControl) this).Controls.Remove(sourceImageLabel);
		}
		
		System.Windows.Forms.Label temp_label;
		temp_label = new System.Windows.Forms.Label();
		temp_label.Image = (System.Drawing.Image) sourceImage.Clone();
		sourceImageLabel = temp_label;
		//UPGRADE_TODO: Method 'javax.swing.JFrame.getContentPane' was converted to 'System.Windows.Forms.Form' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJFramegetContentPane'"
		//UPGRADE_TODO: Method 'java.awt.Container.add' was converted to 'System.Windows.Forms.ContainerControl.Controls.Add' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtContaineradd_javaawtComponent_javalangObject'"
		((System.Windows.Forms.ContainerControl) this).Controls.Add(sourceImageLabel);
		sourceImageLabel.Dock = System.Windows.Forms.DockStyle.Left;
		sourceImageLabel.BringToFront();
		
		
		QRCodeDecoder decoder = new QRCodeDecoder();
		if (canvas != null)
		{
			//UPGRADE_TODO: Method 'javax.swing.JFrame.getContentPane' was converted to 'System.Windows.Forms.Form' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJFramegetContentPane'"
			((System.Windows.Forms.ContainerControl) this).Controls.Remove(canvas);
			//canvas.setImage(null);
		}
		canvas = new J2SEDebugCanvas();
		QRCodeDecoder.setCanvas(canvas);
		//UPGRADE_TODO: Method 'javax.swing.JFrame.getContentPane' was converted to 'System.Windows.Forms.Form' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJFramegetContentPane'"
		//UPGRADE_TODO: Method 'java.awt.Container.add' was converted to 'System.Windows.Forms.ContainerControl.Controls.Add' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtContaineradd_javaawtComponent_javalangObject'"
		((System.Windows.Forms.ContainerControl) this).Controls.Add(canvas);
		canvas.Dock = System.Windows.Forms.DockStyle.Right;
		canvas.BringToFront();
		System.String decodedString = null;
		try
		{
			decodedString = new String(decoder.decode(new J2SEImage(this, sourceImage)));
		}
		catch (DecodingFailedException e)
		{
			canvas.println(e.getMessage());
			canvas.println("--------");
			return ;
		}
		decodedString = ContentConverter.convert(decodedString);
		canvas.println("\nDecode result:");
		canvas.println(decodedString);
		canvas.println("--------");
		if (decodedText != null)
		{
			//UPGRADE_TODO: Method 'javax.swing.JFrame.getContentPane' was converted to 'System.Windows.Forms.Form' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJFramegetContentPane'"
			((System.Windows.Forms.ContainerControl) this).Controls.Remove(decodedText);
		}
		System.Windows.Forms.TextBox temp_TextBox;
		temp_TextBox = new System.Windows.Forms.TextBox();
		temp_TextBox.Multiline = true;
		temp_TextBox.WordWrap = false;
		temp_TextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
		temp_TextBox.Text = decodedString;
		decodedText = temp_TextBox;
		decodedText.WordWrap = true;
		//UPGRADE_ISSUE: Method 'javax.swing.JTextArea.setRows' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingJTextAreasetRows_int'"
		decodedText.setRows(decodedString.Length / 20 + 1);
		if (decodedString.Length < 20)
		{
			//UPGRADE_ISSUE: Method 'javax.swing.JTextArea.setColumns' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingJTextAreasetColumns_int'"
			decodedText.setColumns(decodedString.Length);
		}
		else
		{
			//UPGRADE_ISSUE: Method 'javax.swing.JTextArea.setColumns' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingJTextAreasetColumns_int'"
//.........这里部分代码省略.........
开发者ID:eric-seekas,项目名称:QR.NET,代码行数:101,代码来源:QRCodeDecoderGUIExample.cs


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