本文整理汇总了C#中System.Windows.Forms.TextBox.GetLength方法的典型用法代码示例。如果您正苦于以下问题:C# TextBox.GetLength方法的具体用法?C# TextBox.GetLength怎么用?C# TextBox.GetLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.TextBox
的用法示例。
在下文中一共展示了TextBox.GetLength方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ClearMatrix
/// <summary>
/// Метод, очищающает содержимое TextBox'ов.
/// </summary>
/// <param name = "TextBox"> Массив TextBox'ов </param>
public static void ClearMatrix(TextBox[,] TextBox)
{
for (int i = 0; i != TextBox.GetLength(0); i++)
for (int j = 0; j != TextBox.GetLength(1); j++)
{
TextBox[i, j].Text = "";
}
}
示例2: BoolCheck
/// <summary>
/// Метод, возвращает true, если TextBox'ы НЕ пустные, иначе - false.
/// </summary>
/// <param name = "TextBox"> Массив TextBox'ов </param>
public static bool BoolCheck(TextBox[,] TextBox)
{
for (int i = 0; i != TextBox.GetLength(0); i++)
for (int j = 0; j != TextBox.GetLength(1); j++)
{
if (TextBox[i, j].Text.Trim() == string.Empty) { return false; }
}
return true;
}
示例3: FillingRandomNumbers
/// <summary>
/// Метод, заполняет массив TextBox'ов случайными числами [-10:10].
/// </summary>
/// <param name = "TextBox"> Массив TextBox'ов </param>
public static void FillingRandomNumbers(TextBox[,] TextBox)
{
Random rng = new Random();
for (int i = 0; i != TextBox.GetLength(0); i++)
for (int j = 0; j != TextBox.GetLength(1); j++)
{
TextBox[i, j].Text = rng.Next(-10, 10).ToString();
}
}
示例4: crateMatrix
private void crateMatrix(TextBox[,] matrix_x, GroupBox matrix_box, NumericUpDown lines, NumericUpDown columns)
{
matrix_box.Controls.Clear();
int linha, coluna;
linha = Convert.ToInt32(lines.Value);
coluna = Convert.ToInt32(columns.Value);
matrix_x = new TextBox[linha, coluna];
for (int i = 0; i < matrix_x.GetLength(0); i++)
{
for (int j = 0; j < matrix_x.GetLength(1); j++)
{
matrix_x[i, j] = new TextBox();
matrix_x[i, j].Text = "0";
matrix_x[i, j].Top = (i * matrix_x[i, j].Height) + 100;
matrix_x[i, j].Left = j * 35 + 15;
matrix_x[i, j].Width = 30;
matrix_box.Controls.Add(matrix_x[i, j]);
}
}
}
示例5: checkTransp
private void checkTransp(TextBox[,] Matriz_x)
{
float[,] tempMatriz = new float[Matriz_x.GetLength(0), Matriz_x.GetLength(1)];
for (int i = 0; i < Matriz_x.GetLength(0); i++)
{
for (int j = 0; j < Matriz_x.GetLength(1); j++)
{
float k = 0;
if (float.TryParse(Matriz_x[i, j].Text, out k))
{
tempMatriz[i, j] = float.Parse(Matriz_x[i, j].Text);
}
}
}
float[,] answer = calculos.Transposta(tempMatriz);
for (int i = 0; i < answer.GetLength(0); i++)
{
for (int j = 0; j < answer.GetLength(1); j++)
{
Matriz_x[i, j].Text = "" + answer[i, j];
}
}
}
示例6: checkDet
private float checkDet(TextBox[,] Matriz_x)
{
float[,] tempMatriz = new float[Matriz_x.GetLength(0), Matriz_x.GetLength(1)];
for (int i = 0; i < Matriz_x.GetLength(0); i++)
{
for (int j = 0; j < Matriz_x.GetLength(1); j++)
{
float k = 0;
if (float.TryParse(Matriz_x[i, j].Text, out k))
{
tempMatriz[i, j] = float.Parse(Matriz_x[i, j].Text);
}
}
}
float answer = calculos.Determinante(tempMatriz);
return answer;
}