37 lines
858 B
C#
37 lines
858 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
using GtaVUsersInfo.Helpers;
|
|
|
|
namespace GtaVUsersInfo
|
|
{
|
|
public partial class MainForm : Form
|
|
{
|
|
public MainForm()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void MainForm_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
async private void parserButton_Click(object sender, EventArgs e)
|
|
{
|
|
using (var parser = new CarParser())
|
|
{
|
|
var cars = await parser.ParseCarsFromPages(25);
|
|
parser.SaveToJson(cars, "cars.json");
|
|
Console.WriteLine("Data saved to cars.json");
|
|
}
|
|
}
|
|
}
|
|
}
|