From a1b06003f75ece494cec0948f31fd0177967b82e Mon Sep 17 00:00:00 2001 From: abazov73 <92822431+abazov73@users.noreply.github.com> Date: Mon, 24 Apr 2023 00:33:09 +0400 Subject: [PATCH] Enabled generation --- .../ConstructionCompanyView/FormLogin.cs | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/ConstructionCompany/ConstructionCompanyView/FormLogin.cs b/ConstructionCompany/ConstructionCompanyView/FormLogin.cs index 452ecb6..169c7d7 100644 --- a/ConstructionCompany/ConstructionCompanyView/FormLogin.cs +++ b/ConstructionCompany/ConstructionCompanyView/FormLogin.cs @@ -57,32 +57,32 @@ namespace ConstructionCompanyView private void buttonGenerate_Click(object sender, EventArgs e) { - //Stopwatch stopwatch = new Stopwatch(); - //stopwatch.Start(); - //_random.GenerateMaterials(); - //stopwatch.Stop(); - //long materials = stopwatch.ElapsedMilliseconds; - //stopwatch.Restart(); - //_random.GeneratePositions(); - //stopwatch.Stop(); - //long positions = stopwatch.ElapsedMilliseconds; - //stopwatch.Restart(); - //_random.GenerateEmployees(); - //stopwatch.Stop(); - //long employees = stopwatch.ElapsedMilliseconds; - //stopwatch.Restart(); - //_random.GenerateOrders(); - //stopwatch.Stop(); - //long orders = stopwatch.ElapsedMilliseconds; - //stopwatch.Restart(); - //_random.GenerateEmployeesOrders(); - //long employeesOrders = stopwatch.ElapsedMilliseconds; - //stopwatch.Restart(); - //_random.GenerateMaterialOrders(); - //stopwatch.Stop(); - //long materialOrders = stopwatch.ElapsedMilliseconds; + Stopwatch stopwatch = new Stopwatch(); + stopwatch.Start(); + _random.GenerateMaterials(); + stopwatch.Stop(); + long materials = stopwatch.ElapsedMilliseconds; + stopwatch.Restart(); + _random.GeneratePositions(); + stopwatch.Stop(); + long positions = stopwatch.ElapsedMilliseconds; + stopwatch.Restart(); + _random.GenerateEmployees(); + stopwatch.Stop(); + long employees = stopwatch.ElapsedMilliseconds; + stopwatch.Restart(); + _random.GenerateOrders(); + stopwatch.Stop(); + long orders = stopwatch.ElapsedMilliseconds; + stopwatch.Restart(); + _random.GenerateEmployeesOrders(); + long employeesOrders = stopwatch.ElapsedMilliseconds; + stopwatch.Restart(); + _random.GenerateMaterialOrders(); + stopwatch.Stop(); + long materialOrders = stopwatch.ElapsedMilliseconds; _random.GenerateAdditionalMaterialOrders(); - //MessageBox.Show($"materials={materials}, positions={positions}, employees={employees}, orders={orders}, materialOrders={materialOrders}, employeeOrders={employeesOrders}", "Результаты"); + MessageBox.Show($"materials={materials}, positions={positions}, employees={employees}, orders={orders}, materialOrders={materialOrders}, employeeOrders={employeesOrders}", "Результаты"); MessageBox.Show("Готово!"); } }