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


C# TextBox.GetLength方法代码示例

本文整理汇总了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 = "";
         }
 }
开发者ID:Ogienko,项目名称:WorkOnMatrices,代码行数:12,代码来源:ClassToHelp.cs

示例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;
 }
开发者ID:Ogienko,项目名称:WorkOnMatrices,代码行数:13,代码来源:ClassToHelp.cs

示例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();
         }
 }
开发者ID:Ogienko,项目名称:WorkOnMatrices,代码行数:13,代码来源:ClassToHelp.cs

示例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]);
                }
            }
        }
开发者ID:MilenaCrivella,项目名称:CalculadoraMatriz,代码行数:23,代码来源:Form1.cs

示例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];
                }
            }
        }
开发者ID:MilenaCrivella,项目名称:CalculadoraMatriz,代码行数:26,代码来源:Form1.cs

示例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;
        }
开发者ID:MilenaCrivella,项目名称:CalculadoraMatriz,代码行数:19,代码来源:Form1.cs


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