public void GetStopsForEachShip(int MGLT) { /* * this methods gets the MGLT from the win form , then calculates the * no. of stops . */ MegalightCalc calcJourney = new MegalightCalc(MGLT); calcJourney.CalcJourneyTime(ApiRequest.getInstance().GetVehicles(__getAPiResponse)); }
private void button1_Click(object sender, EventArgs e) { DataTable table = new DataTable(); int MGLT = Int32.Parse(textMGLT.Text); GetApiResponse getApiResponse = new GetApiResponse(); getApiResponse.GetStopsForEachShip(MGLT); ResultGridView.DataSource = MegalightCalc.getInstance().DisplayFlightInfo(); ResultGridView.AutoResizeColumns(); ResultGridView.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells; ResultGridView.Visible = true; Calc.Enabled = false; }