當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。