Guest User

Untitled

a guest
Dec 8th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. for (int i = 1; i <= Convert.ToInt32(input); i++)
  2. {
  3. panel1.Controls.Add(new TextBox()
  4. {
  5. Name = i.ToString(),
  6. Location = new Point(54, yTextBox_n = yTextBox_n + 35),
  7. Font = new Font("Times New Roman", 14.25f)
  8. });
  9.  
  10. panel1.Controls.Add(new Label()
  11. {
  12. Name = i.ToString(),
  13. Location = new Point(8, yLabel_n = yLabel_n + 35),
  14. Text = "n" + i,
  15. Font = new Font("Times New Roman", 14.25f, FontStyle.Italic)
  16. });
  17. }
  18.  
  19. class Class_Algorithm
  20. {
  21. int[,] Matrix;
  22. int L;
  23. int N;
  24.  
  25. public Class_Algorithm(int[,] matrix, int l, int n)
  26. {
  27. Matrix = matrix;
  28. L = l;
  29. N = n;
  30. }
  31.  
  32. public void Algorithm()
  33. {
  34. int k = 1;
  35. int q = 1;
  36.  
  37. for (int d = 0; d < L; d++)
  38. {
  39. int m = 1;
  40. int z = 1;
  41. int[] r = new int[N];
  42.  
  43. for(int i = 0; i < N; i++)
  44. {
  45. for(int j = 0; j < N; j++)
  46. {
  47. r[i] += Matrix[i, j];
  48. }
  49. }
  50. }
  51. }
  52. }
  53.  
  54. this.Controls.Find("ControlName", false);
  55.  
  56. private Dictionary<int, TextBox> dynamicTextboxes = new Dictionary<int, TextBox>();
  57.  
  58. private string TextByIndex(int index)
  59. {
  60. string result = "";
  61. if (dynamicTextboxes.ContainsKey(index))
  62. result = dynamicTextboxes[index].Text;
  63. return result;
  64. }
  65.  
  66.  
  67. dynamicTextboxes.Clear();
  68. for (int i = 1; i <= Convert.ToInt32(input); i++)
  69. {
  70. TextBox box = new TextBox()
  71. {
  72. Name = "textbox_" + i.ToString(),
  73. Location = new Point(54, yTextBox_n = yTextBox_n + 35),
  74. Font = new Font("Times New Roman", 14.25f)
  75. };
  76. dynamicTextboxes[i] = box;
  77. panel1.Controls.Add(box);
  78.  
  79. panel1.Controls.Add(new Label()
  80. {
  81. Name = "label_" + i.ToString(),
  82. Location = new Point(8, yLabel_n = yLabel_n + 35),
  83. Text = "n" + i,
  84. Font = new Font("Times New Roman", 14.25f, FontStyle.Italic)
  85. });
  86. }
Add Comment
Please, Sign In to add comment